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 2022/01/14 05:09:02 UTC

[GitHub] [arrow-datafusion] yjshen opened a new pull request #1562: Consolidate configurations in `ExecutionConfig`, `RuntimeConfig` and `PhysicalPlanConfig`

yjshen opened a new pull request #1562:
URL: https://github.com/apache/arrow-datafusion/pull/1562


   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
    # Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


-- 
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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] alamb merged pull request #1562: Consolidate `batch_size` configuration in `ExecutionConfig`, `RuntimeConfig` and `PhysicalPlanConfig`

Posted by GitBox <gi...@apache.org>.
alamb merged pull request #1562:
URL: https://github.com/apache/arrow-datafusion/pull/1562


   


-- 
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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] yjshen commented on pull request #1562: Consolidate `batch_size` configuration in `ExecutionConfig`, `RuntimeConfig` and `PhysicalPlanConfig`

Posted by GitBox <gi...@apache.org>.
yjshen commented on pull request #1562:
URL: https://github.com/apache/arrow-datafusion/pull/1562#issuecomment-1015052234


   Thanks @alamb , the main reason I'm not moving `object_store` into `RuntimeEnv` is that it's used both during query planning and query execution. What do you think?
   
   I was trying to consolidate more of the configs from the three `Config` as the initial name for this PR shows. But after a round of review of all the configurations, I find only one `batch_size` weird.  Do you have any other config in mind?


-- 
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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] alamb edited a comment on pull request #1562: Consolidate configurations in `ExecutionConfig`, `RuntimeConfig` and `PhysicalPlanConfig`

Posted by GitBox <gi...@apache.org>.
alamb edited a comment on pull request #1562:
URL: https://github.com/apache/arrow-datafusion/pull/1562#issuecomment-1013428520


   Thanks @yjshen  -- I'll check this out over the weekend.
   
   ~BTW are you planning on working on the next steps for https://github.com/apache/arrow-datafusion/pull/1526 (external sorting)? I would be interested in working on this area too, but I don't want to conflict with your plans.~
   
   I found https://github.com/apache/arrow-datafusion/pull/1526#issuecomment-1012716591 -- sorry


-- 
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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] alamb commented on a change in pull request #1562: Consolidate `batch_size` configuration in `ExecutionConfig`, `RuntimeConfig` and `PhysicalPlanConfig`

Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #1562:
URL: https://github.com/apache/arrow-datafusion/pull/1562#discussion_r785437868



##########
File path: ballista/rust/core/src/serde/logical_plan/from_proto.rs
##########
@@ -246,8 +246,8 @@ impl TryInto<LogicalPlan> for &protobuf::LogicalPlanNode {
                             .collect::<Result<Vec<_>, _>>()?,
                         partition_count as usize,
                     ),
