You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/20 14:31:39 UTC

[GitHub] [arrow] alamb commented on a change in pull request #9276: ARROW-11327: [Rust][DataFusion] Add DictionarySupport to create_batch_empty

alamb commented on a change in pull request #9276:
URL: https://github.com/apache/arrow/pull/9276#discussion_r561003845



##########
File path: rust/datafusion/src/physical_plan/common.rs
##########
@@ -121,121 +128,130 @@ pub fn build_file_list(dir: &str, filenames: &mut Vec<String>, ext: &str) -> Res
     Ok(())
 }
 
-/// creates an empty record batch.
+/// Creates an empty (0 row) record batch with the specified schema
 pub fn create_batch_empty(schema: &Schema) -> ArrowResult<RecordBatch> {
     let columns = schema
         .fields()
         .iter()
-        .map(|f| match f.data_type() {

Review comment:
       this code is just hoisted into its own function so it can be called recursively




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org