You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dawid Wysakowicz (JIRA)" <ji...@apache.org> on 2019/04/17 07:27:00 UTC
[jira] [Closed] (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 ]
Dawid Wysakowicz closed FLINK-12217.
------------------------------------
Resolution: Fixed
Fix Version/s: 1.9.0
Fixed in 7fba616857a6a71c6a818c008e59af94bc933375
> 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
> Fix For: 1.9.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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)