-                    PartitionMethod::RoundRobin(batch_size) => {
-                        Partitioning::RoundRobinBatch(batch_size as usize)
+                    PartitionMethod::RoundRobin(partition_count) => {

Review comment:
       nice find

##########
File path: datafusion/src/datasource/file_format/csv.rs
##########
@@ -178,7 +178,7 @@ mod tests {
     async fn read_limit() -> Result<()> {
         let runtime = Arc::new(RuntimeEnv::default());
         let projection = Some(vec![0, 1, 2, 3]);
-        let exec = get_exec("aggregate_test_100.csv", &projection, 1024, Some(1)).await?;
+        let exec = get_exec("aggregate_test_100.csv", &projection, Some(1)).await?;

Review comment:
       I think the idea of putting `batch_size` on the `RuntimeConfig` is 🏅  👍 




-- 
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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] yjshen commented on a change in pull request #1562: Consolidate configurations in `ExecutionConfig`, `RuntimeConfig` and `PhysicalPlanConfig`

Posted by GitBox <gi...@apache.org>.
yjshen commented on a change in pull request #1562:
URL: https://github.com/apache/arrow-datafusion/pull/1562#discussion_r784709208



##########
File path: ballista/rust/core/src/serde/logical_plan/from_proto.rs
##########
@@ -246,8 +246,8 @@ impl TryInto<LogicalPlan> for &protobuf::LogicalPlanNode {
                             .collect::<Result<Vec<_>, _>>()?,
                         partition_count as usize,
                     ),
-                    PartitionMethod::RoundRobin(batch_size) => {
-                        Partitioning::RoundRobinBatch(batch_size as usize)
+                    PartitionMethod::RoundRobin(partition_count) => {

Review comment:
       `batch_size` here is wrong, it's partition count 

##########
File path: ballista/rust/core/src/serde/logical_plan/mod.rs
##########
@@ -92,8 +92,8 @@ mod roundtrip_tests {
             .map_err(BallistaError::DataFusionError)?,
         );
 
-        for batch_size in test_batch_sizes.iter() {
-            let rr_repartition = Partitioning::RoundRobinBatch(*batch_size);
+        for partition_count in test_partition_counts.iter() {

Review comment:
       same here

##########
File path: datafusion/src/datasource/file_format/csv.rs
##########
@@ -178,7 +178,7 @@ mod tests {
     async fn read_limit() -> Result<()> {
         let runtime = Arc::new(RuntimeEnv::default());
         let projection = Some(vec![0, 1, 2, 3]);
-        let exec = get_exec("aggregate_test_100.csv", &projection, 1024, Some(1)).await?;
+        let exec = get_exec("aggregate_test_100.csv", &projection, Some(1)).await?;

Review comment:
       After this PR, most of the magic number `1024` is removed from the project.

##########
File path: datafusion/src/execution/context.rs
##########
@@ -901,14 +898,13 @@ pub struct ExecutionConfig {
     /// Should Datafusion parquet reader using the predicate to prune data
     parquet_pruning: bool,
     /// Runtime configurations such as memory threshold and local disk for spill
-    pub runtime_config: RuntimeConfig,
+    pub runtime: RuntimeConfig,

Review comment:
       Renamed to `runtime` since I think the word config is useless. Consider the usage `exec_config.runtime_config.batch_size` for example. Everything in `exec_config` is config.




-- 
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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] alamb commented on pull request #1562: Consolidate `batch_size` configuration in `ExecutionConfig`, `RuntimeConfig` and `PhysicalPlanConfig`

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #1562:
URL: https://github.com/apache/arrow-datafusion/pull/1562#issuecomment-1015615359


   >  Do you have any other config in mind?
   
   No, `object_store` was the one I had in mind; If anything else occurs to me I will let you know


-- 
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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] houqp commented on a change in pull request #1562: Consolidate `batch_size` configuration in `ExecutionConfig`, `RuntimeConfig` and `PhysicalPlanConfig`

Posted by GitBox <gi...@apache.org>.
houqp commented on a change in pull request #1562:
URL: https://github.com/apache/arrow-datafusion/pull/1562#discussion_r790474925



##########
File path: ballista/rust/core/src/serde/logical_plan/from_proto.rs
##########
@@ -246,8 +246,8 @@ impl TryInto<LogicalPlan> for &protobuf::LogicalPlanNode {
                             .collect::<Result<Vec<_>, _>>()?,
                         partition_count as usize,
                     ),
-                    PartitionMethod::RoundRobin(batch_size) => {
-                        Partitioning::RoundRobinBatch(batch_size as usize)
+                    PartitionMethod::RoundRobin(partition_count) => {

Review comment:
       oh god, good find, 4096 partitions is not going to be fun.




-- 
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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] alamb commented on pull request #1562: Consolidate configurations in `ExecutionConfig`, `RuntimeConfig` and `PhysicalPlanConfig`

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #1562:
URL: https://github.com/apache/arrow-datafusion/pull/1562#issuecomment-1013428520


   Thanks @yjshen  -- I'll check this out over the weekend.
   
   BTW are you planning on working on the next steps for https://github.com/apache/arrow-datafusion/pull/1526 (external sorting)? I would be interested in working on this area too, but I don't want to conflict with your plans.
   
   Perhaps I can file some tickets for the major items I see? I am sorry if you have written this down and I missed it. It has been a hectic week for me


-- 
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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] yjshen commented on a change in pull request #1562: Consolidate configurations in `ExecutionConfig`, `RuntimeConfig` and `PhysicalPlanConfig`

Posted by GitBox <gi...@apache.org>.
yjshen commented on a change in pull request #1562:
URL: https://github.com/apache/arrow-datafusion/pull/1562#discussion_r784712799



##########
File path: datafusion/src/execution/context.rs
##########
@@ -901,14 +898,13 @@ pub struct ExecutionConfig {
     /// Should Datafusion parquet reader using the predicate to prune data
     parquet_pruning: bool,
     /// Runtime configurations such as memory threshold and local disk for spill
-    pub runtime_config: RuntimeConfig,
+    pub runtime: RuntimeConfig,

Review comment:
       Renamed to `runtime` since I think the word config is redundant. Consider the usage `exec_config.runtime_config.batch_size` for example. Everything in `exec_config` is config.




-- 
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: github-unsubscribe@arrow.apache.org

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