Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-986

User-defined function with Date or Timestamp parameters

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0-incubating
    • Fix Version/s: 1.6.0
    • Component/s: core
    • Labels:
      None

      Description

      the field type is date and I want to realize the MY_FUNC(date)

      I use JavaTypeFactory.createSqlType to define the columns

      SQL : select MY_FUNC(date) from table;

      if I set my function's argument type to java.sql.Date, calcite will report Exception:

      /Caused by: org.codehaus.commons.compiler.CompileException: Line 124, Column 45: No applicable constructor/method found for actual parameters "int"; /

      if I set the function's argument type to int, calcite will report Exception:

      _/Caused by: org.apache.calcite.sql.validate.SqlValidatorException: No match found for function signature MY_FUNCTION(<DATE>)/

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                Droopyhu Wei Hu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: