Denys Fakhritdinov created FLINK-11104:
------------------------------------------ Summary: LEFT JOIN with Table Function not working Key: FLINK-11104 URL: https://issues.apache.org/jira/browse/FLINK-11104 Project: Flink Issue Type: Bug Affects Versions: 1.7.0 Reporter: Denys Fakhritdinov Example from docs [https://ci.apache.org/projects/flink/flink-docs-release-1.7/dev/table/udfs.html] failed with exception. SQL: {code:java} SELECT name, word, length FROM example LEFT JOIN TABLE(split(name)) AS T(word, length) ON TRUE{code} Log: {code:java} error] Exception in thread "main" org.apache.flink.table.api.ValidationException: SQL validation failed. From line 1, column 62 to line 1, column 65: Column 'name' not found in any table [error] at org.apache.flink.table.calcite.FlinkPlannerImpl.validate(FlinkPlannerImpl.scala:109) [error] at org.apache.flink.table.api.TableEnvironment.sqlQuery(TableEnvironment.scala:746) [error] at example.ExampleApp$.delayedEndpoint$example$ExampleApp$1(ExampleApp.scala:27) [error] at example.ExampleApp$delayedInit$body.apply(ExampleApp.scala:10) [error] at scala.Function0.apply$mcV$sp(Function0.scala:39) [error] at scala.Function0.apply$mcV$sp$(Function0.scala:39) [error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17) [error] at scala.App.$anonfun$main$1$adapted(App.scala:80) [error] at scala.collection.immutable.List.foreach(List.scala:392) [error] at scala.App.main(App.scala:80) [error] at scala.App.main$(App.scala:78) [error] at example.ExampleApp$.main(ExampleApp.scala:10) [error] at example.ExampleApp.main(ExampleApp.scala) [error] Caused by: org.apache.calcite.runtime.CalciteContextException: From line 1, column 62 to line 1, column 65: Column 'name' not found in any table [error] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [error] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [error] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [error] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [error] at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:463) [error] at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:783) [error] at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:768) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.newValidationError(SqlValidatorImpl.java:4759) [error] at org.apache.calcite.sql.validate.DelegatingScope.fullyQualify(DelegatingScope.java:259) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl$DeriveTypeVisitor.visit(SqlValidatorImpl.java:5507) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl$DeriveTypeVisitor.visit(SqlValidatorImpl.java:5470) [error] at org.apache.calcite.sql.SqlIdentifier.accept(SqlIdentifier.java:334) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.deriveTypeImpl(SqlValidatorImpl.java:1629) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.deriveType(SqlValidatorImpl.java:1614) [error] at org.apache.calcite.sql.SqlCallBinding.getOperandType(SqlCallBinding.java:237) [error] at org.apache.flink.table.functions.utils.UserDefinedFunctionUtils$.$anonfun$getOperandTypeInfo$1(UserDefinedFunctionUtils.scala:771) [error] at org.apache.flink.table.functions.utils.UserDefinedFunctionUtils$.$anonfun$getOperandTypeInfo$1$adapted(UserDefinedFunctionUtils.scala:770) [error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:237) [error] at scala.collection.immutable.Range.foreach(Range.scala:158) [error] at scala.collection.TraversableLike.map(TraversableLike.scala:237) [error] at scala.collection.TraversableLike.map$(TraversableLike.scala:230) [error] at scala.collection.AbstractTraversable.map(Traversable.scala:108) [error] at org.apache.flink.table.functions.utils.UserDefinedFunctionUtils$.getOperandTypeInfo(UserDefinedFunctionUtils.scala:770) [error] at org.apache.flink.table.functions.utils.UserDefinedFunctionUtils$$anon$2.inferOperandTypes(UserDefinedFunctionUtils.scala:396) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.inferUnknownTypes(SqlValidatorImpl.java:1798) [error] at org.apache.calcite.sql.validate.ProcedureNamespace.validateImpl(ProcedureNamespace.java:52) [error] at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:967) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:943) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:3029) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:3014) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.validateJoin(SqlValidatorImpl.java:3066) [error] at org.apache.flink.table.calcite.FlinkCalciteSqlValidator.validateJoin(FlinkCalciteSqlValidator.scala:67) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:3023) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:3273) [error] at org.apache.calcite.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:60) [error] at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:967) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:943) [error] at org.apache.calcite.sql.SqlSelect.validate(SqlSelect.java:225) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:918) [error] at org.apache.calcite.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:628) [error] at org.apache.flink.table.calcite.FlinkPlannerImpl.validate(FlinkPlannerImpl.scala:105) [error] ... 12 more [error] Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Column 'name' not found in any table [error] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [error] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [error] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [error] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [error] at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:463) [error] at org.apache.calcite.runtime.Resources$ExInst.ex(Resources.java:572) [error] ... 50 more [error] Nonzero exit code returned from runner: 1 [error] (Compile / run) Nonzero exit code returned from runner: 1 [error] Total time: 6 s, completed Dec 7, 2018 3:41:52 PM {code} Example app: [https://github.com/dfahritdinov/flink-issue/] Running example app: {code:java} sbt run {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) |
Free forum by Nabble | Edit this page |