Skip to content

[SPARK-38227][SQL][SS] Apply strict nullability of nested column in time window / session window#35543

Closed
HeartSaVioR wants to merge 3 commits intoapache:masterfrom
HeartSaVioR:SPARK-38227
Closed

[SPARK-38227][SQL][SS] Apply strict nullability of nested column in time window / session window#35543
HeartSaVioR wants to merge 3 commits intoapache:masterfrom
HeartSaVioR:SPARK-38227

Conversation

@HeartSaVioR
Copy link
Contributor

@HeartSaVioR HeartSaVioR commented Feb 16, 2022

What changes were proposed in this pull request?

This PR proposes to apply strict nullability of nested column in window struct for both time window and session window, which respects the dataType of TimeWindow and SessionWindow.

Why are the changes needed?

The implementation of rule TimeWindowing and SessionWindowing have been exposed the possible risks of inconsistency between the dataType of TimeWindow/SessionWindow and the replacement. For the replacement, it is possible that analyzer/optimizer may decide the value expressions to be non-nullable.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

New tests added.

@github-actions github-actions bot added the SQL label Feb 16, 2022
@HeartSaVioR
Copy link
Contributor Author

@HeartSaVioR
Copy link
Contributor Author

It would be ideal if we have a great idea to technically prevent such case (code level, or at least runtime level like fast-fail the query) instead of adding tests to guard against. I don't know whether it is technically feasible or not, just thinking ideally.

@HeartSaVioR
Copy link
Contributor Author

cc. @cloud-fan @sigmod @viirya @xuanyuanking Friendly reminder.

@viirya
Copy link
Member

viirya commented Feb 21, 2022

Thanks. Merging to master.

@viirya viirya closed this in e2796d2 Feb 21, 2022
@HeartSaVioR
Copy link
Contributor Author

Thanks all for reviewing and merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants