Skip to content

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

Merged
mihaibudiu merged 1 commit intoapache:mainfrom
mihaibudiu:issue6813
Feb 5, 2025
Merged

[CALCITE-6813] UNNEST infers incorrect nullability for the result ...#4179
mihaibudiu merged 1 commit intoapache:mainfrom
mihaibudiu:issue6813

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 <mbudiu@feldera.com>
+ " (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 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