houqp commented on a change in pull request #972:
URL: https://github.com/apache/arrow-datafusion/pull/972#discussion_r707547470
##########
File path: datafusion/src/datasource/memory.rs
##########
@@ -115,7 +115,7 @@ impl MemTable {
output_partitions: Option<usize>,
) -> Result<Self> {
let schema = t.schema();
- let exec = t.scan(&None, batch_size, &[], None)?;
+ let exec = t.scan(&None, batch_size, &[], None, num_cpus::get())?;
Review comment:
I agree with @Dandandan on this one. Even though `MemTable::scan` is not
using `target_partitions`, the passed in table provider `t`'s `scan` method
might actually use it. Given `load` is defined as a pub method, I am concerned
that there are downstream code calling this method. If it's a private method
only used in test, then I think it would be fine to hard code the partition
count to cpu cores here.
In short, I recommend adding the partition value as an argument to the
`load` method and let caller handle the value resolution.
--
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]