You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/04/17 04:34:00 UTC
[jira] [Updated] (FLINK-12217) OperationTreeBuilder.map() should
perform ExpressionResolver.resolve()
[ https://issues.apache.org/jira/browse/FLINK-12217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated FLINK-12217:
-----------------------------------
Labels: pull-request-available (was: )
> OperationTreeBuilder.map() should perform ExpressionResolver.resolve()
> ----------------------------------------------------------------------
>
> Key: FLINK-12217
> URL: https://issues.apache.org/jira/browse/FLINK-12217
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Reporter: Hequn Cheng
> Assignee: Hequn Cheng
> Priority: Major
> Labels: pull-request-available
>
> In {{OperationTreeBuilder.map()}}, we should resolve all LookupCallExpression for the case of java, otherwise, exceptions will be thrown.
> The following test case can reproduce the problem.
> {code:java}
> @Test
> def testMap(): Unit = {
> val util = streamTestUtil()
> val t = util.addTable[(Int, Long, String)]("Table3",'a, 'b, 'c)
> util.tableEnv.registerFunction("func", Func23)
> val t1 = t.map("func(a, b, c)")
> val t2 = t.map(Func23('a, 'b, 'c))
> verifyTableEquals(t1, t2)
> }
> {code}
> {code:java}
> org.apache.flink.table.api.ValidationException: Only ScalarFunction can be used in the map operator.
> at org.apache.flink.table.operations.OperationTreeBuilder.map(OperationTreeBuilder.scala:355)
> at org.apache.flink.table.api.TableImpl.map(tableImpl.scala:461)
> at org.apache.flink.table.api.TableImpl.map(tableImpl.scala:457)
> at org.apache.flink.table.api.stream.table.stringexpr.CalcStringExpressionTest.testMap(CalcStringExpressionTest.scala:178)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)