Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/20361#discussion_r164634591
--- Diff:
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedParquetRecordReader.java
---
@@ -115,13 +116,15 @@
*/
private final MemoryMode MEMORY_MODE;
- public VectorizedParquetRecordReader(TimeZone convertTz, boolean
useOffHeap) {
+ public VectorizedParquetRecordReader(TimeZone convertTz, boolean
useOffHeap, int capacity) {
this.convertTz = convertTz;
MEMORY_MODE = useOffHeap ? MemoryMode.OFF_HEAP : MemoryMode.ON_HEAP;
+ this.capacity = capacity;
}
+ // Vectorized parquet reader used for testing and benchmark.
public VectorizedParquetRecordReader(boolean useOffHeap) {
- this(null, useOffHeap);
+ this(null, useOffHeap, 4096);
--- End diff --
It's good to avoid hardcoding the default value again in the code. If there
are only a few places need to be changed, let's do it.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]