You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This conversion should not be hard-coded within the ANTLR visitor. Realistically, there should be some alias field within the FnSignature that can specify any name alternatives:
With this change, the function resolution would occur at a later stage (rather than during parsing) such as during planning using the specified connector metadata.
Describe Alternatives
Leave as it is? <- Can be problematic for future UDFs that may have aliases.
Some other way to pass along aliases (e.g. previous way to pass along a map of function names to signatures). <- I think adding an alias field to the existing APIs is less confusing for the end user.
Additional Context
Add any other context about the feature request here.
DoD (Definition of Done)
Hard-coded mapping of function names in ANTLR visitor is removed
The text was updated successfully, but these errors were encountered:
Relevant Issue/Bug
None
Requested Solution/Feature
Currently in the ANTLR parser visitor, we convert function names matching
CHARACTER_LENGTH
andCHAR_LENGTH
to the function namechar_length
:partiql-lang-kotlin/partiql-parser/src/main/kotlin/org/partiql/parser/internal/PartiQLParserDefault.kt
Lines 1871 to 1872 in 2879f3a
This conversion should not be hard-coded within the ANTLR visitor. Realistically, there should be some alias field within the
FnSignature
that can specify any name alternatives:partiql-lang-kotlin/partiql-spi/src/main/kotlin/org/partiql/spi/fn/FnSignature.kt
Lines 24 to 34 in 2879f3a
We could follow what Trino does w/ their
ScalarFunction
definition (i.e. define analias
string array):https://github.com/trinodb/trino/blob/master/core/trino-spi/src/main/java/io/trino/spi/function/ScalarFunction.java#L32C14-L32C19
With this change, the function resolution would occur at a later stage (rather than during parsing) such as during planning using the specified connector metadata.
Describe Alternatives
alias
field to the existing APIs is less confusing for the end user.Additional Context
Add any other context about the feature request here.
DoD (Definition of Done)
The text was updated successfully, but these errors were encountered: