-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom field metadata in UDF #13458
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lewiszlw
@@ -216,6 +217,15 @@ impl ScalarUDF { | |||
self.inner.is_nullable(args, schema) | |||
} | |||
|
|||
/// Returns the field metadata for this function. | |||
pub fn metadata( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like not. This pr is for supporting custom metadata when converting scalar function expr to schema field during planing.
@@ -477,6 +487,15 @@ pub trait ScalarUDFImpl: Debug + Send + Sync { | |||
true | |||
} | |||
|
|||
/// Returns the field metadata for this function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a more detailed explanation would be useful for someone adding a new UDF to know why this method exists and what use case it is trying to solve. Without looking at this PR it's pretty opaque.
I think a test would be in order that would showcase why the new metadata method exists and what problem it solves. |
I agree. |
Marking as draft as I think this PR is no longer waiting on feedback. Please mark it as ready for review when it is ready for another look |
Which issue does this PR close?
Closes #.
Rationale for this change
In our case, we need put type data in schema metadata for supporting logical type. But there is no good way for the column generated by UDF.
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?