hudi-agent commented on code in PR #18539:
URL: https://github.com/apache/hudi/pull/18539#discussion_r3246167845
##########
hudi-flink-datasource/hudi-flink2.1.x/src/main/java/org/apache/hudi/adapter/DataTypeAdapter.java:
##########
@@ -25,11 +25,29 @@
import org.apache.flink.table.types.logical.LogicalTypeRoot;
import org.apache.flink.types.variant.BinaryVariant;
import org.apache.flink.types.variant.Variant;
+import org.apache.parquet.schema.LogicalTypeAnnotation;
/**
* Adapter utils to provide {@code DataType} utilities.
*/
public class DataTypeAdapter {
+
+ /**
+ * The Parquet Variant binary format specification version. Version 1 is the
initial spec
+ * defined by the Parquet Variant proposal (parquet-format 2.11.0 /
parquet-java 1.15.2).
+ */
+ private static final byte VARIANT_SPEC_VERSION = 1;
+
+ private static final LogicalTypeAnnotation VARIANT_ANNOTATION =
+ LogicalTypeAnnotation.variantType(VARIANT_SPEC_VERSION);
Review Comment:
🤖 This direct call breaks the Flink 2.1 build —
`LogicalTypeAnnotation.variantType(byte)` was added in parquet-java 1.16.0, but
the `flink2.1` profile pins `flink.format.parquet.version=1.15.2`. CI is
currently red with `cannot find symbol: method variantType(byte)` on this line.
Could we either restore the reflection-based fallback (and keep
`Option<LogicalTypeAnnotation>`), or bump the Flink 2.1 parquet dependency to
1.16.0+? The comment on line 37 also mentions 1.15.2, which seems off for the
same reason.
<sub><i>- AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]