Files
greptimedb/tests/cases/standalone/common/parser/operator_precedence.sql
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

37 lines
551 B
SQL

-- Existing operator precedence tests
SELECT 2*3+1;
SELECT 1+2*3;
SELECT 2^2 + 1;
SELECT 1+2^2;
SELECT 2*4 / 2;
SELECT 2*(4 / 2);
SELECT 16/2*4;
SELECT (16/2)*4;
SELECT 2*3*2;
SELECT 2^3*2;
SELECT 2*3^2;
-- Migrated from DuckDB test: test/sql/parser/division_operator_precedence.test
-- Additional division operator precedence tests (only standard division)
-- Division operator precedence
SELECT 6 * 1 / 2;
-- Addition and division precedence
SELECT 6 + 1 / 2;
-- More division precedence tests
SELECT 10 / 2 * 3;
SELECT 10 / (2 * 3);