-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23913][SQL] Add array_intersect function #21102
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
Closed
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
bc5a02d
initial commit
kiszk c7f230d
simplification
kiszk e96ab2d
fix pyspark test failure
kiszk 49bc319
update
kiszk 4ec43b1
add missing file
kiszk 2c30351
fix test failure
kiszk 74103ce
update
kiszk 387d0ca
fix compilation failure
kiszk e374aa9
fix test failures
kiszk e31f7e6
minor refactoring
kiszk 9818ba9
update
kiszk 352743f
address review comment
kiszk 89a828b
avoid to use OpenHashSet.remove method
kiszk 90fecd5
update dataType setting
kiszk 663358e
update
kiszk 3ef99b8
optimize nullchecks in generated code
kiszk 3462b98
update
kiszk cf742d4
refactor methods that are used in Except and Intersect
kiszk 6fba1ee
update
kiszk ce755e2
address review comments
kiszk 33781b6
address review comment
kiszk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
address review comments
- Loading branch information
commit ce755e2b049ca000d6da754654b792e181e6d904
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1679,26 +1679,26 @@ class DataFrameFunctionsSuite extends QueryTest with SharedSQLContext { | |
| val df6 = Seq((null, null)).toDF("a", "b") | ||
| intercept[AnalysisException] { | ||
|
||
| df6.select(array_intersect($"a", $"b")) | ||
| } | ||
| }.getMessage.contains("data type mismatch") | ||
| intercept[AnalysisException] { | ||
| df6.selectExpr("array_intersect(a, b)") | ||
| } | ||
| }.getMessage.contains("data type mismatch") | ||
|
|
||
| val df7 = Seq((Array(1), Array("a"))).toDF("a", "b") | ||
| intercept[AnalysisException] { | ||
| df7.select(array_intersect($"a", $"b")) | ||
| } | ||
| }.getMessage.contains("data type mismatch") | ||
| intercept[AnalysisException] { | ||
| df7.selectExpr("array_intersect(a, b)") | ||
| } | ||
| }.getMessage.contains("data type mismatch") | ||
|
|
||
| val df8 = Seq((null, Array("a"))).toDF("a", "b") | ||
| intercept[AnalysisException] { | ||
| df8.select(array_intersect($"a", $"b")) | ||
| } | ||
| }.getMessage.contains("data type mismatch") | ||
| intercept[AnalysisException] { | ||
| df8.selectExpr("array_intersect(a, b)") | ||
| } | ||
| }.getMessage.contains("data type mismatch") | ||
| } | ||
|
|
||
| test("transform function - array for primitive type not containing null") { | ||
|
|
||
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.
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.
nit:
Array.emptyorArray.emptyObjectArray?