Skip to content
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

Normalize symbol names #21204

Merged
merged 6 commits into from
Mar 25, 2024
Merged

Normalize symbol names #21204

merged 6 commits into from
Mar 25, 2024

Conversation

martint
Copy link
Member

@martint martint commented Mar 22, 2024

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

@cla-bot cla-bot bot added the cla-signed label Mar 22, 2024
@martint martint force-pushed the ir-symbol-names branch 2 times, most recently from c14c341 to 2134474 Compare March 22, 2024 14:55
Copy link
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

i still think Symbol::Symbol should do checks as well
otherwise ir.ExpressionFormatter won't be able to assume symbol names do not contain unwanted characters.

i.e. this is about class design. if Symbol class doesn't provide guarantees, ir.ExpressionFormatter should avoid relying on these guarantees.

@martint
Copy link
Member Author

martint commented Mar 23, 2024

i still think Symbol::Symbol should do checks as well
otherwise ir.ExpressionFormatter won't be able to assume symbol names do not contain unwanted characters.

Symbol doesn't care what characters are used. If the ExpressionFormatter has constraints, it can/should escape any characters it doesn't know how to render unambiguously.

@martint martint force-pushed the ir-symbol-names branch 4 times, most recently from 9f1aee2 to fc457b2 Compare March 24, 2024 19:42
@github-actions github-actions bot added the delta-lake Delta Lake connector label Mar 24, 2024
@findepi
Copy link
Member

findepi commented Mar 24, 2024

Symbol doesn't care what characters are used. If the ExpressionFormatter has constraints, it can/should escape any characters it doesn't know how to render unambiguously.

#21223

1 similar comment
@findepi
Copy link
Member

findepi commented Mar 24, 2024

Symbol doesn't care what characters are used. If the ExpressionFormatter has constraints, it can/should escape any characters it doesn't know how to render unambiguously.

#21223

martint added 2 commits March 24, 2024 14:53
The SymbolAllocator should not have to be aware of specific
uses. It's up to the caller to decide on symbol name hint
and type.
martint added 4 commits March 24, 2024 17:02
It complicates the interface and provides very little value.
Callers can build a composite name on their own if they desire.
The connector was incorrectly relying on the engine-provided
variable name to represent the underlying column name. Variables
are synthetic names generated by the engine for the purpose of
mapping column assignments in and out of the call to the connector's
pushdown API, but they bear no relationship with the name of the
underlying columns.
Replace any sequence of non-alphanumeric with underscore.
@martint martint merged commit d24ed81 into trinodb:master Mar 25, 2024
98 checks passed
@martint martint deleted the ir-symbol-names branch March 25, 2024 18:28
@github-actions github-actions bot added this to the 444 milestone Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed delta-lake Delta Lake connector
Development

Successfully merging this pull request may close these issues.

3 participants