impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Tran (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5316: Adds last day() function
Date Fri, 26 May 2017 05:57:52 GMT
Vincent Tran has posted comments on this change.

Change subject: IMPALA-5316: Adds last_day() function

Patch Set 2:

File be/src/exprs/

Line 279:   void TestLastDayFunction() {
> can you check the results of all of these tests are the same as a reference
MariaDB returns only the DATE portion of the timestamp. That would be neat to do here as well.
But I don't see a way to do it unless we convert the output to StringVal.

Line 281:     TestTimestampValue("last_day('2003-01-02')",
> can you add times to some of these?

Line 282:       TimestampValue::Parse("2003-01-31 00:00:00", 19));
> for all of the below, use the Parse() overload that takes std::string, i.e.

Line 316:       TimestampValue::Parse("2100-02-28 00:00:00", 19));
> I pointed out a few special cases to consider in the .cc file
File be/src/exprs/

PS2, Line 562: end_of_month()
> 1) I wonder if you can get a TimestampValue without a Date or with a "speci

PS2, Line 562:   ptime pdate(;
             :   TimestampValue tsv(pdate);
> I think you can avoid converting to ptime and just use the TimestampValue c
File be/src/exprs/timestamp-functions.h:

Line 198:   static TimestampVal LastDay(FunctionContext* context, const TimestampVal&
> please add a comment. look to other fns in the file for examples.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I429c8734bddca3c37a2eedc211a16a4ffcb04370
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Vincent Tran <>
Gerrit-HasComments: Yes

View raw message