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

    https://github.com/apache/spark/pull/15225#discussion_r80340526
  
    --- Diff: 
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/ColumnVector.java
 ---
    @@ -285,19 +285,19 @@ public void reserve(int requiredCapacity) {
             try {
               reserveInternal(newCapacity);
             } catch (OutOfMemoryError outOfMemoryError) {
    -          throwUnsupportedException(newCapacity, requiredCapacity, 
outOfMemoryError);
    +          throwUnsupportedException(requiredCapacity, outOfMemoryError);
             }
           } else {
    -        throwUnsupportedException(newCapacity, requiredCapacity, null);
    +        throwUnsupportedException(requiredCapacity, null);
           }
         }
       }
     
    -  private void throwUnsupportedException(int newCapacity, int 
requiredCapacity, Throwable cause) {
    -    String message = "Cannot reserve more than " + newCapacity +
    -        " bytes in the vectorized reader (requested = " + requiredCapacity 
+ " bytes). As a" +
    -        " workaround, you can disable the vectorized reader by setting "
    -        + SQLConf.PARQUET_VECTORIZED_READER_ENABLED().key() + " to false.";
    +  private void throwUnsupportedException(int requiredCapacity, Throwable 
cause) {
    +    String message = "Cannot reserve additional contiguous bytes in the 
vectorized reader " +
    +        "(requested = " + requiredCapacity + " bytes). As a workaround, 
you can disable the " +
    +        "vectorized reader by setting " + 
SQLConf.PARQUET_VECTORIZED_READER_ENABLED().key() +
    +        " to false.";
    --- End diff --
    
    oh, I was thinking if we can explain the reason that fails the allocation 
instead of just saying we cannot allocate mem.


---
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