Signed-off-by: luofucong <luofc@foxmail.com>
This commit is contained in:
luofucong
2026-06-08 20:07:13 +08:00
parent 015459d511
commit d9661b4b1e
3 changed files with 7 additions and 5 deletions

View File

@@ -25,7 +25,6 @@ use arrow_array::cast::AsArray;
use arrow_array::types::{Float64Type, Int64Type, UInt64Type};
use arrow_array::{Array, ArrayRef, GenericListArray, ListArray, StructArray, new_null_array};
use arrow_schema::{DataType, FieldRef};
use common_telemetry::debug;
use serde_json::Value;
use snafu::{OptionExt, ResultExt};
@@ -109,7 +108,7 @@ impl JsonArray<'_> {
return Ok(self.inner.clone());
}
debug!(
common_telemetry::trace!(
"Try aligning JSON array {} to data type {}",
self.inner.data_type(),
expect

View File

@@ -1843,12 +1843,13 @@ impl RowGroupReaderBuilder {
return Ok(stream);
}
Ok(NestedSchemaAligner::new(
let stream = NestedSchemaAligner::new(
stream,
self.projection.projected_root_presence.clone(),
self.output_schema.clone(),
)?
.boxed())
)?;
common_telemetry::debug!("created: {:?}", stream);
Ok(stream.boxed())
}
/// Builds a parquet record batch stream with a custom projection mask.

View File

@@ -44,7 +44,9 @@ use crate::error::{CastColumnSnafu, NewRecordBatchSnafu, Result, UnexpectedSnafu
/// inserting root-level null arrays.
/// - Nested struct alignment aligns struct arrays to the expected nested field
/// layout.
#[derive(derive_more::Debug)]
pub struct NestedSchemaAligner<S> {
#[debug(skip)]
inner: S,
/// Output schema expected by the upper reader.
output_schema: SchemaRef,