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

Not applicable functions for TIME

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Table API & SQL
    • Labels:
      None

      Description

      Due to work on https://issues.apache.org/jira/browse/FLINK-9432 I have faced with question how to check DECADE function with tests in

      org/apache/flink/table/expressions/validation/ScalarFunctionsValidationTest.scala.

      Because I have used CENTURY function as an example, first of all I have check it. During the test I figured out that when we use it with TIME it returns 0.
      I suppose arguments for such functions (also it works for YEAR, MONTH, MILLENNIUM, etc) need to be checked and throw some exception if type is not suitable.

      As an example, in Apache Calcite project (checked in sqlline shell), when I am trying to use CENTURY with TIME it throw:

      java.lang.AssertionError: unexpected TIME
      

      Need to determine, why such check is not exists and add it.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bioker Viktor Vlasov
                Reporter:
                bioker Viktor Vlasov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: