Files
greptimedb/tests/cases/standalone/common/order/limit.result
LFC 314f2704d4 build(deps): update datafusion to latest and arrow to 51.0 (#3661)
* chore: update datafusion

* update sqlness case of time.sql

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix: adjust range query partition

* fix: hisogram incorrect result

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix: ignore filter pushdown temporarily

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix: update limit sqlness result

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix: histogram with wrong distribution

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix: update negative ordinal sqlness case

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* feat: bump df to cd7a00b

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* resolve conflicts

* ignore test_range_filter

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix promql exec panic

* fix "select count(*)" exec error

* re-enable the "test_range_filter" test since the filter push down seems not necessary to be removed

* fix: range query schema error

* update sqlness results

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* resolve conflicts

* update datafusion, again

* fix pyo3 compile error, and update some sqlness results

* update decimal sqlness cases

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix: promql literal

* fix udaf tests

* fix filter pushdown sqlness tests

* fix?: test_cast

* fix: rspy test fail due to datafusion `sin` signature change

* rebase main to see if there are any failed tests

* debug ci

* debug ci

* debug ci

* enforce input partition

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* debug ci

* fix ci

* fix ci

* debug ci

* debug ci

* debug ci

* fix sqlness

* feat: do not return error while creating a filter

* chore: remove array from error

* chore: replace todo with unimplemented

* Update src/flow/clippy.toml

Co-authored-by: Yingwen <realevenyag@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
Co-authored-by: WUJingdi <taylor-lagrange@qq.com>
Co-authored-by: discord9 <discord9@163.com>
Co-authored-by: evenyag <realevenyag@gmail.com>
Co-authored-by: tison <wander4096@gmail.com>
2024-04-18 12:07:18 +00:00

138 lines
3.8 KiB
Plaintext

CREATE TABLE test (a TIMESTAMP TIME INDEX, b INTEGER);
Affected Rows: 0
INSERT INTO test VALUES (11, 22), (12, 21), (13, 22);
Affected Rows: 3
SELECT a FROM test LIMIT 1;
+-------------------------+
| a |
+-------------------------+
| 1970-01-01T00:00:00.011 |
+-------------------------+
SELECT a FROM test LIMIT 1.25;
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in LIMIT clause
SELECT a FROM test LIMIT 2-1;
+-------------------------+
| a |
+-------------------------+
| 1970-01-01T00:00:00.011 |
+-------------------------+
SELECT a FROM test LIMIT a;
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in LIMIT clause
SELECT a FROM test LIMIT a+1;
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in LIMIT clause
SELECT a FROM test LIMIT SUM(42);
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in LIMIT clause
SELECT a FROM test LIMIT row_number() OVER ();
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in LIMIT clause
CREATE TABLE test2 (a STRING, ts TIMESTAMP TIME INDEX);
Affected Rows: 0
INSERT INTO test2 VALUES ('Hello World', 1);
Affected Rows: 1
SELECT * FROM test2 LIMIT 3;
+-------------+-------------------------+
| a | ts |
+-------------+-------------------------+
| Hello World | 1970-01-01T00:00:00.001 |
+-------------+-------------------------+
select 1 limit date '1992-01-01';
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in LIMIT clause
CREATE TABLE integers(i TIMESTAMP TIME INDEX);
Affected Rows: 0
INSERT INTO integers VALUES (1), (2), (3), (4), (5);
Affected Rows: 5
SELECT * FROM integers LIMIT 3;
+-------------------------+
| i |
+-------------------------+
| 1970-01-01T00:00:00.001 |
| 1970-01-01T00:00:00.002 |
| 1970-01-01T00:00:00.003 |
+-------------------------+
SELECT * FROM integers LIMIT 4;
+-------------------------+
| i |
+-------------------------+
| 1970-01-01T00:00:00.001 |
| 1970-01-01T00:00:00.002 |
| 1970-01-01T00:00:00.003 |
| 1970-01-01T00:00:00.004 |
+-------------------------+
SELECT * FROM integers as int LIMIT (SELECT MIN(integers.i) FROM integers);
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in LIMIT clause
SELECT * FROM integers as int OFFSET (SELECT MIN(integers.i) FROM integers);
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in OFFSET clause
SELECT * FROM integers as int LIMIT (SELECT MAX(integers.i) FROM integers) OFFSET (SELECT MIN(integers.i) FROM integers);
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in OFFSET clause
SELECT * FROM integers as int LIMIT (SELECT max(integers.i) FROM integers where i > 5);
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in LIMIT clause
SELECT * FROM integers as int LIMIT (SELECT max(integers.i) FROM integers where i > 5);
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in LIMIT clause
SELECT * FROM integers as int LIMIT (SELECT NULL);
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in LIMIT clause
SELECT * FROM integers as int LIMIT (SELECT -1);
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in LIMIT clause
SELECT * FROM integers as int LIMIT (SELECT 'ab');
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Unexpected expression in LIMIT clause
DROP TABLE integers;
Affected Rows: 0
DROP TABLE test;
Affected Rows: 0
DROP TABLE test2;
Affected Rows: 0