-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-31553][SQL] Revert "[SPARK-29048] Improve performance on Column.isInCollection() with a large size collection" #28388
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…with a large size collection" This reverts commit 5631a96.
Member
Author
|
@HyukjinKwon @cloud-fan @gatorsmile Please, take a look at the PR. |
Member
Author
|
also cc @WeichenXu123 @dongjoon-hyun @maropu |
viirya
approved these changes
Apr 28, 2020
maropu
approved these changes
Apr 28, 2020
HyukjinKwon
approved these changes
Apr 28, 2020
cloud-fan
approved these changes
Apr 28, 2020
|
Test build #121969 has finished for PR 28388 at commit
|
Contributor
|
thanks, merging to master/3.0! |
cloud-fan
pushed a commit
that referenced
this pull request
Apr 28, 2020
…n.isInCollection() with a large size collection" ### What changes were proposed in this pull request? This reverts commit 5631a96. Closes #28328 ### Why are the changes needed? The PR #25754 introduced a bug in `isInCollection`. For example, if the SQL config `spark.sql.optimizer.inSetConversionThreshold`is set to 10 (by default): ```scala val set = (0 to 20).map(_.toString).toSet val data = Seq("1").toDF("x") data.select($"x".isInCollection(set).as("isInCollection")).show() ``` The function must return **'true'** because "1" is in the set of "0" ... "20" but it returns "false": ``` +--------------+ |isInCollection| +--------------+ | false| +--------------+ ``` ### Does this PR introduce any user-facing change? Yes ### How was this patch tested? ``` $ ./build/sbt "test:testOnly *ColumnExpressionSuite" ``` Closes #28388 from MaxGekk/fix-isInCollection-revert. Authored-by: Max Gekk <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit b7cabc8) Signed-off-by: Wenchen Fan <[email protected]>
Member
|
+1, late LGTM. Thank you for reverting. |
cloud-fan
pushed a commit
that referenced
this pull request
Apr 30, 2020
…f `isInCollection` ### What changes were proposed in this pull request? - Add tests for different element types of collections that could be passed to `isInCollection`. Added tests for types that can pass the check `In`.`checkInputDataTypes()`. - Test different switch thresholds in the `isInCollection: Scala Collection` test. ### Why are the changes needed? To prevent regressions like introduced by #25754 and reverted by #28388 ### Does this PR introduce any user-facing change? No ### How was this patch tested? By existing and new tests in `ColumnExpressionSuite` Closes #28405 from MaxGekk/test-isInCollection. Authored-by: Max Gekk <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
cloud-fan
pushed a commit
that referenced
this pull request
Apr 30, 2020
…f `isInCollection` ### What changes were proposed in this pull request? - Add tests for different element types of collections that could be passed to `isInCollection`. Added tests for types that can pass the check `In`.`checkInputDataTypes()`. - Test different switch thresholds in the `isInCollection: Scala Collection` test. ### Why are the changes needed? To prevent regressions like introduced by #25754 and reverted by #28388 ### Does this PR introduce any user-facing change? No ### How was this patch tested? By existing and new tests in `ColumnExpressionSuite` Closes #28405 from MaxGekk/test-isInCollection. Authored-by: Max Gekk <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit 9164865) Signed-off-by: Wenchen Fan <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This reverts commit 5631a96.
Closes #28328
Why are the changes needed?
The PR #25754 introduced a bug in
isInCollection. For example, if the SQL configspark.sql.optimizer.inSetConversionThresholdis set to 10 (by default):The function must return 'true' because "1" is in the set of "0" ... "20" but it returns "false":
Does this PR introduce any user-facing change?
Yes
How was this patch tested?