advancedxy commented on code in PR #271:
URL:
https://github.com/apache/arrow-datafusion-comet/pull/271#discussion_r1566856148
##########
core/src/execution/operators/copy.rs:
##########
@@ -149,7 +149,10 @@ impl CopyStream {
.iter()
.map(|v| copy_or_cast_array(v))
.collect::<Result<Vec<ArrayRef>, _>>()?;
- RecordBatch::try_new(self.schema.clone(), vectors).map_err(|e|
arrow_datafusion_err!(e))
+
+ let options =
RecordBatchOptions::new().with_row_count(Some(batch.num_rows()));
+ RecordBatch::try_new_with_options(self.schema.clone(), vectors,
&options)
Review Comment:
Maybe we should also check is there any other invocation of
`RecordBatch::try_new` in the codebase and replace it with
`RecordBatch::try_new_with_options` if necessary.
I just did a code search, maybe we probably need to revise the code in
Expand.rs too:
https://github.com/apache/arrow-datafusion-comet/blob/main/core/src/execution/datafusion/operators/expand.rs#L172
Of course, it should be done in a follow up PR.
--
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]