Files
impala/testdata/workloads/functional-query/queries/QueryTest/show.test
Lenni Kuff ef48f65e76 Add test framework for running Impala query tests via Python
This is the first set of changes required to start getting our functional test
infrastructure moved from JUnit to Python. After investigating a number of
option, I decided to go with a python test executor named py.test
(http://pytest.org/). It is very flexible, open source (MIT licensed), and will
enable us to do some cool things like parallel test execution.

As part of this change, we now use our "test vectors" for query test execution.
This will be very nice because it means if load the "core" dataset you know you
will be able to run the "core" query tests (specified by --exploration_strategy
when running the tests).

You will see that now each combination of table format + query exec options is
treated like an individual test case. this will make it much easier to debug
exactly where something failed.

These new tests can be run using the script at tests/run-tests.sh
2014-01-08 10:46:50 -08:00

218 lines
3.5 KiB
Plaintext

====
---- QUERY
# Simple pattern literal
show tables "alltypes"
---- TYPES
string
---- RESULTS
'alltypes'
====
---- QUERY
# Pattern with wildcard
show tables "all*ypes"
---- TYPES
string
---- RESULTS
'alltypes'
====
---- QUERY
# Empty string matches nothing
show tables ""
---- TYPES
string
---- RESULTS
====
---- QUERY
# Check that regex metacharacters are being escaped
show tables '+alltypes'
---- TYPES
string
---- RESULTS
====
---- QUERY
# Fully qualified names will not match
show tables "default.alltypes"
---- TYPES
string
---- RESULTS
====
---- QUERY
USE testdb1
====
---- 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 '*'
---- 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'
====
---- QUERY
USE default
====
---- QUERY
# Choice amongst patterns
show tables "alltypes|stringpartitionkey|testtbl"
---- TYPES
string
---- RESULTS
'alltypes'
'stringpartitionkey'
'testtbl'
====
---- QUERY
# 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'
====
---- QUERY
# 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'
====
---- QUERY
USE testdb1
====
---- QUERY
# Coverage of syntax variations.
show tables in testdb1 'alltypes'
---- TYPES
string
---- RESULTS
'alltypes'
====
---- QUERY
show tables in testdb1 like 'alltypes'
---- TYPES
string
---- RESULTS
'alltypes'
====
---- QUERY
show tables 'alltypes'
---- TYPES
string
---- RESULTS
'alltypes'
====
---- QUERY
show tables like 'alltypes'
---- TYPES
string
---- RESULTS
'alltypes'
====
---- QUERY
# Show databases
show databases
---- TYPES
string
---- RESULTS
'default'
'testdb1'
'tpch'
====
---- QUERY
show databases like 'def*'
---- TYPES
string
---- RESULTS
'default'
====