lava-oushudb-dt-sql-parser/test/parser/impala/syntax/fixtures/show.sql
霜序 e203f1a48a
feat: support impala (#184)
* feat(impala): add impala sqlLexer

* feat(impala): add impala grammar

* feat(impala): add alter table sql

* feat(impala): update alter table sql

* feat(impala): add alter db sql

* feat(impala): add alter view sql

* feat(impala): add compute stats/comment statement and update partition_desc for alter table

* feat(impala): add drop statement sql

* feat(impala): add revoke and grant sql

* feat(impala): add create db/function/role/view sql

* feat(impala): add describe/explain/invalidata_metadata/load_data sql

* feat(impala): add refresh/set/shutdown sql

* feat(impala): add truncate_table/use/values sql

* fix(impala): update shutdown and invaliddate_metadata

* feat(impala): add show/update/upsert sql

* feat(impala): add create/insert sql

* feat(impala): add select and delete sql

* feat(impala): add impala tokens and fix todo

* feat(impala): update impalaparser and some test unit

* feat(impala): add syntax suggestion

* feat(impala): add syntax suggestion

* feat(impala): update test unit

* feat(impala): remove reference

* fix(impala): add statement for sqlname and collect tableName

* fix(impala): fix syntax suggestion unit test

* fix(impala): update syntax suggestion and collect column

* feat(impala): add collect column create
2023-11-28 21:11:07 +08:00

167 lines
3.3 KiB
SQL

-- SHOW DATABASES [[LIKE] 'pattern']
SHOW DATABASES;
SHOW DATABASES 'xxx';
SHOW DATABASES LIKE 'xxx';
-- SHOW SCHEMAS [[LIKE] 'pattern']
SHOW SCHEMAS;
SHOW SCHEMAS 'xxx';
SHOW SCHEMAS LIKE 'xxx';
-- SHOW TABLES [IN database_name] [[LIKE] 'pattern']
SHOW TABLES;
SHOW TABLES 'xxx';
SHOW TABLES LIKE 'xxx';
SHOW TABLES IN my_db;
SHOW TABLES IN my_db 'xxx';
SHOW TABLES IN my_db LIKE 'xxx';
-- SHOW [AGGREGATE | ANALYTIC] FUNCTIONS [IN database_name] [[LIKE] 'pattern']
SHOW FUNCTIONS;
SHOW FUNCTIONS 'xxx';
SHOW FUNCTIONS LIKE 'xxx';
SHOW FUNCTIONS IN my_db;
SHOW FUNCTIONS IN my_db 'xxx';
SHOW FUNCTIONS IN my_db LIKE 'xxx';
SHOW ANALYTIC FUNCTIONS IN my_db LIKE 'xxx';
SHOW AGGREGATE FUNCTIONS IN my_db LIKE 'xxx';
-- SHOW CREATE TABLE [database_name].table_name
SHOW CREATE TABLE my_table;
SHOW CREATE TABLE my_db.my_table;
-- SHOW CREATE VIEW [database_name].view_name
SHOW CREATE VIEW my_table;
SHOW CREATE VIEW my_db.my_table;
-- SHOW TABLE STATS [database_name.]table_name
SHOW TABLE STATS my_table;
SHOW TABLE STATS my_db.my_table;
-- SHOW COLUMN STATS [database_name.]table_name
SHOW COLUMN STATS my_table;
SHOW COLUMN STATS my_db.my_table;
-- SHOW PARTITIONS [database_name.]table_name
SHOW PARTITIONS my_table;
SHOW PARTITIONS my_db.my_table;
-- SHOW [RANGE] PARTITIONS [database_name.]table_name
SHOW RANGE PARTITIONS my_table;
SHOW RANGE PARTITIONS my_db.my_table;
-- SHOW FILES IN [database_name.]table_name [PARTITION (key_col_expression [, key_col_expression]]
SHOW FILES IN my_table;
SHOW FILES IN my_db.my_table;
SHOW FILES IN my_db.my_table PARTITION (
"date" = "1110-11-11",
age BETWEEN 100
AND 200
);
SHOW ROLES;
SHOW CURRENT ROLES;
SHOW ROLE GRANT GROUP group_name;
SHOW GRANT USER user_name;
SHOW GRANT USER user_name ON SERVER;
SHOW GRANT USER user_name ON DATABASE database_name;
SHOW GRANT USER user_name ON TABLE database_name.table_name;
SHOW GRANT USER user_name ON URI my_uri;
SHOW GRANT USER user_name ON COLUMN database_name.table_name.column_name;
SHOW GRANT ROLE role_name;
SHOW GRANT ROLE role_name ON SERVER;
SHOW GRANT ROLE role_name ON DATABASE database_name;
SHOW GRANT ROLE role_name ON TABLE database_name.table_name;
SHOW GRANT ROLE role_name ON URI my_uri;
SHOW GRANT ROLE role_name ON COLUMN database_name.table_name.column_name;
SHOW GRANT GROUP group_name ON SERVER;
SHOW GRANT GROUP group_name ON DATABASE database_name;
SHOW GRANT GROUP group_name ON TABLE database_name.table_name;
SHOW GRANT GROUP group_name ON URI my_uri;
SHOW GRANT GROUP group_name ON COLUMN database_name.table_name.column_name;
-- example
SHOW DATABASES 'a*';
SHOW DATABASES LIKE 'a*';
SHOW TABLES IN some_db LIKE '*fact*';
SHOW TABLES '*dim*|*fact*';
show files in sample_table partition (j < 5);
show files in sample_table partition (
k = 3,
l between 1
and 10
);
show files in sample_table partition (month like 'J%');
show files in unpart_text;
show partitions part_text;
show files in s3_testing.sample_data_s3;
show roles;
show current roles;
show tables in full_db like 'dim*';
show CREATE TABLE numeric_grades_default_letter;
show range partitions numeric_grades_default_letter;
show table stats kudu_table;
show column stats customer;
show functions in _impala_builtins;
show functions in _impala_builtins like '*week*';