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

User-defined function with Date or Timestamp parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.0-incubating
    • 1.6.0
    • core
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: