{"record":{"id":"64f3469f8b306c01","repo":"influxdata/influxdb","slug":"unsupported-influxql-data-type-dt","errorCode":null,"errorMessage":"Unsupported InfluxQL data type: {dt}","messagePattern":"Unsupported InfluxQL data type: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"core/iox_v1_query_api/src/value.rs","lineNumber":62,"sourceCode":"        }\n    }\n\n    /// Return the InfluxQL type of the value.\n    pub(crate) fn value_type(&self) -> ValueType {\n        match self.arr.data_type() {\n            DataType::Boolean => ValueType::Boolean,\n            DataType::Int64 => ValueType::Integer,\n            DataType::Float64 | DataType::Float32 | DataType::Float16 => ValueType::Float,\n            DataType::Utf8 => ValueType::String,\n            DataType::Dictionary(k, v)\n                if k.equals_datatype(&DataType::Int32) && v.equals_datatype(&DataType::Utf8) =>\n            {\n                ValueType::String\n            }\n            DataType::Timestamp(TimeUnit::Nanosecond, tz) => ValueType::Timestamp(tz.clone()),\n            DataType::UInt64 => ValueType::Unsigned,\n            DataType::Null => ValueType::Null,\n            dt => panic!(\"Unsupported InfluxQL data type: {dt}\"),\n        }\n    }\n\n    /// Return the value as a boolean, if it is one.\n    pub(crate) fn as_boolean_opt(&self) -> Option<bool> {\n        if self.arr.is_valid(self.row) {\n            self.arr.as_boolean_opt().map(|a| a.value(self.row))\n        } else {\n            None\n        }\n    }\n\n    /// Return the value as an integer, if it is one.\n    pub(crate) fn as_integer_opt(&self) -> Option<i64> {\n        self.as_primitive_opt::<Int64Type>()\n    }\n\n    /// Return the value as a float, if it is one.","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/core/iox_v1_query_api/src/value.rs#L44-L80","documentation":"This panic fires inside the iox_v1_query_api value conversion layer when an Arrow DataType from a query result cannot be mapped to any InfluxQL ValueType. The mapping handles String, Timestamp, UInt64 and Null explicitly; any other Arrow type (e.g. Int64, Float64, Boolean, Dictionary) reaching this match is considered a bug in the query planner/schema, so the code panics instead of returning a recoverable error. It is an internal invariant violation, not a user-input error.","triggerScenarios":"Calling the value_type conversion (used by fmt/eq paths when formatting or comparing query results) on a column whose Arrow DataType is one of the unmapped variants, e.g. a schema change produces Int64/Float64 columns where the InfluxQL v1 layer only expects String, Timestamp(ns), UInt64 or Null.","commonSituations":"A Parquet/Arrow schema produced by a newer writer version contains field types the v1 query path never anticipated; a query returns a computed column (aggregation producing Int64/Float64) fed into this conversion; unit tests constructing arrays with unsupported dtypes.","solutions":["Check the panic message's displayed DataType and add an explicit DataType => ValueType mapping arm for it in core/iox_v1_query_api/src/value.rs (or convert the column beforehand)","If the column is genuinely not representable in InfluxQL, filter or coerce it to a supported type before the conversion","Fix the upstream planner so unsupported data types never reach this conversion; file an issue if the type came from data written by a supported path"],"exampleFix":"// before\ndt => panic!(\"Unsupported InfluxQL data type: {dt}\"),\n// after\nDataType::Int64 => ValueType::Integer,\nDataType::Float64 => ValueType::Float,\ndt => panic!(\"Unsupported InfluxQL data type: {dt}\"),","handlingStrategy":"validation","validationCode":"fn is_supported(dt: &DataType) -> bool {\n    matches!(dt, DataType::Utf8 | DataType::Timestamp(TimeUnit::Nanosecond, _) | DataType::UInt64 | DataType::Null)\n}\nif !is_supported(&arr.data_type()) { /* convert or skip column */ }","typeGuard":"fn as_supported_value_type(dt: &DataType) -> Option<ValueType> {\n    match dt {\n        DataType::Utf8 => Some(ValueType::String),\n        DataType::Timestamp(TimeUnit::Nanosecond, tz) => Some(ValueType::Timestamp(tz.clone())),\n        DataType::UInt64 => Some(ValueType::Unsigned),\n        DataType::Null => Some(ValueType::Null),\n        _ => None,\n    }\n}","tryCatchPattern":null,"preventionTips":["Map every Arrow column to a supported type before entering the InfluxQL v1 layer","Add a unit test per DataType variant to catch unmapped types early","Treat any panic here as a planner bug and file an issue with the displayed dtype"],"tags":["rust","panic","arrow","influxql","type-mapping"],"backgroundTag":"unsupported-dtype","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"}