Skip to content

Conversation

@gabotechs
Copy link
Collaborator

@gabotechs gabotechs commented Oct 22, 2025

When a UDF was inside a Partitioning field, we were failing to deserialize it as there we have a recently built SessionContext with no notion of UDFs.

This is a limitation of DF APIs that will be addressed in future releases, but for now, this fix should be enough.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This test replicates the issue and ensures it never happens again.

Copy link
Collaborator

@NGA-TRAN NGA-TRAN left a comment

Choose a reason for hiding this comment

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

LGTM, assuming the UDF is consistently registered using with_scalar_functions.

let state = SessionStateBuilder::new()
.with_scalar_functions(
registry
.udfs()
Copy link
Collaborator

@NGA-TRAN NGA-TRAN Oct 22, 2025

Choose a reason for hiding this comment

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

Question: is UDF always registered with with_scalar_functions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think there's other ways of registering them, but they are pretty much aliases to this one, all will result in the same: a SessionContext with some UDFs in it.

@gabotechs gabotechs merged commit a94a214 into main Oct 22, 2025
4 checks passed
@gabotechs gabotechs deleted the fix-udfs-encoding branch October 22, 2025 14:50
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.

4 participants