Skip to content

Commit

Permalink
Increase OrcReader#MAX_BATCH_SIZE to 8196
Browse files Browse the repository at this point in the history
  • Loading branch information
sopel39 committed Jan 29, 2022
1 parent 9c2f86d commit 695a222
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/trino-orc/src/main/java/io/trino/orc/OrcReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

public class OrcReader
{
public static final int MAX_BATCH_SIZE = 1024;
public static final int MAX_BATCH_SIZE = 8196;
public static final int INITIAL_BATCH_SIZE = 1;
public static final int BATCH_SIZE_GROWTH_FACTOR = 2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private static <T> void testType(Type type, List<T> uniqueValues, T inBloomFilte

// without predicate a normal block will be created
try (OrcRecordReader recordReader = createCustomOrcRecordReader(tempFile, OrcPredicate.TRUE, type, MAX_BATCH_SIZE)) {
assertEquals(recordReader.nextPage().getLoadedPage().getPositionCount(), 1024);
assertEquals(recordReader.nextPage().getLoadedPage().getPositionCount(), 8196);
}

// predicate for specific value within the min/max range without bloom filter being enabled
Expand All @@ -98,7 +98,7 @@ private static <T> void testType(Type type, List<T> uniqueValues, T inBloomFilte
.build();

try (OrcRecordReader recordReader = createCustomOrcRecordReader(tempFile, noBloomFilterPredicate, type, MAX_BATCH_SIZE)) {
assertEquals(recordReader.nextPage().getLoadedPage().getPositionCount(), 1024);
assertEquals(recordReader.nextPage().getLoadedPage().getPositionCount(), 8196);
}

// predicate for specific value within the min/max range with bloom filter enabled, but a value not in the bloom filter
Expand All @@ -118,7 +118,7 @@ private static <T> void testType(Type type, List<T> uniqueValues, T inBloomFilte
.build();

try (OrcRecordReader recordReader = createCustomOrcRecordReader(tempFile, matchBloomFilterPredicate, type, MAX_BATCH_SIZE)) {
assertEquals(recordReader.nextPage().getLoadedPage().getPositionCount(), 1024);
assertEquals(recordReader.nextPage().getLoadedPage().getPositionCount(), 8196);
}
}
}
Expand Down

0 comments on commit 695a222

Please sign in to comment.