Files
greptimedb/tests/cases/standalone/common/select/schema_reference.result
dennis zhuang 24e5c9f6da 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>
2025-09-05 06:10:14 +00:00

39 lines
706 B
Plaintext

-- Migrated from DuckDB test: test/sql/select/test_schema_reference.test
-- Description: Test schema reference in column reference
CREATE SCHEMA s1;
Affected Rows: 1
CREATE TABLE s1.tbl(i INTEGER, ts TIMESTAMP TIME INDEX);
Affected Rows: 0
INSERT INTO s1.tbl VALUES (1, 1000), (2, 2000);
Affected Rows: 2
-- Standard schema reference: schema.table.column
SELECT s1.tbl.i FROM s1.tbl ORDER BY i;
+---+
| i |
+---+
| 1 |
| 2 |
+---+
-- Test schema mismatch error - should fail
SELECT s2.tbl.i FROM s1.tbl;
Error: 3000(PlanQuery), Failed to plan SQL: No field named s2.tbl.i. Valid fields are s1.tbl.i, s1.tbl.ts.
-- Clean up
DROP TABLE s1.tbl;
Affected Rows: 0
DROP SCHEMA s1;
Affected Rows: 0