mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-08-18 03:58:29 +00:00
chore: bump datafusion version to fix last_value regression (#4169)
* chore: bump datafusion version to fix `last_value` regression * fix: resolve PR comments * fix ci
This commit is contained in:
@@ -64,6 +64,38 @@ SELECT ISNULL('string');
|
||||
| false |
|
||||
+------------------------+
|
||||
|
||||
SELECT FIRST_VALUE(1);
|
||||
|
||||
+-----------------------+
|
||||
| first_value(Int64(1)) |
|
||||
+-----------------------+
|
||||
| 1 |
|
||||
+-----------------------+
|
||||
|
||||
SELECT FIRST_VALUE('a');
|
||||
|
||||
+------------------------+
|
||||
| first_value(Utf8("a")) |
|
||||
+------------------------+
|
||||
| a |
|
||||
+------------------------+
|
||||
|
||||
SELECT LAST_VALUE(1);
|
||||
|
||||
+----------------------+
|
||||
| last_value(Int64(1)) |
|
||||
+----------------------+
|
||||
| 1 |
|
||||
+----------------------+
|
||||
|
||||
SELECT LAST_VALUE('a');
|
||||
|
||||
+-----------------------+
|
||||
| last_value(Utf8("a")) |
|
||||
+-----------------------+
|
||||
| a |
|
||||
+-----------------------+
|
||||
|
||||
DROP TABLE t;
|
||||
|
||||
Affected Rows: 0
|
||||
|
||||
@@ -16,4 +16,12 @@ SELECT ISNULL(true);
|
||||
|
||||
SELECT ISNULL('string');
|
||||
|
||||
SELECT FIRST_VALUE(1);
|
||||
|
||||
SELECT FIRST_VALUE('a');
|
||||
|
||||
SELECT LAST_VALUE(1);
|
||||
|
||||
SELECT LAST_VALUE('a');
|
||||
|
||||
DROP TABLE t;
|
||||
|
||||
@@ -231,7 +231,11 @@ SELECT ts, host, count(distinct *) RANGE '5s' FROM host ALIGN '5s' ORDER BY host
|
||||
-- Test error first_value/last_value
|
||||
SELECT ts, host, first_value(val, val) RANGE '5s' FROM host ALIGN '5s' ORDER BY host, ts;
|
||||
|
||||
Error: 3001(EngineExecuteQuery), DataFusion error: Error during planning: Coercion from [Int64, Int64] to the signature OneOf([ArraySignature(Array), Uniform(1, [Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float32, Float64])]) failed.
|
||||
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Error during planning: Coercion from [Int64, Int64] to the signature OneOf([ArraySignature(Array), Numeric(1), Uniform(1, [Utf8])]) failed. and No function matches the given name and argument types 'first_value(Int64, Int64)'. You might need to add explicit type casts.
|
||||
Candidate functions:
|
||||
first_value(array)
|
||||
first_value(Numeric(1))
|
||||
first_value(Utf8)
|
||||
|
||||
DROP TABLE host;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ SELECT arrow_typeof(FIRST_VALUE('0.1'::DECIMAL(4,1)));
|
||||
+----------------------------------------+
|
||||
| arrow_typeof(first_value(Utf8("0.1"))) |
|
||||
+----------------------------------------+
|
||||
| Float64 |
|
||||
| Decimal128(4, 1) |
|
||||
+----------------------------------------+
|
||||
|
||||
-- first_value
|
||||
@@ -18,7 +18,7 @@ SELECT FIRST_VALUE(NULL::DECIMAL),
|
||||
+-------------------+--------------------------+--------------------------------+------------------------------------------+--------------------------------------------------------------+
|
||||
| first_value(NULL) | first_value(Utf8("0.1")) | first_value(Utf8("4938245.1")) | first_value(Utf8("45672564564938245.1")) | first_value(Utf8("4567645908450368043562342564564938245.1")) |
|
||||
+-------------------+--------------------------+--------------------------------+------------------------------------------+--------------------------------------------------------------+
|
||||
| | 0.1 | 4938245.1 | 4.567256456493825e16 | 4.567645908450368e36 |
|
||||
| | 0.1 | 4938245.1 | 45672564564938245.1 | 4567645908450368043562342564564938245.1 |
|
||||
+-------------------+--------------------------+--------------------------------+------------------------------------------+--------------------------------------------------------------+
|
||||
|
||||
-- min
|
||||
|
||||
@@ -277,9 +277,9 @@ This was likely caused by a bug in DataFusion's code and we would welcome that y
|
||||
|
||||
SELECT SUM(interval_value) from intervals;
|
||||
|
||||
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: No function matches the given name and argument types 'SUM(Interval(MonthDayNano))'. You might need to add explicit type casts.
|
||||
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Execution error: User-defined coercion failed with Execution("Sum not supported for Interval(MonthDayNano)") and No function matches the given name and argument types 'SUM(Interval(MonthDayNano))'. You might need to add explicit type casts.
|
||||
Candidate functions:
|
||||
SUM(Int8/Int16/Int32/Int64/UInt8/UInt16/UInt32/UInt64/Float32/Float64)
|
||||
SUM(UserDefined)
|
||||
|
||||
SELECT AVG(interval_value) from intervals;
|
||||
|
||||
|
||||
@@ -75,9 +75,9 @@ SELECT MAX(t) FROM timestamp;
|
||||
|
||||
SELECT SUM(t) FROM timestamp;
|
||||
|
||||
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: No function matches the given name and argument types 'SUM(Timestamp(Millisecond, None))'. You might need to add explicit type casts.
|
||||
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Execution error: User-defined coercion failed with Execution("Sum not supported for Timestamp(Millisecond, None)") and No function matches the given name and argument types 'SUM(Timestamp(Millisecond, None))'. You might need to add explicit type casts.
|
||||
Candidate functions:
|
||||
SUM(Int8/Int16/Int32/Int64/UInt8/UInt16/UInt32/UInt64/Float32/Float64)
|
||||
SUM(UserDefined)
|
||||
|
||||
SELECT AVG(t) FROM timestamp;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user