Skip to content
Closed
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 @@ -128,7 +128,7 @@ public ParquetValueReader<?> message(
@Override
public ParquetValueReader<?> struct(
Types.StructType expected, GroupType struct, List<ParquetValueReader<?>> fieldReaders) {
// the expected struct is ignored because nested fields are never found when the
// the expected struct is ignored because nested fields are never found when the ID is missing
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i asked claude to write a better comment, heres what it came up with. thoughts?

      // Unlike ReadBuilder.struct(), this does not reorder fields to match the expected schema
      // or handle missing fields with defaults. Without field IDs in the Parquet schema, fields
      // cannot be matched by ID, so they are read in file order instead.

List<ParquetValueReader<?>> newFields =
Lists.newArrayListWithExpectedSize(fieldReaders.size());
List<Type> fields = struct.getFields();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public Optional<ParquetValueWriter<?>> visit(
LogicalTypeAnnotation.IntLogicalTypeAnnotation intType) {
Preconditions.checkArgument(
intType.isSigned() || intType.getBitWidth() < 64,
"Cannot read uint64: not a supported Java type");
"Cannot write uint64: not a supported Java type");
if (intType.getBitWidth() < 64) {
return Optional.of(ParquetValueWriters.ints(desc));
} else {
Expand Down