{"record":{"id":"1e04f757bfbd4fba","repo":"influxdata/influxdb","slug":"failed-to-construct-iox-parquet-metadata-0","errorCode":null,"errorMessage":"failed to construct IOx parquet metadata: {0}","messagePattern":"failed to construct IOx parquet metadata: (.+?)","errorType":"error_code","errorClass":"UploadError","httpStatus":null,"severity":"error","filePath":"core/parquet_file/src/storage.rs","lineNumber":54,"sourceCode":"    time::{Duration, Instant},\n};\nuse thiserror::Error;\nuse tracing::*;\n\n/// Errors returned during a Parquet \"put\" operation, covering [`RecordBatch`]\n/// pull from the provided stream, encoding, and finally uploading the bytes to\n/// the object store.\n///\n/// [`RecordBatch`]: arrow::record_batch::RecordBatch\n#[derive(Debug, Error)]\npub enum UploadError {\n    /// A codec failure during serialisation.\n    #[error(transparent)]\n    Serialise(#[from] CodecError),\n\n    /// An error during Parquet metadata conversion when attempting to\n    /// instantiate a valid [`IoxParquetMetaData`] instance.\n    #[error(\"failed to construct IOx parquet metadata: {0}\")]\n    Metadata(crate::metadata::Error),\n\n    /// Uploading the Parquet file to object store failed.\n    #[error(\"failed to upload to object storage: {0}\")]\n    Upload(#[from] object_store::Error),\n\n    /// Error in configuration.\n    #[error(\"failed to properly configure parquet upload: {0}\")]\n    Config(#[from] DataFusionError),\n}\n\nimpl From<UploadError> for DataFusionError {\n    fn from(value: UploadError) -> Self {\n        match value {\n            UploadError::Serialise(e) => {\n                Self::Context(String::from(\"serialize\"), Box::new(e.into()))\n            }\n            UploadError::Metadata(e) => Self::External(Box::new(e)),","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/core/parquet_file/src/storage.rs#L36-L72","documentation":"UploadError::Metadata, raised during Parquet metadata conversion when attempting to instantiate a valid IoxParquetMetaData instance fails. The inner crate::metadata::Error is included, covering issues such as missing time-column statistics or wrong time column type in the written file.","triggerScenarios":"After writing/upload preparation, converting Parquet file metadata into IoxParquetMetaData fails — typically the written file lacks time-column statistics or the time column is not Int64.","commonSituations":"Writer configuration dropped or corrupted statistics; schema where the timestamp column was written with an unexpected physical type; version drift producing files the reader-side metadata conversion cannot accept.","solutions":["Inspect the wrapped crate::metadata::Error (likely NoColumnStatisticsFound or IncorrectTimeColumnType) and fix the root cause","Ensure the writer emits statistics for the time column and writes it as Parquet INT64","Re-write the file with corrected writer properties","Check for schema drift between the writer and the expected IOx schema"],"exampleFix":"// before: writer without statistics, later rejected by metadata conversion\nlet props = WriterProperties::builder().set_statistics_enabled(Enabled(false)).build();\n// after\nlet props = WriterProperties::builder().set_statistics_enabled(Enabled(true)).build();","handlingStrategy":"try-catch","validationCode":"// validate before upload: time column stats exist and are Int64\nlet meta = footer_metadata(&file)?;\nensure_stats_and_int64_time_column(&meta)?;","typeGuard":null,"tryCatchPattern":"match res {\n    Err(UploadError::Metadata(inner)) => {\n        error!(%inner, \"IoxParquetMetaData construction failed; fix writer stats/time column type\")\n    }\n    other => other?,\n}","preventionTips":["Keep statistics enabled and time column as INT64 in all writers","Run metadata conversion as a post-write validation step before upload","Watch for writer/reader version drift in CI"],"tags":["parquet","metadata","upload","conversion"],"backgroundTag":"schema-validation-failed","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}