Skip to content

Support metadata on literal values #15797

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

Open
timsaucer opened this issue Apr 21, 2025 · 2 comments · May be fixed by #16053
Open

Support metadata on literal values #15797

timsaucer opened this issue Apr 21, 2025 · 2 comments · May be fixed by #16053
Assignees
Labels
enhancement New feature or request

Comments

@timsaucer
Copy link
Contributor

Is your feature request related to a problem or challenge?

This is a follow on to the discussion in #15646 where the user would like to have metadata specified on literal values.

Describe the solution you'd like

I do not have a specific plan in mind, but I could imaging that the literal functions that take in a scalar value could take in some optional metadata and store it. Then when the return_field_from_args gets called, the metadata would be available. I think we also should solicit some additional use case from the originator of the idea.

Describe alternatives you've considered

There is a work around where the user can write their own simple scalar UDF to handle this.

Additional context

No response

@timsaucer
Copy link
Contributor Author

I believe I've tracked the issue down to create_physical_expr in the planner. This is where we are losing metadata. I think this is a relatively easy fix.

@timsaucer
Copy link
Contributor Author

In addition to the above, we are dropping metadata during optimizer, specifically it looks like it is happening at the OptimizeProjections rule. Still investigating.

@timsaucer timsaucer self-assigned this May 9, 2025
@timsaucer timsaucer linked a pull request May 14, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant