diff --git a/lib/trino-orc/src/main/java/io/trino/orc/OrcReader.java b/lib/trino-orc/src/main/java/io/trino/orc/OrcReader.java index 878022f9fe7c..bc427024d835 100644 --- a/lib/trino-orc/src/main/java/io/trino/orc/OrcReader.java +++ b/lib/trino-orc/src/main/java/io/trino/orc/OrcReader.java @@ -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; diff --git a/lib/trino-orc/src/test/java/io/trino/orc/TestReadBloomFilter.java b/lib/trino-orc/src/test/java/io/trino/orc/TestReadBloomFilter.java index 8340a3c58bd9..781265773039 100644 --- a/lib/trino-orc/src/test/java/io/trino/orc/TestReadBloomFilter.java +++ b/lib/trino-orc/src/test/java/io/trino/orc/TestReadBloomFilter.java @@ -89,7 +89,7 @@ private static void testType(Type type, List 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 @@ -98,7 +98,7 @@ private static void testType(Type type, List 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 @@ -118,7 +118,7 @@ private static void testType(Type type, List 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); } } }