impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <ger...@cloudera.org>
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:

(7 comments)

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

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
must
              :     // therefore expose it in the same way.
> May help to add a remark in aggregate-functions-ir.cc 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().


http://gerrit.cloudera.org:8080/#/c/5161/10/be/src/exprs/scalar-fn-call.h
File be/src/exprs/scalar-fn-call.h:

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


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.
Done


http://gerrit.cloudera.org:8080/#/c/5161/10/be/src/udf/udf-internal.h
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:
Done


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


-- 
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: 10
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <marcel@cloudera.com>
Gerrit-Reviewer: Michael Ho
Gerrit-Reviewer: Michael Ho <kwho@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message