alamb commented on code in PR #4514:
URL: https://github.com/apache/arrow-datafusion/pull/4514#discussion_r1039708348


##########
datafusion/core/tests/sqllogictests/src/insert/mod.rs:
##########
@@ -74,12 +72,20 @@ pub async fn insert(ctx: &SessionContext, insert_stmt: 
&SQLStatement) -> Result<
             .collect::<std::result::Result<Vec<DFExpr>, DataFusionError>>()?;
         // Directly use `select` to get `RecordBatch`
         let dataframe = ctx.read_empty()?;
-        insert_batches.push(dataframe.select(logical_exprs)?.collect().await?)
+        
insert_batches.extend(dataframe.select(logical_exprs)?.collect().await?)

Review Comment:
   I wonder if you could make this
   
   ```suggestion
           
origin_batches.extend(dataframe.select(logical_exprs)?.collect().await?)
   ```
   
   And avoid the need for `insert_batches` entirely 🤔 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to