Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

array_union and array_intersect cannot handle NULL columnar data #9706

Open
Weijun-H opened this issue Mar 20, 2024 · 1 comment
Open

array_union and array_intersect cannot handle NULL columnar data #9706

Weijun-H opened this issue Mar 20, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Weijun-H
Copy link
Member

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

❯ 
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

@Weijun-H Weijun-H added the bug Something isn't working label Mar 20, 2024
@Weijun-H
Copy link
Member Author

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant