-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[SPARK-25690][SQL] Analyzer rule HandleNullInputsForUDF does not stabilize and can be applied infinitely #22701
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 |
---|---|---|
|
@@ -351,8 +351,8 @@ class AnalysisSuite extends AnalysisTest with Matchers { | |
test("SPARK-24891 Fix HandleNullInputsForUDF rule") { | ||
val a = testRelation.output(0) | ||
val func = (x: Int, y: Int) => x + y | ||
val udf1 = ScalaUDF(func, IntegerType, a :: a :: Nil) | ||
val udf2 = ScalaUDF(func, IntegerType, a :: udf1 :: Nil) | ||
val udf1 = ScalaUDF(func, IntegerType, a :: a :: Nil, nullableTypes = false :: false :: Nil) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So clearly we should make both of these changes. This change fixes the test here. But is the change above, involving There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's two separate issues. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, it sounds like we will have another 2.4 RC anyway, so we should get all of these changes in. |
||
val udf2 = ScalaUDF(func, IntegerType, a :: udf1 :: Nil, nullableTypes = false :: false :: Nil) | ||
val plan = Project(Alias(udf2, "")() :: Nil, testRelation) | ||
comparePlans(plan.analyze, plan.analyze.analyze) | ||
} | ||
|
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.
let us use the original way? create a val needsNullCheck. in the PR #21851