Kimahriman commented on code in PR #13683: URL: https://github.com/apache/datafusion/pull/13683#discussion_r1876235091
########## datafusion/sqllogictest/test_files/array.slt: ########## @@ -5260,6 +5270,13 @@ select array_has([], null), ---- NULL NULL NULL +# If lhs is has any Nulls, we return Null instead of false +query BB +select array_has([1, null, 2], 3), Review Comment: Turns out the existing "correct" behavior for scalars doesn't match DuckDB either, which never returns null unless the whole array is null DuckDB ``` D select array_has([null, null], 4); ┌───────────────────────────────────────────┐ │ array_has(main.list_value(NULL, NULL), 4) │ │ boolean │ ├───────────────────────────────────────────┤ │ false │ └───────────────────────────────────────────┘ ``` DF ``` DataFusion CLI v43.0.0 > select array_has([null, null], 4); +-------------------------------------------+ | array_has(make_array(NULL,NULL),Int64(4)) | +-------------------------------------------+ | | +-------------------------------------------+ 1 row(s) fetched. Elapsed 0.001 seconds. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org