mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-03 20:02:54 +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>
52 lines
785 B
Plaintext
52 lines
785 B
Plaintext
-- Migrated from DuckDB test: test/sql/select/test_select_qualified_view.test
|
|
-- Description: Test selecting a view through a qualified reference
|
|
CREATE SCHEMA s;
|
|
|
|
Affected Rows: 1
|
|
|
|
-- Create table with TIME INDEX for GreptimeDB
|
|
CREATE TABLE s.a(col1 STRING, ts TIMESTAMP TIME INDEX);
|
|
|
|
Affected Rows: 0
|
|
|
|
INSERT INTO s.a VALUES ('hello', 1000);
|
|
|
|
Affected Rows: 1
|
|
|
|
-- Create view
|
|
CREATE VIEW s.b AS SELECT * FROM s.a;
|
|
|
|
Affected Rows: 0
|
|
|
|
-- Test schema-qualified view reference
|
|
SELECT s.b.col1 FROM s.b;
|
|
|
|
+-------+
|
|
| col1 |
|
|
+-------+
|
|
| hello |
|
|
+-------+
|
|
|
|
-- Test table-qualified view reference
|
|
SELECT b.col1 FROM s.b;
|
|
|
|
+-------+
|
|
| col1 |
|
|
+-------+
|
|
| hello |
|
|
+-------+
|
|
|
|
-- Clean up
|
|
DROP VIEW s.b;
|
|
|
|
Affected Rows: 0
|
|
|
|
DROP TABLE s.a;
|
|
|
|
Affected Rows: 0
|
|
|
|
DROP SCHEMA s;
|
|
|
|
Affected Rows: 0
|
|
|