diff --git a/parquet-hadoop/pom.xml b/parquet-hadoop/pom.xml
index da8bf5eb63..ad8fc1c454 100644
--- a/parquet-hadoop/pom.xml
+++ b/parquet-hadoop/pom.xml
@@ -164,11 +164,6 @@
commons-pool
1.6
-
- it.unimi.dsi
- fastutil
- ${fastutil.version}
-
com.github.luben
zstd-jni
diff --git a/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ColumnIndexFilterUtils.java b/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ColumnIndexFilterUtils.java
index 9c9e2a6cfa..0ef6a5bd6e 100644
--- a/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ColumnIndexFilterUtils.java
+++ b/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ColumnIndexFilterUtils.java
@@ -21,8 +21,6 @@
import static org.apache.parquet.hadoop.ParquetFileReaderMetrics.PagesIncluded;
import static org.apache.parquet.hadoop.ParquetFileReaderMetrics.PagesSkipped;
-import it.unimi.dsi.fastutil.ints.IntArrayList;
-import it.unimi.dsi.fastutil.ints.IntList;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Formatter;
@@ -137,14 +135,13 @@ static OffsetIndex filterOffsetIndex(
RowRanges rowRanges,
long totalRowCount,
org.apache.parquet.ParquetReadOptions options) {
- IntList indexMap = new IntArrayList();
+ int[] indexMap = new int[offsetIndex.getPageCount()];
int pagesIncluded = 0;
int pagesSkipped = 0;
for (int i = 0, n = offsetIndex.getPageCount(); i < n; ++i) {
long from = offsetIndex.getFirstRowIndex(i);
if (rowRanges.isOverlapping(from, offsetIndex.getLastRowIndex(i, totalRowCount))) {
- indexMap.add(i);
- pagesIncluded++;
+ indexMap[pagesIncluded++] = i;
} else {
pagesSkipped++;
}
@@ -156,7 +153,7 @@ static OffsetIndex filterOffsetIndex(
metricsCallback.setValueInt(PagesSkipped.name(), pagesSkipped);
}
- return new FilteredOffsetIndex(offsetIndex, indexMap.toIntArray());
+ return new FilteredOffsetIndex(offsetIndex, Arrays.copyOf(indexMap, pagesIncluded));
}
static List calculateOffsetRanges(
diff --git a/parquet-hadoop/src/main/resources/META-INF/LICENSE b/parquet-hadoop/src/main/resources/META-INF/LICENSE
index 906156fc71..28dd44ab14 100644
--- a/parquet-hadoop/src/main/resources/META-INF/LICENSE
+++ b/parquet-hadoop/src/main/resources/META-INF/LICENSE
@@ -187,12 +187,3 @@ Copyright: 2012-2014 Twitter
Home page: https://github.com/twitter/elephant-bird
License: Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
---------------------------------------------------------------------------------
-
-This product bundles fastutil in this binary artifact. fastutil provides
-type-specific collection implementations.
-
-Copyright: 2002-2024 Sebastiano Vigna
-Home page: https://fastutil.di.unimi.it/
-License: Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
-
diff --git a/parquet-hadoop/src/test/java/org/apache/parquet/format/converter/TestParquetMetadataConverter.java b/parquet-hadoop/src/test/java/org/apache/parquet/format/converter/TestParquetMetadataConverter.java
index 0034f289dc..641c4a8b2f 100644
--- a/parquet-hadoop/src/test/java/org/apache/parquet/format/converter/TestParquetMetadataConverter.java
+++ b/parquet-hadoop/src/test/java/org/apache/parquet/format/converter/TestParquetMetadataConverter.java
@@ -50,7 +50,6 @@
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
-import it.unimi.dsi.fastutil.longs.LongArrayList;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -1642,18 +1641,18 @@ public void testColumnIndexConversion() {
stats.updateStats(100l);
builder.add(
stats,
- withSizeStats ? new SizeStatistics(type, 0, LongArrayList.of(1, 2), LongArrayList.of(6, 5)) : null);
+ withSizeStats ? new SizeStatistics(type, 0, Arrays.asList(1L, 2L), Arrays.asList(6L, 5L)) : null);
stats = Statistics.createStats(type);
stats.incrementNumNulls(111);
builder.add(
stats,
- withSizeStats ? new SizeStatistics(type, 0, LongArrayList.of(3, 4), LongArrayList.of(4, 3)) : null);
+ withSizeStats ? new SizeStatistics(type, 0, Arrays.asList(3L, 4L), Arrays.asList(4L, 3L)) : null);
stats = Statistics.createStats(type);
stats.updateStats(200l);
stats.updateStats(500l);
builder.add(
stats,
- withSizeStats ? new SizeStatistics(type, 0, LongArrayList.of(5, 6), LongArrayList.of(2, 1)) : null);
+ withSizeStats ? new SizeStatistics(type, 0, Arrays.asList(5L, 6L), Arrays.asList(2L, 1L)) : null);
org.apache.parquet.format.ColumnIndex parquetColumnIndex =
ParquetMetadataConverter.toParquetColumnIndex(type, builder.build());
ColumnIndex columnIndex = ParquetMetadataConverter.fromParquetColumnIndex(type, parquetColumnIndex);