{"record":{"id":"5b9a3abf366dc60a","repo":"influxdata/influxdb","slug":"unsupported-arrow-type-for-python-conversion","errorCode":null,"errorMessage":"unsupported Arrow type for Python conversion: {:?}. Supported types: Int64, UInt64, Float64, Boolean, Utf8, LargeUtf8, Timestamp(Nanosecond), Dictionary(Int32, Utf8).","messagePattern":"unsupported Arrow type for Python conversion: (.+?)\\. Supported types: Int64, UInt64, Float64, Boolean, Utf8, LargeUtf8, Timestamp\\(Nanosecond\\), Dictionary\\(Int32, Utf8\\)\\.","errorType":"error_code","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"influxdb3_py_api/src/py_conversion.rs","lineNumber":119,"sourceCode":"            let arr = array.as_string::<i64>();\n            arr.value(index).into_pyobject(py)?.into_any().unbind()\n        }\n        DataType::Timestamp(arrow_schema::TimeUnit::Nanosecond, _) => {\n            let arr = array.as_primitive::<arrow_array::types::TimestampNanosecondType>();\n            arr.value(index).into_pyobject(py)?.into_any().unbind()\n        }\n        DataType::Dictionary(_, value_type) if value_type.as_ref() == &DataType::Utf8 => {\n            // Dictionary-encoded strings (common for tags)\n            let dict_arr = array\n                .as_any()\n                .downcast_ref::<DictionaryArray<Int32Type>>()\n                .context(\"failed to downcast dictionary array\")?;\n            let values = dict_arr.values().as_string::<i32>();\n            let key = dict_arr.keys().value(index) as usize;\n            values.value(key).into_pyobject(py)?.into_any().unbind()\n        }\n        _ => {\n            anyhow::bail!(\n                \"unsupported Arrow type for Python conversion: {:?}. \\\n                Supported types: Int64, UInt64, Float64, Boolean, Utf8, LargeUtf8, Timestamp\\\n                (Nanosecond), Dictionary(Int32, Utf8).\",\n                data_type\n            );\n        }\n    };\n\n    Ok(value)\n}\n\npub(crate) fn args_to_py_object<'py>(\n    py: Python<'py>,\n    args: &Option<HashMap<String, String>>,\n) -> PyResult<Option<Bound<'py, PyDict>>> {\n    args.as_ref()\n        .map(|args| map_to_py_object(py, args))\n        .transpose()","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_py_api/src/py_conversion.rs#L101-L137","documentation":"extract_arrow_value_to_py maps a fixed set of Arrow types (Int64, UInt64, Float64, Boolean, Utf8, LargeUtf8, Timestamp(Nanosecond), Dictionary(Int32, Utf8)) to Python values. Any other Arrow data type hits the catch-all arm and bails with this error. It occurs during query()/wal_flush_to_py() row conversion whenever a column has an unconverted type.","triggerScenarios":"Querying or flushing a table containing a column whose Arrow type is outside the supported set (e.g. Float32, Date64, Binary, Decimal128, Timestamp with non-nanosecond unit).","commonSituations":"Writing non-nanosecond timestamps or binary/decimal data via other clients, then reading through the Python conversion path; schema evolved to include a newer column type.","solutions":["Cast unsupported columns to a supported type in the query (e.g. arrow_cast(col, 'Timestamp(Nanosecond)') or float64 for Float32).","Exclude unsupported columns from the SELECT projection.","Write data with supported types (Int64/UInt64/Float64/Boolean/Utf8/ns-Timestamp/string dictionaries) from the start."],"exampleFix":"// before\nSELECT ts, raw_binary FROM metrics\n// after\nSELECT ts, arrow_cast(raw_binary, 'Utf8') AS raw_binary FROM metrics","handlingStrategy":"validation","validationCode":"# check column types before querying through the Python conversion path\nSUPPORTED = {'Int64','UInt64','Float64','Boolean','Utf8','LargeUtf8','Timestamp(Nanosecond, None)','Dictionary(Int32, Utf8)'}\n# cast or drop unsupported columns in SQL:\n# SELECT arrow_cast(col, 'Utf8') AS col FROM t","typeGuard":null,"tryCatchPattern":"try:\n    rows = client.query(sql)\nexcept Exception as e:\n    if 'unsupported Arrow type' in str(e):\n        sql = rewrite_with_arrow_casts(sql)\n        rows = client.query(sql)","preventionTips":["Query only supported columns or cast others with arrow_cast.","Standardize on nanosecond timestamps and supported field types at write time.","Review table schemas after migrations for newly added unsupported types."],"tags":["rust","arrow","python","unsupported-type"],"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"}