You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org> on 2017/02/17 04:10:55 UTC

[Impala-ASF-CR] Make TimestampValue packed and change the field order

David Ribeiro Alves has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/6048

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/codegen-anyval.cc
M be/src/codegen/llvm-codegen.cc
M be/src/exec/hash-table.cc
M be/src/exec/old-hash-table.cc
M be/src/exprs/expr-test.cc
M be/src/exprs/literal.cc
M be/src/exprs/slot-ref.cc
M be/src/runtime/descriptors.cc
M be/src/runtime/timestamp-value.h
M be/src/runtime/types.h
M be/src/util/static-asserts.cc
M common/thrift/Exprs.thrift
M fe/src/main/java/org/apache/impala/analysis/TimestampLiteral.java
M fe/src/main/java/org/apache/impala/catalog/PrimitiveType.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzerTest.java
15 files changed, 115 insertions(+), 103 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/48/6048/1
-- 
To view, visit http://gerrit.cloudera.org:8080/6048
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

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

[Impala-ASF-CR] Make TimestampValue packed and change the field order

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has abandoned this change.

Change subject: Make TimestampValue packed and change the field order
......................................................................


Abandoned

this change was superceded

-- 
To view, visit http://gerrit.cloudera.org:8080/6048
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I4d13ac9cf784ee3de1f862dbc6b167f0bdbe364a
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <da...@gmail.com>