mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-17 02:32:56 +00:00
* 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>
77 lines
1.4 KiB
Plaintext
77 lines
1.4 KiB
Plaintext
SELECT SUM(number) FROM numbers;
|
|
|
|
+---------------------+
|
|
| SUM(numbers.number) |
|
|
+---------------------+
|
|
| 4950 |
|
|
+---------------------+
|
|
|
|
SELECT SUM(1) FROM numbers;
|
|
|
|
+---------------+
|
|
| SUM(Int64(1)) |
|
|
+---------------+
|
|
| 100 |
|
|
+---------------+
|
|
|
|
SELECT SUM(-1) FROM numbers;
|
|
|
|
+----------------+
|
|
| SUM(Int64(-1)) |
|
|
+----------------+
|
|
| -100 |
|
|
+----------------+
|
|
|
|
SELECT SUM(-1) FROM numbers WHERE number=-1;
|
|
|
|
Error: 3001(EngineExecuteQuery), DataFusion error: Cast error: Can't cast value -1 to type UInt32
|
|
|
|
SELECT SUM(-1) FROM numbers WHERE number>10000 limit 1000;
|
|
|
|
+----------------+
|
|
| SUM(Int64(-1)) |
|
|
+----------------+
|
|
| |
|
|
+----------------+
|
|
|
|
CREATE TABLE bigints(b bigint, ts TIMESTAMP TIME INDEX);
|
|
|
|
Affected Rows: 0
|
|
|
|
INSERT INTO bigints values (4611686018427387904, 1), (4611686018427388904, 2), (1, 3);
|
|
|
|
Affected Rows: 3
|
|
|
|
SELECT SUM(b) FROM bigints;
|
|
|
|
+----------------------+
|
|
| SUM(bigints.b) |
|
|
+----------------------+
|
|
| -9223372036854774807 |
|
|
+----------------------+
|
|
|
|
CREATE TABLE doubles(n DOUBLE, ts TIMESTAMP TIME INDEX);
|
|
|
|
Affected Rows: 0
|
|
|
|
INSERT INTO doubles (n, ts) VALUES (9007199254740992, 1), (1, 2), (1, 3), (0, 4);
|
|
|
|
Affected Rows: 4
|
|
|
|
SELECT sum(n) from doubles;
|
|
|
|
+--------------------+
|
|
| SUM(doubles.n) |
|
|
+--------------------+
|
|
| 9007199254740992.0 |
|
|
+--------------------+
|
|
|
|
DROP TABLE bigints;
|
|
|
|
Affected Rows: 0
|
|
|
|
DROP TABLE doubles;
|
|
|
|
Affected Rows: 0
|
|
|