Skip to content

[CALCITE-6813] UNNEST infers incorrect nullability for the result ... #4179

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

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

mihaibudiu
Copy link
Contributor

when applied to an array that contains nullable ROW values

…n applied to an array that contains nullable ROW values

Signed-off-by: Mihai Budiu <[email protected]>
+ " (values (ARRAY[ROW(1, 'Alice'), ROW(2, NULL), ROW(NULL, 'Bob'), NULL]))\n"
+ "select e.EXPR$0\n"
+ "from orders, UNNEST(orders.data) as e")
.type(actualType -> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if all ROW values are not nullable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you mean: "none of the values in any ROW is null."
That case was covered before. ROWs with null values were not handled correctly.

@mihaibudiu mihaibudiu merged commit 53216ad into apache:main Feb 5, 2025
17 of 18 checks passed
@mihaibudiu mihaibudiu deleted the issue6813 branch February 5, 2025 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants