test: migrate duckdb tests, part 1 (#6870)

* 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>
This commit is contained in:
dennis zhuang
2025-09-05 14:10:14 +08:00
committed by Weny Xu
parent 3dcd40c4ba
commit b94ce9019d
38 changed files with 2005 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
-- 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;