lava-oushudb-dt-sql-parser/test/parser/spark/syntax/fixtures/selectExplain.sql
Frank d0ad381833
test: spark sql query syntax unit test (#173)
* test: add spark query unit test and check grammar

* test: add select explain、lateralSubQuery、transform unit test

* chore: fileName exchange

---------

Co-authored-by: dilu <dilu@dtstack.com>
2023-10-10 16:25:43 +08:00

15 lines
508 B
SQL

-- EXPLAIN [ EXTENDED | CODEGEN | COST | FORMATTED ] statement
-- Default Output
EXPLAIN select k, sum(v) from values (1, 2), (1, 3) t(k, v) group by k;
-- Using Extended
EXPLAIN EXTENDED select k, sum(v) from values (1, 2), (1, 3) t(k, v) group by k;
-- https://github.com/DTStack/dt-sql-parser/issues/131
SELECT count(1) FROM tableName;
-- https://github.com/DTStack/dt-sql-parser/issues/131
DELETE FROM tableName WHERE (SELECT count(1) FROM tableName WHERE pt = '20230601') > 0 AND pt = '20230601';