Skip to content

Commit 3b4dc9d

Browse files
committed
use try_new instead
1 parent 59a3428 commit 3b4dc9d

File tree

1 file changed

+3
-4
lines changed
  • crates/integrations/datafusion/src/physical_plan

1 file changed

+3
-4
lines changed

crates/integrations/datafusion/src/physical_plan/write.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,9 @@ impl IcebergWriteExec {
8989
fn make_result_batch(data_files: Vec<String>) -> DFResult<RecordBatch> {
9090
let files_array = Arc::new(StringArray::from(data_files)) as ArrayRef;
9191

92-
RecordBatch::try_from_iter_with_nullable(vec![(DATA_FILES_COL_NAME, files_array, false)])
93-
.map_err(|e| {
94-
DataFusionError::ArrowError(e, Some("Failed to make result batch".to_string()))
95-
})
92+
RecordBatch::try_new(Self::make_result_schema(), vec![files_array]).map_err(|e| {
93+
DataFusionError::ArrowError(e, Some("Failed to make result batch".to_string()))
94+
})
9695
}
9796

9897
fn make_result_schema() -> ArrowSchemaRef {

0 commit comments

Comments
 (0)