Repository navigation
Conversation
### Rationale for this change parquet-hadoop declares and shades it.unimi.dsi:fastutil, but only uses it for a single IntArrayList in ColumnIndexFilterUtils, plus a LongArrayList in one test. That adds roughly 1 MB to the artifact for a single code path. ### What changes are included in this PR? - Replace IntArrayList/IntList in ColumnIndexFilterUtils.filterOffsetIndex with a plain int[] sized by the page count and Arrays.copyOf. - Remove the it.unimi.dsi:fastutil dependency from parquet-hadoop/pom.xml. - Drop the fastutil notice from parquet-hadoop's META-INF/LICENSE, since the jar no longer bundles it. - Update TestParquetMetadataConverter to use Arrays.asList so tests do not need fastutil either. The parquet-hadoop jar shrinks from 1,660,550 to 641,746 bytes and no longer contains shaded/parquet/it/unimi entries. The removed classes remain available at runtime from parquet-column, a compile-scope dependency that shades the same fastutil version under the same shaded.parquet prefix. ### Are these changes tested? Yes. TestParquetMetadataConverter#testColumnIndexConversion and TestColumnIndexFiltering pass; spotless:check and dependency:analyze-only pass. parquet-avro and parquet-hadoop-bundle still build and keep their own fastutil copies. ### Are there any user-facing changes? The parquet-hadoop jar is about 1 MB smaller and no longer duplicates fastutil classes that parquet-column already provides. There is no API or behavior change. Closes apache#4006
Contributor
Author
|
Thanks! In the same direction, #3781 helps to remove the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
parquet-hadoop declares and shades it.unimi.dsi:fastutil, but only uses it for a single
IntArrayListinColumnIndexFilterUtils, plus aLongArrayListin one test. That adds roughly 1 MB to the artifact for a single code path.What changes are included in this PR?
IntArrayList/IntListinColumnIndexFilterUtils.filterOffsetIndexwith a plainint[]sized by the page count andArrays.copyOf.it.unimi.dsi:fastutildependency fromparquet-hadoop/pom.xml.META-INF/LICENSE, since the jar no longer bundles it.TestParquetMetadataConverterto useArrays.asListso tests do not need fastutil either.The parquet-hadoop jar shrinks from 1,660,550 to 641,746 bytes and no longer contains shaded/parquet/it/unimi entries. The removed classes remain available at runtime from parquet-column, a compile-scope dependency that shades the same fastutil version under the same shaded.parquet prefix.
Are these changes tested?
Yes.
TestParquetMetadataConverter#testColumnIndexConversionandTestColumnIndexFilteringpass;spotless:checkanddependency:analyze-onlypass.parquet-avroandparquet-hadoop-bundlestill build and keep their own fastutil copies.Are there any user-facing changes?
The
parquet-hadoopjar is about 1 MB smaller and no longer duplicates fastutil classes thatparquet-columnalready provides. There is no API or behavior change.Closes #4006