[
https://issues.apache.org/jira/browse/FLINK-10834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flink Jira Bot updated FLINK-10834:
-----------------------------------
Labels: auto-unassigned stale-major (was: auto-unassigned)
I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help
the community manage its development. I see this issues has been marked as
Major but is unassigned and neither itself nor its Sub-Tasks have been updated
for 30 days. I have gone ahead and added a "stale-major" to the issue". If this
ticket is a Major, please either assign yourself or give an update. Afterwards,
please remove the label or in 7 days the issue will be deprioritized.
> TableAPI flatten() calculated value error
> -----------------------------------------
>
> Key: FLINK-10834
> URL: https://issues.apache.org/jira/browse/FLINK-10834
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Reporter: sunjincheng
> Priority: Major
> Labels: auto-unassigned, stale-major
> Fix For: 1.7.3
>
>
> We have a UDF as follows:
> {code:java}
> object FuncRow extends ScalarFunction {
> def eval(v: Int): Row = {
> val version = "" + new Random().nextInt()
> val row = new Row(3)
> row.setField(0, version)
> row.setField(1, version)
> row.setField(2, version)
> row
> }
> override def isDeterministic: Boolean = false
> override def getResultType(signature: Array[Class[_]]): TypeInformation[_] =
> Types.ROW(Types.STRING, Types.STRING, Types.STRING)
> }
> {code}
> Do the following Query:
> {code:sql}
> val data = new mutable.MutableList[(Int, Long, String)]
> data.+=((1, 1L, "Hi"))
> val ds = env.fromCollection(data).toTable(tEnv, 'a, 'b,'c)
> .select(FuncRow('a).flatten()).as('v1, 'v2, 'v3)
> {code}
> The result is : -1189206469,-151367792,1988676906
> The result expected by the user should be: v1==v2==v3 .
> It looks the real reason is that there is no result of the reuse in codegen.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)