Skip to content

Conversation

@comphead
Copy link
Contributor

Which issue does this PR close?

Related to #6740
#7115
#7293

Closes #.

Rationale for this change

Add internal_err! error macro to replace DatafusionError::Internal with more concise code and make error handling in single place

What changes are included in this PR?

Are these changes tested?

Existing tests

Are there any user-facing changes?

No

@github-actions github-actions bot added sql SQL Planner logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates optimizer Optimizer rules core Core DataFusion crate substrait Changes to the substrait crate labels Aug 17, 2023
@comphead
Copy link
Contributor Author

@alamb this is follow up for #7293

I have wrongly configured file filters in VSCode and missed a good bunch of DataFusionError::Internal entries, this PR to catch up all missing entries

@comphead comphead marked this pull request as ready for review August 17, 2023 17:37
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @comphead -- again epic work. I am going to merge this quickly to avoid accumulating conflicts

Err(DataFusionError::Internal(
"function left requires compilation with feature flag: unicode_expressions.".to_string()
)),
internal_err!(
Copy link
Contributor

Choose a reason for hiding this comment

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

This wasn't caused by this PR, but it almost seems like these should be plan_err! rather than internal_err! (though maybe they are internal because this should have been checked earlier


SQLExpr::ArrayIndex { obj, indexes } => {
let expr = self.sql_expr_to_logical_expr(*obj, schema, planner_context)?;
let expr =
Copy link
Contributor

Choose a reason for hiding this comment

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

it is interesting that this file was reformatted without changes 🤔

@alamb alamb merged commit c502686 into apache:main Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate logical-expr Logical plan and expressions optimizer Optimizer rules physical-expr Changes to the physical-expr crates sql SQL Planner substrait Changes to the substrait crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants