[
https://issues.apache.org/jira/browse/BEAM-7724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16898388#comment-16898388
]
sridhar Reddy commented on BEAM-7724:
-------------------------------------
[~amaliujia] Can you please clarify the code you are referring to?
if you are referring to the following.(Line 381)
-----------
private InputGetterImpl(Expression input, Schema inputSchema) {
*this.input = input; <---------------*
this.inputSchema = inputSchema;
}
--------------
I am not sure if we can insert a cast expression as input only contains the
following and do not believe the "Blockstatement" is formed yet.
(org.apache.beam.sdk.values.Row) c.element()
if you are referring to the following method (Line 386)
-------------
public Expression field(BlockBuilder list, int index, Type storageType) {
return value(list, index, storageType, input, inputSchema);
}
------------
I do not believe that method gets called for the test we are using whiich is
"select TESTFN(CAST(NULL AS VARCHAR)) from PCOLLECTION"
> 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)