Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13680#discussion_r79559789
  
    --- Diff: 
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeArrayData.java
 ---
    @@ -341,63 +328,123 @@ public UnsafeArrayData copy() {
         return arrayCopy;
       }
     
    -  public static UnsafeArrayData fromPrimitiveArray(int[] arr) {
    -    if (arr.length > (Integer.MAX_VALUE - 4) / 8) {
    -      throw new UnsupportedOperationException("Cannot convert this array 
to unsafe format as " +
    -        "it's too big.");
    -    }
    +  @Override
    +  public boolean[] toBooleanArray() {
    +    int size = numElements();
    --- End diff --
    
    we already have `numElements` field, no need to create a new variable to 
hold it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to