chore: cleanup some TODO items in sqllogictests#23382
Conversation
| query error array_empty does not support type Null | ||
| select empty(NULL); |
There was a problem hiding this comment.
its better for it to run to an error so when we fix it later we'll know to also fix this here
|
|
||
| # DuckDB: [[]] | ||
| # ClickHouse: [[]] | ||
| # TODO: We may also return [[]] |
There was a problem hiding this comment.
seems we already return this
|
|
||
| # TODO: Drop schema for cleanup, see #6027 | ||
| # statement ok | ||
| # DROP SCHEMA foo_schema; |
There was a problem hiding this comment.
tested later in the file now
datafusion/datafusion/sqllogictest/test_files/ddl.slt
Lines 772 to 776 in f34a676
| # Sanity test - comparing <=> with equivalent expression | ||
| query B | ||
| SELECT | ||
| (column1 <=> column2) = |
There was a problem hiding this comment.
my editor was removing some trailing whitespace so decided to leave that little cleanup in as well
nuno-faria
left a comment
There was a problem hiding this comment.
Thanks @Jefffrey, LGTM. I double checked some of these with DuckDB and they appear ok. I leave some suggestions below.
| query error array_has does not support type 'Null' | ||
| select array_has_any([], null), | ||
| array_has_any([1, 2, 3], null), | ||
| array_has_all([], null), | ||
| array_has_all([1, 2, 3], null); |
There was a problem hiding this comment.
Should these return null, like the select array_distinct(null); above or like in DuckDB? If so, we could split this into two tests, since array_has_any already does not return an error.
| # TODO: support complex index | ||
| # multiple index with columns #4 (complex index) | ||
| # query III | ||
| # select make_array(1, 2, 3)[2 + 1 - 1:10], make_array(1.0, 2.0, 3.0)[2 | 2:10], make_array('h', 'e', 'l', 'l', 'o')[6 ^ 6:10]; | ||
| # ---- |
There was a problem hiding this comment.
This test works if we convert [2 | 2:10] to [(2 | 2):10]:
> select make_array(1, 2, 3)[2 + 1 - 1:10], make_array(1.0, 2.0, 3.0)[(2 | 2):10], make_array('h', 'e', 'l', 'l', 'o')[6 ^ 6:10];
+-------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
| make_array(Int64(1),Int64(2),Int64(3))[Int64(2) + Int64(1) - Int64(1):Int64(10):Int64(1)] | make_array(Float64(1),Float64(2),Float64(3))[Int64(2) | Int64(2):Int64(10):Int64(1)] | make_array(Utf8("h"),Utf8("e"),Utf8("l"),Utf8("l"),Utf8("o"))[Int64(6) BIT_XOR Int64(6):Int64(10):Int64(1)] |
+-------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
| [2, 3] | [2.0, 3.0] | [h, e, l, l, o] |
+-------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+I don't know if the idea is for it to work without them.
Cleaning some outdated TODO items or updating the queries so they at least run (even if result is incorrect)