-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29239][SPARK-29221][SQL] Subquery should not cause NPE when eliminating subexpression #25925
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,7 +72,10 @@ class EquivalentExpressions { | |
| val skip = expr.isInstanceOf[LeafExpression] || | ||
| // `LambdaVariable` is usually used as a loop variable, which can't be evaluated ahead of the | ||
| // loop. So we can't evaluate sub-expressions containing `LambdaVariable` at the beginning. | ||
| expr.find(_.isInstanceOf[LambdaVariable]).isDefined | ||
| expr.find(_.isInstanceOf[LambdaVariable]).isDefined || | ||
| // `PlanExpression` wraps query plan. To compare query plans of `PlanExpression` on executor, | ||
| // can cause unexpected error. | ||
| expr.isInstanceOf[PlanExpression[_]] | ||
|
||
|
|
||
| // There are some special expressions that we should not recurse into all of its children. | ||
| // 1. CodegenFallback: it's children will not be used to generate code (call eval() instead) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there isn't any other reason, shall we mention NPE specifically instead of
unexpected error? Both SPARK-29239 and SPARK-29221 are due to NPE.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I updated this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding
including NPEafterunexpected error? IMHOunexpected erroris actually correct (we can't predict which error we will get), but it would help much if we enumerate known errors as well.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I realized my browser didn't show the comment from @viirya . It's just a 2 cents and
like NPEseems OK to me.