{"record":{"id":"a9eaa7baf9a69587","repo":"nautechsystems/nautilus_trader","slug":"warning-column-name-column-name-is-not-of-typ","errorCode":null,"errorMessage":"Warning: Column name '{column_name}' is not of type i64.","messagePattern":"Warning: Column name '(.+?)' is not of type i64\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/persistence/src/parquet.rs","lineNumber":450,"sourceCode":"            if col_metadata.column_path().string() == column_name {\n                if let Some(stats) = col_metadata.statistics() {\n                    // Check if we have Int64 statistics\n                    if let Statistics::Int64(int64_stats) = stats {\n                        // Extract min value if available\n                        if let Some(&min_value) = int64_stats.min_opt()\n                            && overall_min_value.is_none_or(|overall_min| min_value < overall_min)\n                        {\n                            overall_min_value = Some(min_value);\n                        }\n\n                        // Extract max value if available\n                        if let Some(&max_value) = int64_stats.max_opt()\n                            && overall_max_value.is_none_or(|overall_max| max_value > overall_max)\n                        {\n                            overall_max_value = Some(max_value);\n                        }\n                    } else {\n                        anyhow::bail!(\"Warning: Column name '{column_name}' is not of type i64.\");\n                    }\n                } else {\n                    anyhow::bail!(\n                        \"Warning: Statistics not available for column '{column_name}' in row group {i}.\"\n                    );\n                }\n            }\n        }\n    }\n\n    // Return the min/max pair if both are available\n    if let (Some(min), Some(max)) = (overall_min_value, overall_max_value) {\n        Ok((\n            u64::try_from(min).map_err(|_| {\n                anyhow::anyhow!(\"Negative minimum value {min} for column '{column_name}'\")\n            })?,\n            u64::try_from(max).map_err(|_| {\n                anyhow::anyhow!(\"Negative maximum value {max} for column '{column_name}'\")","sourceCodeStart":432,"sourceCodeEnd":468,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/persistence/src/parquet.rs#L432-L468","documentation":"min_max_from_parquet_metadata_object_store extracts min/max timestamp bounds from Parquet row-group statistics and requires the timestamp column to be physical type int64. If the statistics for the requested column are not Int64, it bails. (Note: it is a hard bail despite the 'Warning:' prefix.)","triggerScenarios":"Calling reset_file_names or min_max_from_parquet_metadata on a Parquet file whose timestamp column was written as a non-i64 physical type (e.g. timestamp micros/millis logical type, int96, or a different column passed as timestamp_column).","commonSituations":"Files written by external tools (pandas/pyarrow with timestamp dtype) instead of nautilus' writer; passing a non-timestamp column name; catalogs written by a different writer version with different column encoding.","solutions":["Rewrite the file with nautilus' Parquet writer so timestamps are stored as int64 nanos.","Confirm the timestamp_column argument names the int64 timestamp column, not another column.","Convert external Parquet files: cast the timestamp column to int64 before placing them in the catalog.","Align writer/reader versions so column types match what this build expects."],"exampleFix":"// before — external file with timestamp[us] column\ncatalog.reset_file_names(&directory, \"timestamp\")?;\n// after — cast to int64 nanos first\nlet df = df.with_column(col(\"timestamp\").cast(DataType::Int64))?;","handlingStrategy":"validation","validationCode":"// verify physical type before calling\nlet schema = file_metadata.schema();\nlet col = schema.column_with_name(timestamp_column)\n    .ok_or(\"missing timestamp column\")?;\ndebug_assert_eq!(col.1.physical_type(), parquet::basic::Type::INT64);","typeGuard":null,"tryCatchPattern":"match min_max_from_parquet_metadata(meta, timestamp_column) {\n    Err(e) if e.to_string().contains(\"not of type i64\") => {\n        // fall back to rewriting the file with int64 timestamps\n    }\n    other => other?,\n}","preventionTips":["Write catalog files only with nautilus' Parquet writer so timestamps are int64 nanos.","Cast timestamps to int64 when importing externally produced Parquet files.","Double-check the timestamp_column argument names the actual timestamp field."],"tags":["rust","parquet","type-mismatch","statistics"],"backgroundTag":"dtype-mismatch","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}