[
https://issues.apache.org/jira/browse/FLINK-13378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jingsong Lee updated FLINK-13378:
---------------------------------
Description:
There some problem in SingleValueAggFunction:
1.The comment in the method is "value = count == 0 ? exception : operand(0)",
but actually it need to be "value = count > 0 ? exception : operand(0)"
according to the code and logic.
2.The throwException expression should call(THROW_EXCEPTION, literal(msg),
typeLiteral(type)).
And there are some bugs to support it in blink-planner:
1.RexNodeConverter lack converter for THROW_EXCEPTION
2.PlannerExpressions lack expr to support type inference for THROW_EXCEPTION
was:
1.The comment in the method is "value = count == 0 ? exception : operand(0)",
but actually it need to be "value = count > 0 ? exception : operand(0)"
according to the code and logic.
2.And the "throwException" expression's parameter msg is never used. And if we
only think about "throwException" expression, the param "type" is the return
type of agg function or msg's type? I don't known the definition of
"throwException" expression, but I think this might be some problem.
3.If we need use param msg, the expression is call(THROW_EXCEPTION,
literal(msg, type)) or
call(THROW_EXCEPTION, literal(msg), typeLiteral(type)).
> Blink-planner not support SingleValueAggFunction
> ------------------------------------------------
>
> Key: FLINK-13378
> URL: https://issues.apache.org/jira/browse/FLINK-13378
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Affects Versions: 1.9.0, 1.10.0
> Reporter: Louis Xu
> Priority: Blocker
> Fix For: 1.9.0, 1.10.0
>
>
> There some problem in SingleValueAggFunction:
> 1.The comment in the method is "value = count == 0 ? exception : operand(0)",
> but actually it need to be "value = count > 0 ? exception : operand(0)"
> according to the code and logic.
> 2.The throwException expression should call(THROW_EXCEPTION, literal(msg),
> typeLiteral(type)).
> And there are some bugs to support it in blink-planner:
> 1.RexNodeConverter lack converter for THROW_EXCEPTION
> 2.PlannerExpressions lack expr to support type inference for THROW_EXCEPTION
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)