mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-04 12:22:55 +00:00
* test: migrate duckdb tests Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix: style Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * test: add more duckdb tests Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix: stable order Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * chore: simplfy comments Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * chore: remove tests/cases/standalone/common/DUCKDB_MIGRATION_GUIDE.md * fix: incorrect_sql.sql Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix: integer flow test Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix: integer flow test Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * docs: add todo Signed-off-by: Dennis Zhuang <killme2008@gmail.com> --------- Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
28 lines
959 B
SQL
28 lines
959 B
SQL
-- Migrated from DuckDB test: test/sql/join/test_complex_join_expr.test
|
|
CREATE TABLE test (a INTEGER, b INTEGER, ts TIMESTAMP TIME INDEX);
|
|
|
|
INSERT INTO test VALUES (4, 1, 1000), (2, 2, 2000);
|
|
|
|
CREATE TABLE test2 (b INTEGER, c INTEGER, ts TIMESTAMP TIME INDEX);
|
|
|
|
INSERT INTO test2 VALUES (1, 2, 3000), (3, 0, 4000);
|
|
|
|
-- INNER JOIN with complex expression
|
|
SELECT * FROM test JOIN test2 ON test.a+test2.c=test.b+test2.b ORDER BY test.a;
|
|
|
|
-- LEFT JOIN with complex expression
|
|
SELECT * FROM test LEFT JOIN test2 ON test.a+test2.c=test.b+test2.b ORDER BY test.a;
|
|
|
|
-- RIGHT JOIN with complex expression
|
|
SELECT * FROM test RIGHT JOIN test2 ON test.a+test2.c=test.b+test2.b ORDER BY test.a NULLS FIRST;
|
|
|
|
-- FULL JOIN with complex expression
|
|
SELECT * FROM test FULL OUTER JOIN test2 ON test.a+test2.c=test.b+test2.b ORDER BY test.a NULLS FIRST;
|
|
|
|
-- Basic equi-join
|
|
SELECT * FROM test JOIN test2 ON test.b = test2.b ORDER BY test.a;
|
|
|
|
DROP TABLE test2;
|
|
|
|
DROP TABLE test;
|