Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use OrcReader#MAX_BATCH_SIZE = 8 * 1024 #16858

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = 8196;
public static final int MAX_BATCH_SIZE = 8 * 1024;
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(), 8196);
assertEquals(recordReader.nextPage().getLoadedPage().getPositionCount(), MAX_BATCH_SIZE);
}

// 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(), 8196);
assertEquals(recordReader.nextPage().getLoadedPage().getPositionCount(), MAX_BATCH_SIZE);
}

// 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(), 8196);
assertEquals(recordReader.nextPage().getLoadedPage().getPositionCount(), MAX_BATCH_SIZE);
}
}
}
Expand Down