beliefer commented on a change in pull request #32442: URL: https://github.com/apache/spark/pull/32442#discussion_r629016341
########## File path: sql/core/src/test/resources/sql-tests/inputs/cte-ddl.sql ########## @@ -0,0 +1,65 @@ +-- Test data. +CREATE NAMESPACE IF NOT EXISTS query_ddl_namespace; +USE NAMESPACE query_ddl_namespace; +CREATE TABLE test_show_tables(a INT, b STRING, c INT) using parquet; +CREATE TABLE test_show_table_properties (a INT, b STRING, c INT) USING parquet TBLPROPERTIES('p1'='v1', 'p2'='v2'); +CREATE TABLE test_show_partitions(a String, b Int, c String, d String) USING parquet PARTITIONED BY (c, d); +ALTER TABLE test_show_partitions ADD PARTITION (c='Us', d=1); +ALTER TABLE test_show_partitions ADD PARTITION (c='Us', d=2); +ALTER TABLE test_show_partitions ADD PARTITION (c='Cn', d=1); +CREATE VIEW view_1 AS SELECT * FROM test_show_tables; +CREATE VIEW view_2 AS SELECT * FROM test_show_tables WHERE c=1; +CREATE TEMPORARY VIEW test_show_views(e int) USING parquet; +CREATE GLOBAL TEMP VIEW test_global_show_views AS SELECT 1 as col1; + +-- SHOW NAMESPACES +SHOW NAMESPACES; +WITH s AS (SHOW NAMESPACES) SELECT * FROM s; +WITH s AS (SHOW NAMESPACES) SELECT * FROM s WHERE namespace = 'query_ddl_namespace'; +WITH s(n) AS (SHOW NAMESPACES) SELECT * FROM s WHERE n = 'query_ddl_namespace'; + +-- SHOW TABLES +SHOW TABLES; +WITH s AS (SHOW TABLES) SELECT * FROM s; +WITH s AS (SHOW TABLES) SELECT * FROM s WHERE tableName = 'test_show_tables'; +WITH s(ns, tn, t) AS (SHOW TABLES) SELECT * FROM s WHERE tn = 'test_show_tables'; Review comment: OK -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org