[
https://issues.apache.org/jira/browse/BEAM-7724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16897502#comment-16897502
]
sridhar Reddy commented on BEAM-7724:
-------------------------------------
[~amaliujia] After debugging the issue I believe there is directly no way to
address this issue in Beam Repo. I couldn't really pinpoint the code which
converts to
CAST(NULL AS VARCHAR) to a null constant but I firmly believe this happens
within Calcite code.
I also verified if the [string
generated|[https://github.com/apache/beam/blob/master/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamCalcRel.java#L197]]
by builder.toBlock().toString() manipulated to have the form (String) null the
janino compiler doesn't complain.
I guess the workaround, for now, is to not overload the udfs.
Please let me know if you have any additional thoughts. At this point I would
like to close this Jira with will not fix resolution.
> Codegen should cast(null) to a type to match exact function signature
> ---------------------------------------------------------------------
>
> Key: BEAM-7724
> URL: https://issues.apache.org/jira/browse/BEAM-7724
> Project: Beam
> Issue Type: Improvement
> Components: dsl-sql
> Reporter: Rui Wang
> Assignee: sridhar Reddy
> Priority: Major
>
> If there are two function signatures for the same function name, when input
> parameter is null, Janino will throw exception due to vagueness:
> A(String)
> A(Integer)
> Janino does not know how to match A(null).
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)