-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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-21832][TEST] Merge SQLBuilderTest into ExpressionSQLBuilderSuite #19044
Conversation
After SPARK-19025, there is no need to keep SQLBuilderTest. ExpressionSQLBuilderSuite is the only place to use it. This PR aims to remove SQLBuilderTest.
} | ||
} | ||
|
||
import org.apache.spark.sql.catalyst.dsl.expressions._ |
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.
Why moving here?
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.
Thank you for review, @gatorsmile . I thought we can remove SQLBuilderTest
because we will use SQL generation on expression level only.
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.
I mean the import.
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 see. There is overloading issue on ===
.
Line 31: ===
is string comparision.
assert(actualSQL === expectedSQL)
The import
is used to make predicate with ===
in the below test cases.
import org.apache.spark.sql.catalyst.dsl.expressions._
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.
Then, we should move it to the test case it needs such an import. Also add a comment there.
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.
Thank you. I'll update like that.
Test build #81101 has finished for PR 19044 at commit
|
protected def checkSQL(e: Expression, expectedSQL: String): Unit = { | ||
val actualSQL = e.sql | ||
try { | ||
assert(actualSQL === expectedSQL) |
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.
I thought just one test case required that import.
Since most cases require it, you just need to change ===
=> ==
. Then, you can move the import to the beginning of this file.
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.
I see. Yep. That's better.
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.
The PR is updated. Thanks!
Test build #81106 has finished for PR 19044 at commit
|
LGTM pending Jenkins |
Thank you for review, @gatorsmile ! |
Test build #81107 has finished for PR 19044 at commit
|
Retest this please. |
Test build #81113 has finished for PR 19044 at commit
|
Thanks! Merging to master. |
Thank you for review and merging, @gatorsmile . |
What changes were proposed in this pull request?
After SPARK-19025, there is no need to keep SQLBuilderTest.
ExpressionSQLBuilderSuite is the only place to use it.
This PR aims to remove SQLBuilderTest.
How was this patch tested?
Pass the updated
ExpressionSQLBuilderSuite
.