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/05/17 19:11:30 UTC

[PR] Minor: Fix names in ArrayFunctionRewriter [datafusion]

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

   ## Which issue does this PR close?
   
   N/A
   
   ## Rationale for this change
   
   While debugging a DataFusion upgrade in InfluxDB the different names for the same thing is making it hard to understand what is going on
   
   ## What changes are included in this PR?
   
   1. Change name reported by ArrayFunctionRewriter to be correct
   2. Update error to reflect how these should be rewritten
   ## 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
   3. 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] Minor: Fix name in ArrayFunctionRewriter, error not panic if `Expr::GetStructField` is planned [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed pull request #10564: Minor: Fix name in ArrayFunctionRewriter, error not panic if `Expr::GetStructField` is planned
URL: https://github.com/apache/datafusion/pull/10564


-- 
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] Minor: Fix name in ArrayFunctionRewriter, error not panic if `Expr::GetStructField` is planned [datafusion]

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


##########
datafusion/core/src/physical_planner.rs:
##########
@@ -234,7 +234,7 @@ fn create_physical_name(e: &Expr, is_first_expr: bool) -> Result<String> {
                     stride: _,
                 } => {
                     unreachable!(
-                        "ListRange should have been rewritten in OperatorToFunction"
+                        "ListRange should have been rewritten in ArrayFunctionRewriter"

Review Comment:
   Indeed -- it panics here: https://github.com/apache/datafusion/issues/10565
   



-- 
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] Minor: Fix names in ArrayFunctionRewriter [datafusion]

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


##########
datafusion/core/src/physical_planner.rs:
##########
@@ -234,7 +234,7 @@ fn create_physical_name(e: &Expr, is_first_expr: bool) -> Result<String> {
                     stride: _,
                 } => {
                     unreachable!(
-                        "ListRange should have been rewritten in OperatorToFunction"
+                        "ListRange should have been rewritten in ArrayFunctionRewriter"

Review Comment:
   Actually, now that I think about this I think the issue is that we now expect that these Exprs should never be present....
   
   I think they can still be created via `Expr::field(name)`... 
   
   Will double check / see if I can make a reproduicer



-- 
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] Minor: Fix names in ArrayFunctionRewriter [datafusion]

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


##########
datafusion/core/src/physical_planner.rs:
##########
@@ -234,7 +234,7 @@ fn create_physical_name(e: &Expr, is_first_expr: bool) -> Result<String> {
                     stride: _,
                 } => {
                     unreachable!(
-                        "ListRange should have been rewritten in OperatorToFunction"
+                        "ListRange should have been rewritten in ArrayFunctionRewriter"

Review Comment:
   OperatorToFunction was the old name for these functions I think



-- 
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] Minor: Fix name in ArrayFunctionRewriter, error not panic if `Expr::GetStructField` is planned [datafusion]

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

   @jayzhan211  has a better fix in https://github.com/apache/datafusion/pull/10568


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