Skip to content

Commit

Permalink
chore: Print out schema of datablock and record batch
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <github@xuanwo.io>
  • Loading branch information
Xuanwo committed Oct 11, 2024
1 parent 3e177f0 commit 9207773
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/query/expression/src/converts/arrow/from.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ impl DataBlock {
schema: &DataSchema,
batch: &RecordBatch,
) -> Result<(Self, DataSchema)> {
assert_eq!(schema.num_fields(), batch.num_columns());
assert_eq!(
schema.num_fields(),
batch.num_columns(),
"expect schema: {:?}, actual schema: {:?}",
schema.fields,
batch.schema().fields
);

if schema.fields().len() != batch.num_columns() {
return Err(ErrorCode::Internal(format!(
Expand Down

0 comments on commit 9207773

Please sign in to comment.