impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Jacobs (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5338: Fix Kudu timestamp column default values
Date Tue, 23 May 2017 00:32:17 GMT
Matthew Jacobs has posted comments on this change.

Change subject: IMPALA-5338: Fix Kudu timestamp column default values

Patch Set 1:

File be/src/runtime/timestamp-value.h:

Line 108:   static TimestampValue FromUnixTimeMicros(int64_t unix_time_micros);
> I'm confused as to why it no longer takes two parameters (maybe its just th
I'll update the comment, but it doesn't really matter too much. the time_t was in seconds,
and then there were fractional sec in microseconds, but it's more convenient to take a single
int64 which is unix time in micros and convert it internally to the time_t w/ fractional part
because there are two callers that both have unix_time already in microseconds.
File be/src/runtime/timestamp-value.inline.h:

Line 32:   int64_t ts_seconds = unix_time_micros / MICROS_PER_SEC;
> I don't understand what this is supposed to be doing - it looks like you're
integer division results in truncation, so this separates out the number of seconds and then
the fractional seconds in microseconds. We do this to use the posix_time helper functions,
i.e. there is no ptime constructor that just takes the unix time already in microseconds.
File fe/src/main/java/org/apache/impala/catalog/

PS1, Line 125:  value
> extraneous word?
File testdata/workloads/functional-query/queries/QueryTest/kudu_create.test:

Line 253:                          ts2 timestamp default cast('00:00:00' as timestamp))
> I guess the intention here is that this will fail? Is there an error we can
whoops, thanks. This shouldn't be here, it's just going to be a FE test.
File tests/query_test/

Line 364:     schema_builder = SchemaBuilder()
> comment

DEFAULT timestamp_from_unix_micros(%s),
> long line
The problem is I can't break this line as it needs to match the output exactly. I don't think
it's worth something fancy like factoring out another variable for parameters and substituting
them... I'll just add a comment.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I655910fb4805bb204a999627fa9f68e43ea8aaf2
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Dimitris Tsirogiannis <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Thomas Tauber-Marshall <>
Gerrit-HasComments: Yes

View raw message