Michael Ho has posted comments on this change.

Change subject: IMPALA-3079: Fix sequence file writer
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/6107/1/be/src/exec/read-write-util.h
File be/src/exec/read-write-util.h:

PS1, Line 217: val ^ (static_cast<int64_t>(-1))
Did you mean to convert this to the absolute value ? If so, you are missing a 
+1. If not, why not just do ~val ?


PS1, Line 219:  if (val & 0xFF00000000000000llu) return 9;
             :   if (val & 0x00FF000000000000llu) return 8;
             :   if (val & 0x0000FF0000000000llu) return 7;
             :   if (val & 0x000000FF00000000llu) return 6;
             :   if (val & 0x00000000FF000000llu) return 5;
             :   if (val & 0x0000000000FF0000llu) return 4;
             :   if (val & 0x000000000000FF00llu) return 3;
Why not do a bit-scan for first set bit and divide the result by 8 ?


PS1, Line 240:     buf[0] = -(num_bytes + 119);
             :     val = val ^ (static_cast<int64_t>(-1));
Is this behavior documented somewhere ? Is it part of the sequence file 
standard ? In other words, if the field is encoded this way, can it be read 
back by say Hive ?


PS1, Line 246: reversed endianness
Big Endianness ?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0db642ad35132a9a5a6611810a6cafbbe26e7487
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Attila Jeges <[email protected]>
Gerrit-Reviewer: Marcel Kornacker <[email protected]>
Gerrit-Reviewer: Michael Ho <[email protected]>
Gerrit-HasComments: Yes

Reply via email to