Skip to content

Commit f3e9f7c

Browse files
committed
Restore deprecated static fromParquetColumnIndex shim
CI japicmp:cmp check failed: METHOD_REMOVED on the pre-PR signature ParquetMetadataConverter.fromParquetColumnIndex(PrimitiveType, ColumnIndex). Add it back as a @deprecated shim that delegates to the new createdBy-aware instance method with createdBy=null. For non-INT96 types this falls through to the type-only writing-supported check (same as pre-PR). For INT96 the null createdBy fails the allowlist and returns null, which matches pre-PR behavior (INT96 had UNDEFINED column order pre-PR, so it also returned null).
1 parent 8b3e37a commit f3e9f7c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2575,6 +2575,18 @@ public static ColumnIndex toParquetColumnIndex(
25752575
return parquetColumnIndex;
25762576
}
25772577

2578+
/**
2579+
* @param type the primitive type
2580+
* @param parquetColumnIndex parquet format column index
2581+
* @return the column index
2582+
* @deprecated will be removed in 2.0.0; use {@link #fromParquetColumnIndex(String, PrimitiveType, ColumnIndex)} instead.
2583+
*/
2584+
@Deprecated
2585+
public static org.apache.parquet.internal.column.columnindex.ColumnIndex fromParquetColumnIndex(
2586+
PrimitiveType type, ColumnIndex parquetColumnIndex) {
2587+
return new ParquetMetadataConverter().fromParquetColumnIndex(null, type, parquetColumnIndex);
2588+
}
2589+
25782590
public org.apache.parquet.internal.column.columnindex.ColumnIndex fromParquetColumnIndex(
25792591
String createdBy, PrimitiveType type, ColumnIndex parquetColumnIndex) {
25802592
if (!isMinMaxStatsReadingSupported(createdBy, type)) {

0 commit comments

Comments
 (0)