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

throw not a literal exception in callContext.getArgumentValue when getTypeInference

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.14.2
    • None
    • Table SQL / API
    • None

    Description

       

      //代码占位符
      tableEnvironment.createTemporaryFunction("ROUNDX", RoundX.class);
      tableEnvironment.createTemporaryFunction("NVL", Nvl.class);
      tableEnvironment.executeSql("select ROUNDX( CAST(1.12345 as decimal(10,3)),NVL(MAX(f0),2) ) from t1").print();
      
      // exception
      Exception in thread "main" java.lang.AssertionError: not a literal: NVL($0, 2)
      
      // trace
      // `NVL` is a scalarFunction that likes oracle nvl function. And this exception might be thrown from this code in my  `getTypeInference` function of ROUNDX scalarFunction.
      Optional<Integer> secondValue = callContext.getArgumentValue(1, Integer.class);

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            SpongebobZ Spongebob
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: