Files
impala/testdata/workloads/functional-query/queries/QueryTest/show.test
2014-01-08 10:47:34 -08:00

214 lines
3.3 KiB
Plaintext

====
---- QUERY
# Simple pattern literal
show tables "alltypes"
---- RESULTS
'alltypes'
---- TYPES
STRING
====
---- QUERY
# Pattern with wildcard
show tables "all*ypes"
---- RESULTS
'alltypes'
---- TYPES
STRING
====
---- QUERY
# Empty string matches nothing
show tables ""
---- RESULTS
---- TYPES
STRING
====
---- QUERY
# Check that regex metacharacters are being escaped
show tables '+alltypes'
---- RESULTS
---- TYPES
STRING
====
---- QUERY
# Fully qualified names will not match
show tables "default.alltypes"
---- RESULTS
---- TYPES
STRING
====
---- QUERY
# Database names are case insensitive.
USE TESTDB1
---- RESULTS
====
---- QUERY
# Different database
# We have no SHOW TABLES with no pattern test since the set of tables is
# changing often, and may be different depending on whether benchmark data is
# loaded, for example.
show tables '*'
---- 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'
'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'
---- TYPES
STRING
====
---- QUERY
USE default
---- RESULTS
====
---- QUERY
# Choice amongst patterns
show tables "alltypes|stringpartitionkey|testtbl"
---- RESULTS
'alltypes'
'stringpartitionkey'
'testtbl'
---- TYPES
STRING
====
---- QUERY
# Show tables in
show tables in testdb1
---- 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'
'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'
---- TYPES
STRING
====
---- QUERY
# Show tables in with a pattern
show tables in testdb1 like 'alltype*'
---- 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'
---- TYPES
STRING
====
---- QUERY
USE testdb1
---- RESULTS
====
---- QUERY
# Coverage of syntax variations.
show tables in testdb1 'alltypes'
---- RESULTS
'alltypes'
---- TYPES
STRING
====
---- QUERY
show tables in testdb1 like 'alltypes'
---- RESULTS
'alltypes'
---- TYPES
STRING
====
---- QUERY
show tables 'alltypes'
---- RESULTS
'alltypes'
---- TYPES
STRING
====
---- QUERY
show tables like 'alltypes'
---- RESULTS
'alltypes'
---- TYPES
STRING
====
---- QUERY
# Show databases
show databases
---- RESULTS
'default'
'testdb1'
'tpcds'
'tpch'
---- TYPES
STRING
====
---- QUERY
show databases like 'def*'
---- RESULTS
'default'
---- TYPES
STRING
====