tgravescs commented on a change in pull request #31284:
URL: https://github.com/apache/spark/pull/31284#discussion_r564568214
##########
File path:
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedRleValuesReader.java
##########
@@ -351,25 +351,43 @@ public void readLongs(
WritableColumnVector c,
int rowId,
int level,
- VectorizedValuesReader data) throws IOException {
+ VectorizedValuesReader data,
+ boolean downCastLongToInt) throws IOException {
int left = total;
while (left > 0) {
if (this.currentCount == 0) this.readNextGroup();
int n = Math.min(left, this.currentCount);
switch (mode) {
case RLE:
if (currentValue == level) {
- data.readLongs(n, c, rowId);
+ if (downCastLongToInt) {
+ for (int i = 0; i < n; ++i) {
+ c.putInt(rowId + i, (int) data.readLong());
Review comment:
I guess I need to understand this better, is this sufficient for both on
heap and off heap column vectors? readLongs function appears to handle both
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]