Github user mridulm commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22101#discussion_r209860397
  
    --- Diff: 
sql/catalyst/src/main/java/org/apache/spark/sql/execution/RecordBinaryComparator.java
 ---
    @@ -42,16 +42,16 @@ public int compare(
           while ((leftOff + i) % 8 != 0 && i < leftLen) {
             res = (Platform.getByte(leftObj, leftOff + i) & 0xff) -
                     (Platform.getByte(rightObj, rightOff + i) & 0xff);
    -        if (res != 0) return res;
    +        if (res != 0) return (int) res;
    --- End diff --
    
    We can restrict scope of 'res' as an 'int' : and avoid the type 
promotions/conversions.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to