Skip to content

[Fix][Connector-V2] Fix Parquet INT96 mixed-case field matching - #11067

Merged
davidzollo merged 1 commit into
apache:devfrom
zhangshenghang:zsh/fix-parquet-int96-field-case
Jun 18, 2026
Merged

[Fix][Connector-V2] Fix Parquet INT96 mixed-case field matching#11067
davidzollo merged 1 commit into
apache:devfrom
zhangshenghang:zsh/fix-parquet-int96-field-case

Conversation

@zhangshenghang

Copy link
Copy Markdown
Member

Purpose of this pull request

Fixes #10928.

When parquet_avro_write_timestamp_as_int96 = true, Parquet schema field names are normalized to lowercase. However, the INT96 matching set kept the original SeaTunnel field names, such as createTime.

For mixed-case timestamp columns, this made schema generation and value conversion disagree:

  • schema generation checked createtime and created a normal timestamp field
  • value conversion checked createTime and wrote an INT96 GenericData.Fixed value

That could fail while writing Parquet rows.

Does this PR introduce any user-facing change?

No. It only fixes Parquet INT96 writing for mixed-case field names.

How was this patch tested?

  • ./mvnw -pl seatunnel-connectors-v2/connector-file/connector-file-base -Dtest=ParquetWriteStrategyTest#testParquetWriteInt96WithMixedCaseTimestampColumn test
  • ./mvnw -pl seatunnel-connectors-v2/connector-file/connector-file-base -Dtest=ParquetWriteStrategyTest test
  • ./mvnw spotless:apply
  • ./mvnw -q -DskipTests verify
  • ./mvnw -pl seatunnel-connectors-v2/connector-file/connector-file-base test

@DanielLeens DanielLeens left a comment

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.

Thanks for the fix. I reviewed the latest head from the Parquet read path down to the new regression test.

What This PR Solves

  • User pain: mixed-case configured field paths do not match Parquet INT96 timestamp fields reliably, which breaks expected field mapping.
  • Fix approach: normalize the relevant path components consistently with Locale.ROOT before matching configured paths against Parquet schema field names.
  • One-line summary: I did not find a new code-side blocker in the Parquet matching logic on the latest head; the remaining blocker is the current red Build signal.

Runtime Chain Rechecked

Parquet read path
  -> configured field path list
      -> normalize relevant path tokens with Locale.ROOT
  -> Parquet schema walk
      -> normalize schema field names the same way
  -> match mixed-case configured path to INT96 timestamp field reliably

Findings

I did not find a new runtime-path blocker in the current Parquet field-matching logic.

Issue 1: the top-level Build is still red, and the visible failures do not point back to this Parquet path specifically

  • Location: GitHub Build check 80821242970
  • Evidence I confirmed:
    the current run includes failing/cancelled jobs such as unit-test (Windows), connector-file-sftp-it, and other broad matrix churn rather than a focused Parquet regression signal.
  • Why this matters:
    the code-side fix itself looks coherent, but the PR still should not merge while the top-level Build is red.
  • Better fix:
    get the current Build green on the latest head, then re-evaluate only if a targeted Parquet/file-reader failure remains.
  • Severity: High
  • Already raised by others: No.

Test Coverage / Stability

  • The added regression test for mixed-case field matching is well targeted.
  • Stability rating: Stable.
    • The changed path is deterministic and not timing-sensitive.

Merge Conclusion

Conclusion: can merge after fixes

  1. Blocking items
  • Issue 1: get the current Build green on this head.
  1. Suggested follow-up
  • None from the Parquet code path I reviewed.

Overall, the matching fix itself looks good on the latest head. The remaining blocker is the CI gate, not a new code-side issue.

@davidzollo davidzollo left a comment

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.

Good job

@davidzollo
davidzollo merged commit b38601a into apache:dev Jun 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [oss-sink] parquet_avro_write_timestamp_as_int96 An error occurs when the name of the datetime-type field is in uppercase

3 participants