From 9b77320bba295660c51edf48c20e5f00b681f4de Mon Sep 17 00:00:00 2001 From: Anas Khan <83116240+anxkhn@users.noreply.github.com> Date: Sun, 5 Jul 2026 10:20:59 +0530 Subject: [PATCH] MINOR: Fix withLogicalTypeAnnotation Javadoc @return description The @return tag on PrimitiveType.withLogicalTypeAnnotation read "a new PrimitiveType with the same fields and a new id null", which was a mangled copy-paste from the sibling withId(int) method. The method does not assign a new id: it returns a copy carrying the given logical type annotation while preserving the existing id via getId(). Correct the description to match the actual behavior. --- .../src/main/java/org/apache/parquet/schema/PrimitiveType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parquet-column/src/main/java/org/apache/parquet/schema/PrimitiveType.java b/parquet-column/src/main/java/org/apache/parquet/schema/PrimitiveType.java index 81f2781cde..c3766fa155 100644 --- a/parquet-column/src/main/java/org/apache/parquet/schema/PrimitiveType.java +++ b/parquet-column/src/main/java/org/apache/parquet/schema/PrimitiveType.java @@ -678,7 +678,7 @@ public PrimitiveType withId(int id) { /** * @param logicalType LogicalTypeAnnotation - * @return a new PrimitiveType with the same fields and a new id null + * @return a new PrimitiveType with the same fields and the given logical type annotation */ public PrimitiveType withLogicalTypeAnnotation(LogicalTypeAnnotation logicalType) { return new PrimitiveType(getRepetition(), primitive, length, getName(), logicalType, getId());