Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-10014

Fix the decimal literal parameter problem for arithmetic functions in Table

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Table SQL / API
    • Labels:
      None

      Description

      Most of the arithmetic functions added in Flink only consider double type parameters (e.g., def log(base: Double, x: Double): Double =...). However, by Calcite, the decimal literals are automatically cast to BigDecimal, which cannot be directly applied (e.g., LOG(3.0, 9.0) throws an unsupported call exception). Explicit type cast can make these functions accessible but seems not an elegant solution.

      We could consider automatically casting the BigDecimal type to Double or adding the corresponding methods for BigDecimal type.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              xccui Xingcan Cui
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: