Skip to content

Conversation

@Kimahriman
Copy link
Contributor

What changes were proposed in this pull request?

Fix a test that is failing from backporting #47941

Why are the changes needed?

Fix test

Does this PR introduce any user-facing change?

No

How was this patch tested?

Fixed test

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

No

@Kimahriman Kimahriman changed the title [SPARK-49476][SQL][FOLLOWUP] Fix base64 proto test [SPARK-49476][SQL][3.5][FOLLOWUP] Fix base64 proto test Sep 3, 2024
yaooqinn pushed a commit that referenced this pull request Sep 3, 2024
### What changes were proposed in this pull request?

Fix a test that is failing from backporting #47941

### Why are the changes needed?

Fix test

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Fixed test

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

No

Closes #47964 from Kimahriman/base64-proto-test.

Authored-by: Adam Binford <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
@yaooqinn yaooqinn closed this Sep 3, 2024
@yaooqinn
Copy link
Member

yaooqinn commented Sep 3, 2024

Merged to branch-3.5. Thank you @Kimahriman

turboFei pushed a commit to turboFei/spark that referenced this pull request Nov 6, 2025
* [SPARK-49476][SQL] Fix nullability of base64 function

### What changes were proposed in this pull request?

Fix the nullability of the `Base64` expression to be based on the child's nullability, and not always be nullable.

### Why are the changes needed?

apache#47303 had a side effect of changing the nullability by the switch to using `StaticInvoke`. This was also backported to Spark 3.5.2 and caused schema mismatch errors for stateful streams when we upgraded. This restores the previous behavior which is supported by StaticInvoke through the `returnNullable` argument. If the child is non-nullable, we know the result will be non-nullable.

### Does this PR introduce _any_ user-facing change?

Restores the nullability of the `Base64` expression to what is was in Spark 3.5.1 and earlier.

### How was this patch tested?

New UT

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

No

Closes apache#47941 from Kimahriman/base64-nullability.

Lead-authored-by: Adam Binford <[email protected]>
Co-authored-by: Maxim Gekk <[email protected]>
Signed-off-by: Max Gekk <[email protected]>
(cherry picked from commit c274c5a)
Signed-off-by: Max Gekk <[email protected]>

* [SPARK-49476][SQL][3.5][FOLLOWUP] Fix base64 proto test

### What changes were proposed in this pull request?

Fix a test that is failing from backporting apache#47941

### Why are the changes needed?

Fix test

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Fixed test

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

No

Closes apache#47964 from Kimahriman/base64-proto-test.

Authored-by: Adam Binford <[email protected]>
Signed-off-by: Kent Yao <[email protected]>

* [SPARK-49476][SQL][3.5][FOLLOWUP] Fix base64 proto test

### What changes were proposed in this pull request?

Fix a test that is failing from backporting apache#47941

### Why are the changes needed?

Fix test

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Fixed test

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

No

Closes apache#47964 from Kimahriman/base64-proto-test.

Authored-by: Adam Binford <[email protected]>
Signed-off-by: Kent Yao <[email protected]>

---------

Signed-off-by: Max Gekk <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
Co-authored-by: Adam Binford <[email protected]>
Co-authored-by: Maxim Gekk <[email protected]>
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.

2 participants