-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-17061][SPARK-17093][SQL] MapObjects should make copies of unsafe-backed data
#14698
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
Changes from all commits
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 |
|---|---|---|
|
|
@@ -136,7 +136,7 @@ trait ExpressionEvalHelper extends GeneratorDrivenPropertyChecks { | |
| // some expression is reusing variable names across different instances. | ||
| // This behavior is tested in ExpressionEvalHelperSuite. | ||
| val plan = generateProject( | ||
| GenerateUnsafeProjection.generate( | ||
| UnsafeProjection.create( | ||
|
Contributor
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 is to prevent issues with
Contributor
Author
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. yea.
Member
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. But looks like this change doesn't reflect in the test? Without this change, the added test is passed too.
Contributor
Author
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. @viirya maybe test against the following?
Member
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. @lw-lin without this patch's changes to ExpressionEvalHelper.scala, this test still passes.
Member
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.
Under this case, the test failed. |
||
| Alias(expression, s"Optimized($expression)1")() :: | ||
| Alias(expression, s"Optimized($expression)2")() :: Nil), | ||
| expression) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Should we also copy UTF8String? This can be backed by a reused buffer. You'll need to use clone() instead of copy though.
Uh oh!
There was an error while loading. Please reload this page.
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.
we're calling
toStringonUTF8Strings, so maybe there's no need to cloneUTF8Strings?