Michael Ho has posted comments on this change.

Change subject: IMPALA-1430: enable codegen for native UDAs
......................................................................


Patch Set 6:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/5161/6/be/src/exprs/agg-fn-evaluator.cc
File be/src/exprs/agg-fn-evaluator.cc:

PS6, Line 542:     
Expr::InlineConstants(AnyValUtil::ColumnTypeToTypeDesc(intermediate_type()),
             :         AnyValUtil::ColumnTypesToTypeDescs(arg_types), codegen, 
*uda_fn);
> It's not valid to call the UDF function directly with 'ctx', since it's not
I agree. There is really no clear guideline on what's "valid" here. Even if we 
set up FunctionContext correctly as a stack variable and passes its pointer to 
the UDF function, calling CastToDecimalVal() inside the UDA may still confuse 
Expr::InlineConstants().

That said, it's not specific to this change.It just appears that 
InlineConstants() is a bit fragile.


-- 
To view, visit http://gerrit.cloudera.org:8080/5161
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id1708eaa96eb76fb9bec5eeabf209f81c88eec2f
Gerrit-PatchSet: 6
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Marcel Kornacker <[email protected]>
Gerrit-Reviewer: Michael Ho
Gerrit-Reviewer: Michael Ho <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to