Details
-
Improvement
-
Status: Resolved
-
Trivial
-
Resolution: Invalid
-
None
-
None
-
None
-
None
Description
In method "compareBinInterSedesDatum" of Class : pig-0.15.0\src\org\apache\pig\data\BinInterSedes.java
In this method, variables "dt1" and "dt2" could be reused, as shown below, in switch block "case BinInterSedes.BIGINTEGER", "bb1.get()" and "bb2.get()" should be reused "dt1", "dt2" as all other cases did.
private int compareBinInterSedesDatum(ByteBuffer bb1, ByteBuffer bb2, boolean[] asc) throws IOException {
byte dt1 = bb1.get();
byte dt2 = bb2.get();
…
switch (dt1) {
…
case BinInterSedes.BIGINTEGER: {
if(...)
case BinInterSedes.BYTEARRAY: {
if(...)
case BinInterSedes.CHARARRAY: {
if(...){ int sz1 = readSize(bb1, dt1); int sz2 = readSize(bb2, dt2);… }
}