Skip to content

Fix panic in Parquet export of MetricsViewTimeSeries#9725

Open
nishantmonu51 wants to merge 1 commit into
mainfrom
parquet_export_time
Open

Fix panic in Parquet export of MetricsViewTimeSeries#9725
nishantmonu51 wants to merge 1 commit into
mainfrom
parquet_export_time

Conversation

@nishantmonu51

Copy link
Copy Markdown
Collaborator
  • MetricsViewTimeSeries.Export prepended the time column to the export meta without a type, so WriteParquet built an arrow field with a nil arrow.DataType and panicked in array.NewRecordBuilder. The column now carries CODE_TIMESTAMP, and the timestamp value is truncated to microseconds since arrow rejects sub-microsecond strings for timestamp[us] columns. CSV and XLSX output is unchanged.
  • WriteParquet now returns an error for type codes it does not map to an arrow type (previously a panic for INT256, UINT128, UINT256, JSON, POINT, POLYGON, and untyped columns).
  • Added unit tests covering the timestamp round-trip and the untyped-column error.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

The time column prepended in MetricsViewTimeSeries.Export had no type,
which left a nil arrow.DataType in WriteParquet's schema and panicked
in array.NewRecordBuilder. Set the column type to CODE_TIMESTAMP and
reject unmapped type codes with an error instead of panicking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant