impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Ribeiro Alves (Code Review)" <>
Subject [Impala-ASF-CR] Make TimestampValue packed and change the field order
Date Fri, 17 Feb 2017 04:10:55 GMT
David Ribeiro Alves has uploaded a new change for review.

Change subject: Make TimestampValue packed and change the field order

Make TimestampValue packed and change the field order

Kudu has a similar struct to represent TIMESTAMP values. Making
the two types equivalent allows to cast Kudu's struct into impala's
and thus avoid having to convert. Kudu's struct is slightly different
from Impala's in that:
- It's packed (12 bytes vs 16)
- Has the date/time_duration field order swapped to have the most
  significant bits first.

This patch makes the same changes to the analogous impala
struct, TimestampValue, so that the two structs match exactly.

In addition to the changes to the struct itself this also
changes the codegen transformation to/from TimestampVal
and the static asserts on the type itself, as well as a
few comments that refer to the type as having 16 bytes (it's
now 12 bytes in size).

Note: This uses #pragma packed(4) instead of __attribute__((packed))
because the latter causes compilation failures as the inner fields
are non-POD.

Change-Id: I4d13ac9cf784ee3de1f862dbc6b167f0bdbe364a
M be/src/codegen/
M be/src/codegen/
M be/src/exec/
M be/src/exec/
M be/src/exprs/
M be/src/exprs/
M be/src/exprs/
M be/src/runtime/
M be/src/runtime/timestamp-value.h
M be/src/runtime/types.h
M be/src/util/
M common/thrift/Exprs.thrift
M fe/src/main/java/org/apache/impala/analysis/
M fe/src/main/java/org/apache/impala/catalog/
M fe/src/test/java/org/apache/impala/analysis/
15 files changed, 115 insertions(+), 103 deletions(-)

  git pull ssh:// refs/changes/48/6048/1
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d13ac9cf784ee3de1f862dbc6b167f0bdbe364a
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <>

View raw message