chore(querying): clean up hydration stage cruft + arrow code duplication

What does this MR do and why?

This MR fixes some of the cruft that accumulated during the offsite and was just never removed - and was even expanded on, in some cases.

The Problematic Codepaths

The query pipeline had Arrow-to-value conversion logic scattered across three files — each with its own version of the same downcasting patterns. ColumnValue lived in query_result.rs but was used everywhere, coupling modules that shouldn't know about each other.

The hydration stage passed also multiple individual fields through every function instead of using the pipeline context that already carried them. Error types hand-implemented Display and Error instead of using thiserror.

Several pieces of the original redaction feature — RedactableNodes, SchemaValidator — had become dead code as the auth pipeline evolved, but were still maintained with passing tests.

Solution

Consolidated all Arrow extraction into a single arrow.rs module with a stateless ArrowUtils struct. ColumnValue moved there and now derives accessors via enum-as-inner instead of hand-written methods. Duplicate converter functions (column_value_from_arrow, the inline match in formatter.rs) were removed in favor of the shared utilities.

The hydration stage helpers became associated functions on HydrationStage and take &QueryPipelineContext instead of individual fields.

Testing

135 lib tests pass (down from the original count due to removing dead-code tests and consolidating boilerplate arrow tests). Integration tests updated to use the new enum-as-inner accessor names (as_string(), as_int64() instead of the old as_str(), as_i64()).

Performance Analysis

  • This merge request does not introduce any performance regression. If a performance regression is expected, explain why.
Edited by Michael Usachenko

Merge request reports

Loading