generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 181
Closed
Labels
PPLPiped processing languagePiped processing languagecalcitecalcite migration releatedcalcite migration releatedenhancementNew feature or requestNew feature or requestfeature
Description
Is your feature request related to a problem?
Before introducing Calcite, when input parameter types of a function don't match with its expected types, it will try to coerce the parameter type with the expected types.
However, such mechanism isn't in place in current implementations with Calcite. This results in multiple problems. For example:
- when input is a literal and the expected type is a date, it will not automatically coerce the literal to a date. Instead, it requires that the function supports string type as an input. (CalciteDateTimeFunctionIT.testUnixTimestampWithTimestampString)
- when the input is long and the expected type is only integer (
SqlTypeName.INTEGER), it can't resolve the function call to a known implementation.
What solution would you like?
Implement function type parameter coercion with Calcite.
What alternatives have you considered?
N/A
Do you have any additional context?
- Type coercion rule before introducing Calcite: https://github.com/opensearch-project/sql/blob/main/core/src/main/java/org/opensearch/sql/data/type/WideningTypeRule.java
- This issue is also relevant: [BUG]
CASTdoes not support casting date/time string to timestamp #3728
Metadata
Metadata
Assignees
Labels
PPLPiped processing languagePiped processing languagecalcitecalcite migration releatedcalcite migration releatedenhancementNew feature or requestNew feature or requestfeature
Type
Projects
Status
Done