You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "irenjj (via GitHub)" <gi...@apache.org> on 2024/11/19 12:17:13 UTC

[PR] Move `Pruning` into `physical-optimizer` crate [datafusion]

irenjj opened a new pull request, #13485:
URL: https://github.com/apache/datafusion/pull/13485

   ## 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.
   -->
   
   part of https://github.com/apache/datafusion/issues/11502.
   
   ## 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 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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Move `Pruning` into `physical-optimizer` crate [datafusion]

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

   Thanks @irenjj @alamb 


-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Move `Pruning` into `physical-optimizer` crate [datafusion]

Posted by "irenjj (via GitHub)" <gi...@apache.org>.
irenjj commented on code in PR #13485:
URL: https://github.com/apache/datafusion/pull/13485#discussion_r1848518604


##########
datafusion/physical-optimizer/Cargo.toml:
##########
@@ -37,11 +37,15 @@ arrow-schema = { workspace = true }
 datafusion-common = { workspace = true, default-features = true }
 datafusion-execution = { workspace = true }
 datafusion-expr-common = { workspace = true, default-features = true }
+datafusion-optimizer = { workspace = true }
 datafusion-physical-expr = { workspace = true }
 datafusion-physical-plan = { workspace = true }
 itertools = { workspace = true }
+log = { workspace = true }
 recursive = { workspace = true }
 
 [dev-dependencies]
+datafusion-expr = { workspace = true }

Review Comment:
   needed in test.



-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Move `Pruning` into `physical-optimizer` crate [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #13485:
URL: https://github.com/apache/datafusion/pull/13485#discussion_r1848291948


##########
datafusion/physical-optimizer/Cargo.toml:
##########
@@ -33,13 +33,17 @@ workspace = true
 
 [dependencies]
 arrow = { workspace = true }
+arrow-array = { workspace = true }
 arrow-schema = { workspace = true }
 datafusion-common = { workspace = true, default-features = true }
 datafusion-execution = { workspace = true }
 datafusion-expr-common = { workspace = true, default-features = true }
+datafusion-expr = { workspace = true, default-features = true }
+datafusion-functions-nested = { workspace = true }

Review Comment:
   Can you please move `datafusion-functions-nested` to `dev-dependencies`?
   
   I also think we can avoid the dependency on `datafusion-expr` by changing 
   
   ```rust
   use datafusion_expr::Operator;
   ```
   
   to 
   
   ```rust
   use datafusion_expr_common::operator::Operator;
   ```
   
   



##########
datafusion/physical-optimizer/Cargo.toml:
##########
@@ -33,13 +33,17 @@ workspace = true
 
 [dependencies]
 arrow = { workspace = true }
+arrow-array = { workspace = true }

Review Comment:
   If possible, can you avoid this explicit dependency? Whatever is used in arrow-array should be available in `arrow` and then we can keep the dependency chain simpler



-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Move `Pruning` into `physical-optimizer` crate [datafusion]

Posted by "irenjj (via GitHub)" <gi...@apache.org>.
irenjj commented on code in PR #13485:
URL: https://github.com/apache/datafusion/pull/13485#discussion_r1848379924


##########
datafusion/physical-optimizer/src/pruning.rs:
##########
@@ -22,12 +22,10 @@
 use std::collections::HashSet;

Review Comment:
   `datafusion-expr` dependency is needed by `//! [`Expr`]: crate::prelude::Expr`, should we remove the comment? @alamb 



-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Move `Pruning` into `physical-optimizer` crate [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #13485:
URL: https://github.com/apache/datafusion/pull/13485#discussion_r1848428636


##########
datafusion/physical-optimizer/src/pruning.rs:
##########
@@ -22,12 +22,10 @@
 use std::collections::HashSet;

Review Comment:
   In other places, we have changed the link to docs.rs directly. So in this case, change the link to
   
   https://docs.rs/datafusion/latest/datafusion/logical_expr/enum.Expr.html
   
   



-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Move `Pruning` into `physical-optimizer` crate [datafusion]

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


-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Move `Pruning` into `physical-optimizer` crate [datafusion]

Posted by "irenjj (via GitHub)" <gi...@apache.org>.
irenjj commented on code in PR #13485:
URL: https://github.com/apache/datafusion/pull/13485#discussion_r1848379924


##########
datafusion/physical-optimizer/src/pruning.rs:
##########
@@ -22,12 +22,10 @@
 use std::collections::HashSet;

Review Comment:
   `datafusion-expr` dependency is needed by `//! [Expr]: crate::prelude::Expr`, should we remove the comment to avoid introducing new dependencies? @alamb 



-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Move `Pruning` into `physical-optimizer` crate [datafusion]

Posted by "irenjj (via GitHub)" <gi...@apache.org>.
irenjj commented on code in PR #13485:
URL: https://github.com/apache/datafusion/pull/13485#discussion_r1848379924


##########
datafusion/physical-optimizer/src/pruning.rs:
##########
@@ -22,12 +22,10 @@
 use std::collections::HashSet;

Review Comment:
   `datafusion-expr` dependency is needed by `//! [Expr]: crate::prelude::Expr`, should we remove the comment? @alamb 



-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org