You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CI failing on master: External error: query is expected to fail, but actually succeed: #7078
External error: query is expected to fail, but actually succeed:
[SQL] SELECT i - ts1 from FOO;
at tests/sqllogictests/test_files/timestamps.slt:1253
External error: query is expected to fail, but actually succeed:
[SQL] SELECT array_agg(c13 ORDER BY c1) FROM aggregate_test_100
at tests/sqllogictests/test_files/aggregate.slt:99
External error: query is expected to fail, but actually succeed:
[SQL] SELECT s.country, ARRAY_AGG(s.amount ORDER BY s.amount DESC, s.country DESC) AS amounts,
SUM(s.amount ORDER BY s.amount DESC) AS sum1
FROM sales_global AS s
GROUP BY s.country
at tests/sqllogictests/test_files/groupby.slt:2229
External error: query is expected to fail, but actually succeed:
[SQL] SELECT
SUM(c4) OVER(ORDER BY c2 RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING),
SUM(c3) OVER(ORDER BY c2 RANGE BETWEEN 10000 PRECEDING AND 10000 FOLLOWING),
COUNT(*) OVER(ORDER BY c2 RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING)
FROM aggregate_test_100
ORDER BY c9
LIMIT 5
at tests/sqllogictests/test_files/window.slt:718
# Interval - Timestamp => error
statement error DataFusion error: type_coercion\ncaused by\nError during planning: Interval\(MonthDayNano\) \- Timestamp\(Nanosecond, None\) can't be evaluated because there isn't a common type to coerce the types to
SELECT i - ts1 from FOO;
[SQL] SELECT array_agg(c13 ORDER BY c1) FROM aggregate_test_100
at tests/sqllogictests/test_files/aggregate.slt:99
External error: query is expected to fail, but actually succeed:
[SQL] SELECT i - ts1 from FOO;
at tests/sqllogictests/test_files/timestamps.slt:1253
External error: query is expected to fail, but actually succeed:
[SQL] SELECT
SUM(c4) OVER(ORDER BY c2 RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING),
SUM(c3) OVER(ORDER BY c2 RANGE BETWEEN 10000 PRECEDING AND 10000 FOLLOWING),
COUNT(*) OVER(ORDER BY c2 RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING)
FROM aggregate_test_100
ORDER BY c9
LIMIT 5
at tests/sqllogictests/test_files/window.slt:718
External error: query is expected to fail, but actually succeed:
[SQL] SELECT s.country, ARRAY_AGG(s.amount ORDER BY s.amount DESC, s.country DESC) AS amounts,
SUM(s.amount ORDER BY s.amount DESC) AS sum1
FROM sales_global AS s
GROUP BY s.country
at tests/sqllogictests/test_files/groupby.slt:2229
Error: Execution("4 failures")
error: test failed, to rerun pass `-p datafusion --test sqllogictests`
Thus I conclude this is related to a change in the upstream dependencies
psql=> create table foo (val int, ts1 timestamp, ts2 timestamp, i interval);
CREATE TABLE
psql=> SELECT i - ts1 from FOO;
ERROR: operator does not exist: interval - timestamp without time zone
LINE 1: SELECT i - ts1 from FOO;
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
Activity
alamb commentedon Jul 24, 2023
🤔 it seems like the expected error is
but now it passes somehow (on CI) 🤔
alamb commentedon Jul 24, 2023
This didn't fail for me locally until I did cargo update
Now it is failing:
Thus I conclude this is related to a change in the upstream dependencies
alamb commentedon Jul 24, 2023
https://crates.io/crates/sqllogictest/0.15.1 was released about the right timeframe
alamb commentedon Jul 24, 2023
I am pretty sure this is related to the update of sqllogictest. I can fix the issue by pinning to 0.15.0
cargo update --precise 0.15.0 -p sqllogictest Updating crates.io index Downgrading sqllogictest v0.15.1 -> v0.15.0I ran out of time today but I will fix this tomorrow morning if no one else beats me to it
Then all the tests pass
ozankabak commentedon Jul 25, 2023
That's so weird. Do you have understanding of why sqllogictest 0.15.1 breaks these tests?
jonahgao commentedon Jul 25, 2023
I think sqllogictest is right.
Some test records should be successfully executed, but they are erroneously declared as
statement error.Sqllogictest won’t check this scenario until 0.15.1.
For example:
https://github.com/apache/arrow-datafusion/blob/1a0542acbc01e5243471ae0fc3586c2f1f40013b/datafusion/core/tests/sqllogictests/test_files/aggregate.slt#L98-L100
This seems to have already been fixed by #6734.
I attempted to fix it but got blocked by the following record:
https://github.com/apache/arrow-datafusion/blob/1a0542acbc01e5243471ae0fc3586c2f1f40013b/datafusion/core/tests/sqllogictests/test_files/timestamps.slt#L1252-L1254
In the current version of Datafusion, this query can be executed successfully, but I think it should not be allowed to succeed.
It will fail to execute in PostgreSQL:
alamb commentedon Jul 25, 2023
Thanks @jonahgao -- I filed #7084 to track this issue