influxdata/influxdb · error · Error
Arrow json printing error
Error message
Arrow json printing error: {} What it means
This error is returned when converting query results to JSON via the arrow JSON writer fails. The inner ArrowError is wrapped and displayed after 'Arrow json printing error: '. It means `arrow::json::writer` could not serialize the RecordBatches.
Solutions
- Inspect the wrapped ArrowError message for the failing column.
- Validate batch buffer/schema integrity before formatting.
- Try CSV or pretty output as an alternative rendering path.
- Pin a consistent arrow version across the workspace.
Example fix
// before
let json = result.format(format::Format::Json)?;
// after
let json = result.format(format::Format::Json)
.map_err(|e| anyhow!("json export failed: {e}"))?; Defensive patterns
Strategy: try-catch
Type guard
fn is_json_arrow_err(e: &format::Error) -> Option<&ArrowError> {
match e { format::Error::JsonArrow(a) => Some(a), _ => None }
} Try / catch
match result.format(format::Format::Json) {
Ok(j) => use_json(j),
Err(format::Error::JsonArrow(e)) => eprintln!("json write failed: {e}"),
Err(e) => eprintln!("other format error: {e}"),
} Prevention
- Validate batch buffers and schema integrity before serialization
- Avoid mixing arrow versions in one binary
- Fall back to CSV or pretty output on JSON failure
When it happens
Trigger: Calling the client's format function with Format::Json on batches the arrow JSON writer cannot handle, such as batches with invalid/null buffer layouts.
Common situations: Serializing results containing types unsupported by the installed arrow JSON writer, or data corrupted by an earlier mismatched arrow version.
Related errors
- Arrow csv printing error
- Arrow error
- Arrow pretty printing error
- arrow error
- Could not convert Parquet schema to Arrow schema
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/77edae181eef33e0.
Report an issue: GitHub.
Appendix: source
Thrown at core/influxdb_iox_client/src/format.rs:30
pub mod influxql;
/// Error type for results formatting
#[derive(Debug, Error)]
pub enum Error {
/// Unknown formatting type
#[error("Unknown format type: {}. Expected one of 'pretty', 'csv' or 'json'", .0)]
Invalid(String),
/// Error pretty printing
#[error("Arrow pretty printing error: {}", .0)]
PrettyArrow(ArrowError),
/// Error during CSV conversion
#[error("Arrow csv printing error: {}", .0)]
CsvArrow(ArrowError),
/// Error during JSON conversion
#[error("Arrow json printing error: {}", .0)]
JsonArrow(ArrowError),
/// Error converting CSV output to utf-8
#[error("Error converting CSV output to UTF-8: {}", .0)]
CsvUtf8(std::string::FromUtf8Error),
/// Error converting JSON output to utf-8
#[error("Error converting JSON output to UTF-8: {}", .0)]
JsonUtf8(std::string::FromUtf8Error),
}
type Result<T, E = Error> = std::result::Result<T, E>;
#[derive(Debug, Copy, Clone, PartialEq, Eq, Default)]
/// Requested output format for the query endpoint
pub enum QueryOutputFormat {
/// Arrow pretty printer format (default)
#[default]
Pretty,View on GitHub (pinned to 06200ef96b)