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

[PR] Require `Debug` for `AnalyzerRule`, `FunctionRewriter`, and `OptimizerRule` [datafusion]

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

   
   
   ## Which issue does this PR close?
   
   Part of https://github.com/apache/datafusion/issues/12555
   
   
   ## Rationale for this change
   
   I would like DataFusion to be easiser to configure and use, and having `Debug` impls for
   common structs would be a big help.
   
   ## What changes are included in this PR?
   
   1. Require `Debug` for `AnalyzerRule`, `FunctionRewriter`, and `OptimizerRule`
   2. `#derive` this trait as necessary
   
   ## Are these changes tested?
   Yes buy CI and the compiler
   
   ## Are there any user-facing changes?
   Technically this is an API change as it also adds the requirement for Debug for various optimizer rules, but I think that is  good thing.
   
   


-- 
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] Require `Debug` for `AnalyzerRule`, `FunctionRewriter`, and `OptimizerRule` [datafusion]

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

   🚀 


-- 
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] Require `Debug` for `AnalyzerRule`, `FunctionRewriter`, and `OptimizerRule` [datafusion]

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


##########
datafusion/optimizer/src/analyzer/mod.rs:
##########
@@ -72,7 +74,7 @@ pub trait AnalyzerRule {
 ///
 /// An `Analyzer` transforms a `LogicalPlan`
 /// prior to the rest of the DataFusion optimization process.
-#[derive(Clone)]
+#[derive(Clone, Debug)]

Review Comment:
   It will be nice to be able to see what rules are registered with the analyzer/optimizer 



-- 
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] Require `Debug` for `AnalyzerRule`, `FunctionRewriter`, and `OptimizerRule` [datafusion]

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


##########
datafusion-examples/examples/optimizer_rule.rs:
##########
@@ -100,6 +100,7 @@ pub async fn main() -> Result<()> {
 
 /// An example OptimizerRule that replaces all `col = <const>` predicates with a
 /// user defined function
+#[derive(Default, Debug)]

Review Comment:
   this is the end user visible change -- basically you have to `#[derive(Debug)]` if you haven't already



-- 
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] Require `Debug` for `AnalyzerRule`, `FunctionRewriter`, and `OptimizerRule` [datafusion]

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


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