You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Weijun-H (via GitHub)" <gi...@apache.org> on 2024/03/20 11:53:17 UTC
[I] `array_union` and `array_intersect` cannot handle NULL columnar data [arrow-datafusion]
Weijun-H opened a new issue, #9706:
URL: https://github.com/apache/arrow-datafusion/issues/9706
### Describe the bug
It seems that the functions `array_union` and `array_intersect` are unable to process columnar data that contains NULL values. These NULL values are being overlooked in the process.
### To Reproduce
``` bash
❯
CREATE TABLE array_intersect_table
AS VALUES
([1, 2, 2, 3], [2, 3, 4]),
([2, 3, 3], [3]),
([3], [3, 3, 4]),
(null, [3, 4]),
([1, 2], null),
(null, null)
;
0 rows in set. Query took 0.013 seconds.
❯ select array_intersect(column1, column2) from array_intersect_table;
+------------------------------------------------------------------------+
| array_intersect(array_intersect_table.column1,array_except_table.column2) |
+------------------------------------------------------------------------+
| [2, 3] |
| [3] |
| [3] |
+------------------------------------------------------------------------+
3 rows in set. Query took 0.007 seconds.
```
### Expected behavior
_No response_
### Additional context
_No response_
--
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-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `array_union` and `array_intersect` cannot handle NULL columnar data [datafusion]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey closed issue #9706: `array_union` and `array_intersect` cannot handle NULL columnar data
URL: https://github.com/apache/datafusion/issues/9706
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] `array_union` and `array_intersect` cannot handle NULL columnar data [arrow-datafusion]
Posted by "Weijun-H (via GitHub)" <gi...@apache.org>.
Weijun-H commented on issue #9706:
URL: https://github.com/apache/arrow-datafusion/issues/9706#issuecomment-2009392587
take
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `array_union` and `array_intersect` cannot handle NULL columnar data [datafusion]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on issue #9706:
URL: https://github.com/apache/datafusion/issues/9706#issuecomment-3637186217
Error is now:
```sql
DataFusion CLI v51.0.0
> CREATE TABLE array_intersect_table
AS VALUES
([1, 2, 2, 3], [2, 3, 4]),
([2, 3, 3], [3]),
([3], [3, 3, 4]),
(null, [3, 4]),
([1, 2], null),
(null, null)
;
0 row(s) fetched.
Elapsed 0.078 seconds.
> select array_intersect(column1, column2) from array_intersect_table;
Arrow error: Invalid argument error: Incorrect number of arrays provided to RowConverter, expected 1 got 0
```
Need some debugging in the implementation here:
https://github.com/apache/datafusion/blob/2a08013af3ccf703bee202c959b40bb0d35bdea1/datafusion/functions-nested/src/set_ops.rs
Add SLT tests here:
https://github.com/apache/datafusion/blob/2a08013af3ccf703bee202c959b40bb0d35bdea1/datafusion/sqllogictest/test_files/array.slt
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org