Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13363 )

Change subject: IMPALA-7369: part 1: Implement TRUNC, DATE_TRUNC, EXTRACT, 
DATE_PART functions for DATE
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/13363/2/be/src/exprs/udf-builtins-ir.cc
File be/src/exprs/udf-builtins-ir.cc:

http://gerrit.cloudera.org:8080/#/c/13363/2/be/src/exprs/udf-builtins-ir.cc@475
PS2, Line 475:   discard_result(date.ToYearMonthDay(&year, &month, &day));
performance: we always calculate year / month / day, even if some of these are 
not used for the given trunc_unit. (ToYearMonthDay() is not an inline function, 
so I guess that the compiler won't be able to skip the unused computations). 

I think that at least those cases could be optimized where only year or the 
original date is used (calculating day is probably not expensive once we have 
year and month).

I am ok with skipping this in the current patch and adding a TODO.


http://gerrit.cloudera.org:8080/#/c/13363/2/be/src/exprs/udf-builtins-ir.cc@631
PS2, Line 631: ToYearMonthDay
Same as line 475.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I843358a45eb5faa2c134994600546fc1d0a797c8
Gerrit-Change-Number: 13363
Gerrit-PatchSet: 2
Gerrit-Owner: Attila Jeges <atti...@cloudera.com>
Gerrit-Reviewer: Attila Jeges <atti...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <borokna...@cloudera.com>
Gerrit-Comment-Date: Mon, 20 May 2019 15:13:23 +0000
Gerrit-HasComments: Yes

Reply via email to