Skip to content

[FEATURE] Support function parameter coercion with Calcite #3761

Closed

Description

@yuancu

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?

Activity

  1. added
    enhancement
    on Jun 10, 2025
  2. added
    calcite
    PPL
    and removed on Jun 10, 2025
  3. moved this from Not Started to Done in PPL Trackeron Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

PPLcalciteenhancementfeature

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions