Skip to content

Conversation

@beliefer
Copy link
Contributor

@beliefer beliefer commented Apr 18, 2025

What changes were proposed in this pull request?

This PR aims to remove unnecessary judgement from fillDefaultValue.

Why are the changes needed?

Currently, there is a judgement e.default == null while declaring fillDefaultValue.
After an investigation, there should not be a value of primitive type here. It might be a literal null even if users specify null as the default value.

Does this PR introduce any user-facing change?

'No'.

How was this patch tested?

GA.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the SQL label Apr 18, 2025
@beliefer beliefer changed the title [Do not Merge][SQL] Investigate default is null [SPARK-51842][SQL] Remove unnecessary judgement from fillDefaultValue Apr 18, 2025
@beliefer
Copy link
Contributor Author

ping @cloud-fan cc @viirya

@the-sakthi
Copy link
Member

LGTM barring merge conflicts.

# Conflicts:
#	sql/core/src/main/scala/org/apache/spark/sql/execution/window/WindowFunctionFrame.scala
@beliefer beliefer force-pushed the investigate-default-is-null branch from f08cace to 4199285 Compare April 30, 2025 04:31
protected val fillDefaultValue = {
// Collect the expressions and bind them.
val boundExpressions = Seq.fill(ordinal)(NoOp) ++ expressions.toImmutableArraySeq.map { e =>
if (e.default == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not clear to me why this is not possible to happen, and I don't think it's worth the time to figure it out. This null check doesn't hurt at all.

Copy link
Contributor Author

@beliefer beliefer May 8, 2025

Choose a reason for hiding this comment

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

Got it. Maybe there is a chance in future. Let's hold this PR.

@github-actions
Copy link

We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@github-actions github-actions bot added the Stale label Aug 17, 2025
@github-actions github-actions bot closed this Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants