IMP-370: SHOW TABLES IN support and IMP-363: SHOW DATABASES

Change-Id: Ic41c4b0767a0480f0a18e1e985f25de3bc2ca947
This commit is contained in:
Henry Robinson
2012-10-07 23:48:00 -07:00
parent 540673763f
commit 91c3b979ca
15 changed files with 453 additions and 66 deletions

View File

@@ -17,6 +17,8 @@ string, string
'year','int'
'month','int'
====
USE default
====
# Default database
describe alltypes
---- TYPES

View File

@@ -87,4 +87,112 @@ string
'alltypes'
'stringpartitionkey'
'testtbl'
====
# Show tables in
show tables in testdb1
---- TYPES
string
---- RESULTS
'alltypes'
'alltypes_rc'
'alltypes_rc_bzip'
'alltypes_rc_def'
'alltypes_rc_gzip'
'alltypes_rc_snap'
'alltypes_seq'
'alltypes_seq_bzip'
'alltypes_seq_def'
'alltypes_seq_gzip'
'alltypes_seq_record_bzip'
'alltypes_seq_record_def'
'alltypes_seq_record_gzip'
'alltypes_seq_record_snap'
'alltypes_seq_snap'
'alltypes_trevni'
'alltypes_trevni_def'
'alltypes_trevni_snap'
'testtbl'
'testtbl_rc'
'testtbl_rc_bzip'
'testtbl_rc_def'
'testtbl_rc_gzip'
'testtbl_rc_snap'
'testtbl_seq'
'testtbl_seq_bzip'
'testtbl_seq_def'
'testtbl_seq_gzip'
'testtbl_seq_record_bzip'
'testtbl_seq_record_def'
'testtbl_seq_record_gzip'
'testtbl_seq_record_snap'
'testtbl_seq_snap'
'testtbl_trevni'
'testtbl_trevni_def'
'testtbl_trevni_snap'
====
# Show tables in with a pattern
show tables in testdb1 like 'alltype*'
---- TYPES
string
---- RESULTS
'alltypes'
'alltypes_rc'
'alltypes_rc_bzip'
'alltypes_rc_def'
'alltypes_rc_gzip'
'alltypes_rc_snap'
'alltypes_seq'
'alltypes_seq_bzip'
'alltypes_seq_def'
'alltypes_seq_gzip'
'alltypes_seq_record_bzip'
'alltypes_seq_record_def'
'alltypes_seq_record_gzip'
'alltypes_seq_record_snap'
'alltypes_seq_snap'
'alltypes_trevni'
'alltypes_trevni_def'
'alltypes_trevni_snap'
====
USE testdb1
====
# Coverage of syntax variations.
show tables in testdb1 'alltypes'
---- TYPES
string
---- RESULTS
'alltypes'
====
show tables in testdb1 like 'alltypes'
---- TYPES
string
---- RESULTS
'alltypes'
====
show tables 'alltypes'
---- TYPES
string
---- RESULTS
'alltypes'
====
show tables like 'alltypes'
---- TYPES
string
---- RESULTS
'alltypes'
====
# Show databases
show databases
---- TYPES
string
---- RESULTS
'default'
'testdb1'
'tpch'
====
show databases like 'def*'
---- TYPES
string
---- RESULTS
'default'
====