impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-1430: enable codegen for native UDAs
Date Thu, 19 Jan 2017 00:38:37 GMT
Tim Armstrong has posted comments on this change.

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

Patch Set 10:

File be/src/exprs/

PS10, Line 539:     // The last (in/out) argument is exposed to UDAs via the FunctionContext
as the
              :     // return type, rather than as the last argument type. Constant inlining
              :     // therefore expose it in the same way.
> May help to add a remark in about the assumption 
I realised that FunctionContext is probably the right place to document this (since it's really
the contract of GetReturnType() and friends). So I briefly augmented some of the comments
there to mention UDA args.

When reading those comments I realised that there was a bug here - GetReturnType() is documented
to return the return type of Finalize() rather than the intermediate type. I fixed that here
and filed IMPALA-4785 to add constant propagation for intermediate_type().
File be/src/exprs/scalar-fn-call.h:

PS10, Line 53: or HDFS
> or external module ?

PS10, Line 54:  UDF
> It could also be the update/merge function of a UDA, right ? Not sure if it
I reworded just to refer to it as a function.

I could also move this to a different class - I didn't want to start off doing that since
it would make the diff harder to review.

PS10, Line 61:  
> nit: extra blank space.
File be/src/udf/udf-internal.h:

PS10, Line 51: UDAF
> May be less confusing to say "UDA functions"
UDAs seems more consistent.

PS10, Line 52: an Expr node
             : /// generated by the Impala frontend
> May be it helps to differentiate the ExprNode in the FE and BE b stating:

PS10, Line 54:  Backend code should not create FunctionContexts for other
             : /// purposes
> FunctionContexts should entirely be allocated and managed by ExprContext. E

To view, visit
To unsubscribe, visit

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

View raw message