You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jackwener (via GitHub)" <gi...@apache.org> on 2023/02/19 15:27:50 UTC

[GitHub] [arrow-datafusion] jackwener opened a new pull request, #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

jackwener opened a new pull request, #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337

   # Which issue does this PR close?
   
   Closes #.
   
   # Rationale for this change
   
   When I do #4465, I find `push_down_filter` exist dead-loop.
   
   So I fix this problem, and refactor it.
   
   # 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 these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   # 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] jackwener commented on a diff in pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117878297


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -792,29 +786,32 @@ mod tests {
     };
     use std::sync::Arc;
 
-    fn assert_optimized_plan_eq(plan: &LogicalPlan, expected: &str) -> Result<()> {
-        let optimized_plan = PushDownFilter::new()
-            .try_optimize(plan, &OptimizerContext::new())
-            .unwrap()
-            .expect("failed to optimize plan");
-        let formatted_plan = format!("{optimized_plan:?}");
-        assert_eq!(plan.schema(), optimized_plan.schema());
-        assert_eq!(expected, formatted_plan);
-        Ok(())
+    fn assert_optimized_plan_equal(plan: &LogicalPlan, expected: &str) -> Result<()> {

Review Comment:
   Because name exist conflict😂.
   
   790 line use  `assert_optimized_plan_eq`



-- 
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] jackwener commented on a diff in pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117878297


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -792,29 +786,32 @@ mod tests {
     };
     use std::sync::Arc;
 
-    fn assert_optimized_plan_eq(plan: &LogicalPlan, expected: &str) -> Result<()> {
-        let optimized_plan = PushDownFilter::new()
-            .try_optimize(plan, &OptimizerContext::new())
-            .unwrap()
-            .expect("failed to optimize plan");
-        let formatted_plan = format!("{optimized_plan:?}");
-        assert_eq!(plan.schema(), optimized_plan.schema());
-        assert_eq!(expected, formatted_plan);
-        Ok(())
+    fn assert_optimized_plan_equal(plan: &LogicalPlan, expected: &str) -> Result<()> {

Review Comment:
   Because name exist conflict😂



-- 
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] HaoYang670 commented on a diff in pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "HaoYang670 (via GitHub)" <gi...@apache.org>.
HaoYang670 commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117879732


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -792,29 +786,32 @@ mod tests {
     };
     use std::sync::Arc;
 
-    fn assert_optimized_plan_eq(plan: &LogicalPlan, expected: &str) -> Result<()> {
-        let optimized_plan = PushDownFilter::new()
-            .try_optimize(plan, &OptimizerContext::new())
-            .unwrap()
-            .expect("failed to optimize plan");
-        let formatted_plan = format!("{optimized_plan:?}");
-        assert_eq!(plan.schema(), optimized_plan.schema());
-        assert_eq!(expected, formatted_plan);
-        Ok(())
+    fn assert_optimized_plan_equal(plan: &LogicalPlan, expected: &str) -> Result<()> {

Review Comment:
   This works for me, but this is a nit:
   ```rust
       fn assert_optimized_plan_eq(plan: &LogicalPlan, expected: &str) -> Result<()> {
           crate::test::assert_optimized_plan_eq(Arc::new(PushDownFilter::new()), plan, expected)
       }
   ```



-- 
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] HaoYang670 commented on a diff in pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "HaoYang670 (via GitHub)" <gi...@apache.org>.
HaoYang670 commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117872906


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -792,29 +786,32 @@ mod tests {
     };
     use std::sync::Arc;
 
-    fn assert_optimized_plan_eq(plan: &LogicalPlan, expected: &str) -> Result<()> {
-        let optimized_plan = PushDownFilter::new()
-            .try_optimize(plan, &OptimizerContext::new())
-            .unwrap()
-            .expect("failed to optimize plan");
-        let formatted_plan = format!("{optimized_plan:?}");
-        assert_eq!(plan.schema(), optimized_plan.schema());
-        assert_eq!(expected, formatted_plan);
-        Ok(())
+    fn assert_optimized_plan_equal(plan: &LogicalPlan, expected: &str) -> Result<()> {

Review Comment:
   Why do we rename the function here ?



-- 
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] HaoYang670 commented on pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "HaoYang670 (via GitHub)" <gi...@apache.org>.
HaoYang670 commented on PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#issuecomment-1445020195

   > When I do https://github.com/apache/arrow-datafusion/pull/4465, I find push_down_filter exist dead-loop.
   So I fix this problem, and refactor it.
   
   It could be better to file an issue to explain when the `dead_loop` would happen, but this is optional.


-- 
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] jackwener merged pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener merged PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337


-- 
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] HaoYang670 commented on a diff in pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "HaoYang670 (via GitHub)" <gi...@apache.org>.
HaoYang670 commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117879732


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -792,29 +786,32 @@ mod tests {
     };
     use std::sync::Arc;
 
-    fn assert_optimized_plan_eq(plan: &LogicalPlan, expected: &str) -> Result<()> {
-        let optimized_plan = PushDownFilter::new()
-            .try_optimize(plan, &OptimizerContext::new())
-            .unwrap()
-            .expect("failed to optimize plan");
-        let formatted_plan = format!("{optimized_plan:?}");
-        assert_eq!(plan.schema(), optimized_plan.schema());
-        assert_eq!(expected, formatted_plan);
-        Ok(())
+    fn assert_optimized_plan_equal(plan: &LogicalPlan, expected: &str) -> Result<()> {

Review Comment:
   This works for me, but it is just a nit:
   ```rust
       fn assert_optimized_plan_eq(plan: &LogicalPlan, expected: &str) -> Result<()> {
           crate::test::assert_optimized_plan_eq(Arc::new(PushDownFilter::new()), plan, expected)
       }
   ```



-- 
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] HaoYang670 commented on pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "HaoYang670 (via GitHub)" <gi...@apache.org>.
HaoYang670 commented on PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#issuecomment-1445023958

   > When you just run  cargo test -p datafusion --test tpcds_planning, it's ok.
   But run cargo test, it will dead loop.
   
   We'd better figure out what happens, so that the fix can make sense to every one.


-- 
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] jackwener commented on a diff in pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117881218


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -792,29 +786,32 @@ mod tests {
     };
     use std::sync::Arc;
 
-    fn assert_optimized_plan_eq(plan: &LogicalPlan, expected: &str) -> Result<()> {
-        let optimized_plan = PushDownFilter::new()
-            .try_optimize(plan, &OptimizerContext::new())
-            .unwrap()
-            .expect("failed to optimize plan");
-        let formatted_plan = format!("{optimized_plan:?}");
-        assert_eq!(plan.schema(), optimized_plan.schema());
-        assert_eq!(expected, formatted_plan);
-        Ok(())
+    fn assert_optimized_plan_equal(plan: &LogicalPlan, expected: &str) -> Result<()> {

Review Comment:
   Thank you @HaoYang670 



-- 
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] jackwener commented on pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#issuecomment-1445022163

   > > When I do #4465, I find push_down_filter exist dead-loop.
   > > So I fix this problem, and refactor it.
   > 
   > It could be better to file an issue to explain when the `dead_loop` would happen, but this is optional.
   
   This is strange thing🥹
   When you just run ` cargo test -p datafusion --test tpcds_planning`, it's ok.
   But run `cargo test`, it will dead loop.


-- 
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] HaoYang670 commented on a diff in pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "HaoYang670 (via GitHub)" <gi...@apache.org>.
HaoYang670 commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117879732


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -792,29 +786,32 @@ mod tests {
     };
     use std::sync::Arc;
 
-    fn assert_optimized_plan_eq(plan: &LogicalPlan, expected: &str) -> Result<()> {
-        let optimized_plan = PushDownFilter::new()
-            .try_optimize(plan, &OptimizerContext::new())
-            .unwrap()
-            .expect("failed to optimize plan");
-        let formatted_plan = format!("{optimized_plan:?}");
-        assert_eq!(plan.schema(), optimized_plan.schema());
-        assert_eq!(expected, formatted_plan);
-        Ok(())
+    fn assert_optimized_plan_equal(plan: &LogicalPlan, expected: &str) -> Result<()> {

Review Comment:
   This works for me, although this is a nit:
   ```rust
       fn assert_optimized_plan_eq(plan: &LogicalPlan, expected: &str) -> Result<()> {
           crate::test::assert_optimized_plan_eq(Arc::new(PushDownFilter::new()), plan, expected)
       }
   ```



-- 
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] jackwener commented on a diff in pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117883097


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -511,25 +511,20 @@ impl OptimizerRule for PushDownFilter {
         "push_down_filter"
     }
 
+    fn apply_order(&self) -> Option<ApplyOrder> {
+        Some(ApplyOrder::TopDown)
+    }
+
     fn try_optimize(
         &self,
         plan: &LogicalPlan,
-        config: &dyn OptimizerConfig,
+        _config: &dyn OptimizerConfig,

Review Comment:
   > Will it lose information if we disable `config` here?
   
   I didn't disable it, just because it's only used recursively, so it needs to be prefixed with `_`.
   
   It's hint by `cargo clippy`
   



-- 
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] jackwener commented on pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#issuecomment-1445024492

   > > When you just run  cargo test -p datafusion --test tpcds_planning, it's ok.
   > > But run cargo test, it will dead loop.
   > 
   > We'd better figure out what happens, so that the fix can make sense to every one.
   
   I think it's due to by original code in `line -522 to -532`


-- 
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] ursabot commented on pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "ursabot (via GitHub)" <gi...@apache.org>.
ursabot commented on PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#issuecomment-1445205700

   Benchmark runs are scheduled for baseline = 8b92b9b6c51ae46963481fcd0b77156699f16909 and contender = 0b77ec27c8f992436e30fd878667730f01614406. 0b77ec27c8f992436e30fd878667730f01614406 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/04c501b950524db29140e9eda0bdb6b9...809f12d22bfd4ff6a52551babecda8a9/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/7d98504846e94ce78571a7b24b28286a...01bb873e66994c9fa12a9e03925dbbf5/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/77b3676a4b5b4247862cb122b8913a44...c7bcbd1e73024757b06da7f403468aca/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/6890aa28e3f04236b93c510f7f75ca19...9f73e55311604773a4903c02725c7aa8/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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] jackwener commented on a diff in pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117884836


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -511,25 +511,20 @@ impl OptimizerRule for PushDownFilter {
         "push_down_filter"
     }
 
+    fn apply_order(&self) -> Option<ApplyOrder> {
+        Some(ApplyOrder::TopDown)
+    }
+
     fn try_optimize(
         &self,
         plan: &LogicalPlan,
-        config: &dyn OptimizerConfig,
+        _config: &dyn OptimizerConfig,
     ) -> Result<Option<LogicalPlan>> {
         let filter = match plan {
             LogicalPlan::Filter(filter) => filter,
             // we also need to pushdown filter in Join.
-            LogicalPlan::Join(join) => {
-                let optimized_plan = push_down_join(plan, join, None)?;
-                return match optimized_plan {
-                    Some(optimized_plan) => Ok(Some(
-                        optimize_children(self, &optimized_plan, config)?
-                            .unwrap_or(optimized_plan),
-                    )),
-                    None => optimize_children(self, plan, config),
-                };
-            }
-            _ => return optimize_children(self, plan, config),

Review Comment:
   @HaoYang670 Here remove a risk recursion.



-- 
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] HaoYang670 commented on a diff in pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "HaoYang670 (via GitHub)" <gi...@apache.org>.
HaoYang670 commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117884001


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -511,25 +511,20 @@ impl OptimizerRule for PushDownFilter {
         "push_down_filter"
     }
 
+    fn apply_order(&self) -> Option<ApplyOrder> {
+        Some(ApplyOrder::TopDown)
+    }
+
     fn try_optimize(
         &self,
         plan: &LogicalPlan,
-        config: &dyn OptimizerConfig,
+        _config: &dyn OptimizerConfig,

Review Comment:
   > just because it's only used recursively
   
   In the original code, we pass the `config` to the `optimize_children`, but now, it is just a placeholder for self recursion, which means we never use the `config` anymore.



-- 
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] HaoYang670 commented on a diff in pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "HaoYang670 (via GitHub)" <gi...@apache.org>.
HaoYang670 commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117879091


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -792,29 +786,32 @@ mod tests {
     };
     use std::sync::Arc;
 
-    fn assert_optimized_plan_eq(plan: &LogicalPlan, expected: &str) -> Result<()> {
-        let optimized_plan = PushDownFilter::new()
-            .try_optimize(plan, &OptimizerContext::new())
-            .unwrap()
-            .expect("failed to optimize plan");
-        let formatted_plan = format!("{optimized_plan:?}");
-        assert_eq!(plan.schema(), optimized_plan.schema());
-        assert_eq!(expected, formatted_plan);
-        Ok(())
+    fn assert_optimized_plan_equal(plan: &LogicalPlan, expected: &str) -> Result<()> {

Review Comment:
   Oh, I see



-- 
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] HaoYang670 commented on a diff in pull request #5337: refactor `push_down_filter` to fix dead-loop and use optimizer_recurse.

Posted by "HaoYang670 (via GitHub)" <gi...@apache.org>.
HaoYang670 commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117881895


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -511,25 +511,20 @@ impl OptimizerRule for PushDownFilter {
         "push_down_filter"
     }
 
+    fn apply_order(&self) -> Option<ApplyOrder> {
+        Some(ApplyOrder::TopDown)
+    }
+
     fn try_optimize(
         &self,
         plan: &LogicalPlan,
-        config: &dyn OptimizerConfig,
+        _config: &dyn OptimizerConfig,

Review Comment:
   Will it lose information if we disable `config` here?



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