-
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-21807][SQL]Override ++ operation in ExpressionSet to reduce clone time #19022
Changes from all commits
80af01a
7444a1c
1f5e0a3
88185ff
97803ce
8358351
6ee2ffd
57e8a3d
fec05d6
0762840
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 |
---|---|---|
|
@@ -210,4 +210,13 @@ class ExpressionSetSuite extends SparkFunSuite { | |
assert((initialSet - (aLower + 1)).size == 0) | ||
|
||
} | ||
|
||
test("add multiple elements to set") { | ||
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. This test case doesn't fail without the above code, does it? 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. Yap, previous |
||
val initialSet = ExpressionSet(aUpper + 1 :: Nil) | ||
val setToAddWithSameExpression = ExpressionSet(aUpper + 1 :: aUpper + 2 :: Nil) | ||
val setToAddWithOutSameExpression = ExpressionSet(aUpper + 3 :: aUpper + 4 :: 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. Nit: |
||
|
||
assert((initialSet ++ setToAddWithSameExpression).size == 2) | ||
assert((initialSet ++ setToAddWithOutSameExpression).size == 3) | ||
} | ||
} |
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 guess we don't use
--
frequently or in hot code path. We may add it when we need it.