Skip to content

Conversation

@kumarUjjawal
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

As stated in the original issue the UDF uses the default is_nullable which is always true which is not the case.

What changes are included in this PR?

  • bit_get now reports schema using return_field_from_args
  • Added unit tests

Are these changes tested?

  • All original tests pass
  • Added new unit tests for the changes

Are there any user-facing changes?

@github-actions github-actions bot added the spark label Dec 9, 2025
@kumarUjjawal kumarUjjawal changed the title fix: derive nullability for spark bit_get fix: derive nullability for spark bit_get Dec 9, 2025
}

fn return_field_from_args(&self, args: ReturnFieldArgs) -> Result<FieldRef> {
// Spark marks bit_get as null-intolerant: result is nullable only if an input can be null
Copy link
Member

Choose a reason for hiding this comment

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

It is not that it is because of null-intolerant but because nullable is derived from the children

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would Spark derives nullability for BinaryExpression from its children be more appropriate comment?

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.

spark bit_get need to have custom nullability

2 participants