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

Avoid using some deprecated methods of Parquet #22134

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
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static ColumnChunkMetadata get(
PrimitiveTypeName type,
CompressionCodecName codec,
Set<Encoding> encodings,
Statistics statistics,
Statistics<?> statistics,
long firstDataPage,
long dictionaryPageOffset,
long valueCount,
Expand All @@ -74,7 +74,7 @@ public static ColumnChunkMetadata get(
CompressionCodecName codec,
EncodingStats encodingStats,
Set<Encoding> encodings,
Statistics statistics,
Statistics<?> statistics,
long firstDataPage,
long dictionaryPageOffset,
long valueCount,
Expand All @@ -91,7 +91,7 @@ public static ColumnChunkMetadata get(
CompressionCodecName codec,
EncodingStats encodingStats,
Set<Encoding> encodings,
Statistics statistics,
Statistics<?> statistics,
long firstDataPage,
long dictionaryPageOffset,
long valueCount,
Expand Down Expand Up @@ -186,7 +186,7 @@ public ColumnPath getPath()
public PrimitiveTypeName getType()
{
decryptIfNeeded();
return properties.getType();
return properties.getPrimitiveType().getPrimitiveTypeName();
}

public PrimitiveType getPrimitiveType()
Expand All @@ -205,7 +205,7 @@ public PrimitiveType getPrimitiveType()

public abstract long getTotalSize();

public abstract Statistics getStatistics();
public abstract Statistics<?> getStatistics();

public IndexReference getColumnIndexReference()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ class IntColumnChunkMetadata
private final int valueCount;
private final int totalSize;
private final int totalUncompressedSize;
private final Statistics statistics;
private final Statistics<?> statistics;

IntColumnChunkMetadata(
ColumnPath path,
PrimitiveType type,
CompressionCodecName codec,
EncodingStats encodingStats,
Set<Encoding> encodings,
Statistics statistics,
Statistics<?> statistics,
long firstDataPage,
long dictionaryPageOffset,
long valueCount,
Expand Down Expand Up @@ -98,7 +98,7 @@ public long getTotalSize()
}

@Override
public Statistics getStatistics()
public Statistics<?> getStatistics()
{
return statistics;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ class LongColumnChunkMetadata
private final long valueCount;
private final long totalSize;
private final long totalUncompressedSize;
private final Statistics statistics;
private final Statistics<?> statistics;

LongColumnChunkMetadata(
ColumnPath path,
PrimitiveType type,
CompressionCodecName codec,
EncodingStats encodingStats,
Set<Encoding> encodings,
Statistics statistics,
Statistics<?> statistics,
long firstDataPageOffset,
long dictionaryPageOffset,
long valueCount,
Expand Down Expand Up @@ -85,7 +85,7 @@ public long getTotalSize()
}

@Override
public Statistics getStatistics()
public Statistics<?> getStatistics()
{
return statistics;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public ValuesWriter newValuesWriter(ColumnDescriptor descriptor, Optional<BloomF
private ValuesWriter getFixedLenByteArrayValuesWriter(ColumnDescriptor path, Optional<BloomFilter> bloomFilter)
{
// dictionary encoding was not enabled in PARQUET 1.0
return createBloomFilterValuesWriter(new FixedLenByteArrayPlainValuesWriter(path.getTypeLength(), parquetProperties.getInitialSlabSize(), parquetProperties.getPageSizeThreshold(), parquetProperties.getAllocator()), bloomFilter);
return createBloomFilterValuesWriter(new FixedLenByteArrayPlainValuesWriter(path.getPrimitiveType().getTypeLength(), parquetProperties.getInitialSlabSize(), parquetProperties.getPageSizeThreshold(), parquetProperties.getAllocator()), bloomFilter);
}

private ValuesWriter getBinaryValuesWriter(ColumnDescriptor path, Optional<BloomFilter> bloomFilter)
Expand Down Expand Up @@ -125,7 +125,7 @@ private static DictionaryValuesWriter dictionaryWriter(ColumnDescriptor path, Pa
case FLOAT ->
new DictionaryValuesWriter.PlainFloatDictionaryValuesWriter(properties.getDictionaryPageSizeThreshold(), dataPageEncoding, dictPageEncoding, properties.getAllocator());
case FIXED_LEN_BYTE_ARRAY ->
new DictionaryValuesWriter.PlainFixedLenArrayDictionaryValuesWriter(properties.getDictionaryPageSizeThreshold(), path.getTypeLength(), dataPageEncoding, dictPageEncoding, properties.getAllocator());
new DictionaryValuesWriter.PlainFixedLenArrayDictionaryValuesWriter(properties.getDictionaryPageSizeThreshold(), path.getPrimitiveType().getTypeLength(), dataPageEncoding, dictPageEncoding, properties.getAllocator());
};
}

Expand Down
Loading