mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-07-04 13:00:38 +00:00
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user