Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor: Fix name in ArrayFunctionRewriter, error not panic if Expr::GetStructField is planned #10564

Closed
wants to merge 3 commits into from

Conversation

alamb
Copy link
Contributor

@alamb alamb commented May 17, 2024

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?

Are there any user-facing changes?

@github-actions github-actions bot added the core Core DataFusion crate label May 17, 2024
@@ -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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OperatorToFunction was the old name for these functions I think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed -- it panics here: #10565

@alamb alamb marked this pull request as ready for review May 17, 2024 19:11
@alamb alamb marked this pull request as draft May 17, 2024 19:15
@alamb alamb changed the title Minor: Fix names in ArrayFunctionRewriter Minor: Fix name in ArrayFunctionRewriter May 17, 2024
@alamb alamb changed the title Minor: Fix name in ArrayFunctionRewriter Minor: Fix name in ArrayFunctionRewriter, error not panic if Expr::GetStructField is planned May 17, 2024
@alamb alamb marked this pull request as ready for review May 17, 2024 19:54
@alamb
Copy link
Contributor Author

alamb commented May 20, 2024

@jayzhan211 has a better fix in #10568

@alamb alamb closed this May 20, 2024
@alamb alamb deleted the alamb/fix_rewrite_name branch May 20, 2024 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant