Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-13191 Add a simplified UDF type extraction
  3. FLINK-26005

TableEnvironment.createTemporarySystemFunction cause NPE when using leftOuterLateralJoin

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.14.3, 1.15.0
    • None
    • Table SQL / Runtime
    • None

    Description

      When trying out the Table.leftOuterLateralJoin with a table function that was registered via TableEnvironment.createTemporarySystemFunction the system failed with

      Exception in thread "main" java.lang.NullPointerException
      	at org.apache.calcite.tools.RelBuilder$Frame.<init>(RelBuilder.java:3332)
      	at org.apache.calcite.tools.RelBuilder$Frame.<init>(RelBuilder.java:3317)
      	at org.apache.calcite.tools.RelBuilder.push(RelBuilder.java:282)
      	at org.apache.calcite.tools.RelBuilder.functionScan(RelBuilder.java:1197)
      	at org.apache.flink.table.planner.plan.QueryOperationConverter$SingleRelVisitor.visit(QueryOperationConverter.java:309)
      	at org.apache.flink.table.planner.plan.QueryOperationConverter$SingleRelVisitor.visit(QueryOperationConverter.java:154)
      	at org.apache.flink.table.operations.CalculatedQueryOperation.accept(CalculatedQueryOperation.java:94)
      	at org.apache.flink.table.planner.plan.QueryOperationConverter.defaultMethod(QueryOperationConverter.java:151)
      	at org.apache.flink.table.planner.plan.QueryOperationConverter.defaultMethod(QueryOperationConverter.java:133)
      	at org.apache.flink.table.operations.utils.QueryOperationDefaultVisitor.visit(QueryOperationDefaultVisitor.java:87)
      	at org.apache.flink.table.operations.CalculatedQueryOperation.accept(CalculatedQueryOperation.java:94)
      	at org.apache.flink.table.planner.plan.QueryOperationConverter.lambda$defaultMethod$0(QueryOperationConverter.java:150)
      	at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4390)
      	at org.apache.flink.table.planner.plan.QueryOperationConverter.defaultMethod(QueryOperationConverter.java:150)
      	at org.apache.flink.table.planner.plan.QueryOperationConverter.defaultMethod(QueryOperationConverter.java:133)
      	at org.apache.flink.table.operations.utils.QueryOperationDefaultVisitor.visit(QueryOperationDefaultVisitor.java:62)
      	at org.apache.flink.table.operations.JoinQueryOperation.accept(JoinQueryOperation.java:115)
      	at org.apache.flink.table.planner.plan.QueryOperationConverter.lambda$defaultMethod$0(QueryOperationConverter.java:150)
      	at java.base/java.util.Collections$SingletonList.forEach(Collections.java:4854)
      	at org.apache.flink.table.planner.plan.QueryOperationConverter.defaultMethod(QueryOperationConverter.java:150)
      	at org.apache.flink.table.planner.plan.QueryOperationConverter.defaultMethod(QueryOperationConverter.java:133)
      	at org.apache.flink.table.operations.utils.QueryOperationDefaultVisitor.visit(QueryOperationDefaultVisitor.java:47)
      	at org.apache.flink.table.operations.ProjectQueryOperation.accept(ProjectQueryOperation.java:76)
      	at org.apache.flink.table.planner.calcite.FlinkRelBuilder.queryOperation(FlinkRelBuilder.scala:184)
      	at org.apache.flink.table.planner.delegation.PlannerBase.translateToRel(PlannerBase.scala:214)
      	at org.apache.flink.table.planner.delegation.PlannerBase.$anonfun$translate$1(PlannerBase.scala:182)
      	at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)
      	at scala.collection.Iterator.foreach(Iterator.scala:937)
      	at scala.collection.Iterator.foreach$(Iterator.scala:937)
      	at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
      	at scala.collection.IterableLike.foreach(IterableLike.scala:70)
      	at scala.collection.IterableLike.foreach$(IterableLike.scala:69)
      	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
      	at scala.collection.TraversableLike.map(TraversableLike.scala:233)
      	at scala.collection.TraversableLike.map$(TraversableLike.scala:226)
      	at scala.collection.AbstractTraversable.map(Traversable.scala:104)
      	at org.apache.flink.table.planner.delegation.PlannerBase.translate(PlannerBase.scala:182)
      	at org.apache.flink.table.api.internal.TableEnvironmentImpl.translate(TableEnvironmentImpl.java:1665)
      	at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeQueryOperation(TableEnvironmentImpl.java:805)
      	at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeInternal(TableEnvironmentImpl.java:1274)
      	at org.apache.flink.table.api.internal.TableImpl.execute(TableImpl.java:601)
      

      Interestingly, when using the deprecated TableEnvironment.registerFunction it worked. Timo mentioned that this could be caused by a missing integration into the new type system.

      Attachments

        Activity

          People

            Unassigned Unassigned
            trohrmann Till Rohrmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: