Kim Jin Chul has posted comments on this change. ( http://gerrit.cloudera.org:8080/8311 )
Change subject: IMPALA-5607: Add additional units to EXTRACT, DATE_PART, TRUNC ...................................................................... Patch Set 2: (3 comments) http://gerrit.cloudera.org:8080/#/c/8311/2/be/src/exprs/udf-builtins-ir.cc File be/src/exprs/udf-builtins-ir.cc: http://gerrit.cloudera.org:8080/#/c/8311/2/be/src/exprs/udf-builtins-ir.cc@120 PS2, Line 120: return time.fractional_seconds() + time.seconds() * 1000 * 1000 * 1000; The seconds field, including fractional parts, multiplied by 1 000 000 000; note that this includes full seconds 11:22:33.123456789 => 33123456789 http://gerrit.cloudera.org:8080/#/c/8311/2/be/src/exprs/udf-builtins-ir.cc@154 PS2, Line 154: BigIntVal Return type should be changed from INT to BIGINT because INT data type's range cannot cover NANOSECOND. http://gerrit.cloudera.org:8080/#/c/8311/2/be/src/exprs/udf-builtins-ir.cc@194 PS2, Line 194: case TExtractField::NANOSECONDS: MILLISECONDS, MICROSECONDS and NANOSECONDS look like useless, but ExtractFromExpr::EXTRACT_FIELDS should require them. The available field type check in fe needs the aliases. The check code is in src/main/java/org/apache/impala/analysis/ExtractFromExpr.java -- To view, visit http://gerrit.cloudera.org:8080/8311 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If23ea310ddcc5c1c806b2b1ac24d24a4bd6aa4d9 Gerrit-Change-Number: 8311 Gerrit-PatchSet: 2 Gerrit-Owner: Kim Jin Chul <jinc...@gmail.com> Gerrit-Reviewer: Kim Jin Chul <jinc...@gmail.com> Gerrit-Comment-Date: Thu, 19 Oct 2017 12:18:55 +0000 Gerrit-HasComments: Yes