impala-reviews mailing list archives

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

(6 comments)

http://gerrit.cloudera.org:8080/#/c/6936/1/be/src/runtime/timestamp-value.h
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.


http://gerrit.cloudera.org:8080/#/c/6936/1/be/src/runtime/timestamp-value.inline.h
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.


http://gerrit.cloudera.org:8080/#/c/6936/1/fe/src/main/java/org/apache/impala/catalog/KuduColumn.java
File fe/src/main/java/org/apache/impala/catalog/KuduColumn.java:

PS1, Line 125:  value
> extraneous word?
Done


http://gerrit.cloudera.org:8080/#/c/6936/1/testdata/workloads/functional-query/queries/QueryTest/kudu_create.test
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.


http://gerrit.cloudera.org:8080/#/c/6936/1/tests/query_test/test_kudu.py
File tests/query_test/test_kudu.py:

Line 364:     schema_builder = SchemaBuilder()
> comment
Done


Line 658:           e TIMESTAMP NULL ENCODING AUTO_ENCODING COMPRESSION DEFAULT_COMPRESSION
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 http://gerrit.cloudera.org:8080/6936
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I655910fb4805bb204a999627fa9f68e43ea8aaf2
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tmarshall@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message