Skip to content

GH-51370: [C++][Parquet] Fix tracing column attributes - #51401

Open
gitedmond wants to merge 1 commit into
apache:mainfrom
gitedmond:gh-51370
Open

gitedmond wants to merge 1 commit into
apache:mainfrom
gitedmond:gh-51370

Conversation

@gitedmond

@gitedmond gitedmond commented Sep 20, 2026

Copy link
Copy Markdown

Rationale for this change

Fixes #51370.

The parquet::arrow::read_column span used a reader-vector position as a Parquet leaf-column index. This reported the wrong column attributes for reordered or subset reads and did not represent nested top-level fields correctly.

What changes are included in this PR?

  • Map selected Parquet leaf indices back to their top-level Arrow field indices before recording tracing attributes.
  • Report the top-level field name and index. Preserve the physical type for primitive fields and leave it empty for nested fields, which do not have a single physical type.
  • Apply the same mapping to direct row-group column reads.
  • Add an OpenTelemetry-only regression test target covering flat, nested, reordered, full-schema, and direct reads.

Are these changes tested?

Yes.

  • parquet-arrow-reader-writer-tracing-test: 5 tests passed.
  • parquet-arrow-reader-writer-test: 823 tests passed and 9 configuration-dependent tests were skipped.
  • C++ clang-format and cpplint checks passed for the changed C++ files.

Are there any user-facing changes?

OpenTelemetry spans now report the correct top-level Arrow field metadata. There are no public API changes.

Was AI used for this PR?

In accordance with the AI generation guidelines, AI was used to implement, test, rebase, and prepare this change. The proposed behavior was discussed on #51370 before submission.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

Map selected Parquet leaf columns back to their top-level Arrow fields before recording tracing attributes. Add OpenTelemetry coverage for flat, nested, reordered, full-schema, and direct reads.
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.

[C++][Parquet] OpenTelemetry possibly reporting wrong column in ColumnReaderImpl::ReadColumn

1 participant