-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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-26318][SQL] Deprecate Row.merge #23271
Conversation
ok to test |
n = n + 1 | ||
} | ||
} | ||
new GenericRow(container) |
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.
Hi, @KyleLi1985 . Yep. It's a TODO item. I'm wondering if you have a real use case for this improvement.
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.
definitely, It is important
cc @rxin and @cloud-fan |
Test build #99901 has finished for PR 23271 at commit
|
} | ||
val container = Array.ofDim[Any](number) | ||
var n = 0 | ||
for (i <- 0 until size) { |
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.
if you want to improve this more, you can try with a while loop here rather than a for loop, without creating the extra 0 until size.
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.
Only primitively use size, subSize, and number information and control the container will improve the performance more.
up to
call 100000000 time Row.merge(row1) need 18064 millisecond
call 100000000 time Row.merge(rows:_*) need 25651 millisecond
Does anybody actually use this merge? |
I have the same question. If it's not used by anyone, maybe we can deprecate it and remove it in the next release |
+1 for depreciation. |
+1 for deprecation. |
+1 for deprecation too. |
deprecate this function |
Test build #100155 has finished for PR 23271 at commit
|
retest this please |
Test build #100156 has finished for PR 23271 at commit
|
ssSize -= 1 | ||
container(number) = rows(sSize)(ssSize) | ||
} | ||
} |
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 would just leave the function as was. It will be removed in the next release anyway.
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.
yea, it is not used before and is deprecated now. We don't need to do this optimization.
Let's target to deprecate the API in this PR. |
And don't forget to update the PR title and description too. |
retest this please |
Test build #100205 has finished for PR 23271 at commit
|
@@ -57,6 +57,8 @@ object Row { | |||
/** | |||
* Merge multiple rows into a single row, one after another. | |||
*/ | |||
|
|||
@deprecated("This method is deprecated and will be removed in future versions.", "2.5.0") |
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.
next release is 3.0.0
can we use "deprecate Row.merge" as title? |
Done |
retest this please |
Test build #100221 has finished for PR 23271 at commit
|
retest this please. |
Please update the PR description before merging. |
Test build #100230 has finished for PR 23271 at commit
|
retest this please. |
I check the test output, the fail is strange. |
Test build #100238 has finished for PR 23271 at commit
|
retest this please |
@@ -57,6 +57,8 @@ object Row { | |||
/** | |||
* Merge multiple rows into a single row, one after another. | |||
*/ | |||
|
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 would remove this newline
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.
+1
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.
+1
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.
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.
done
Test build #100241 has finished for PR 23271 at commit
|
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.
don't we need a note in the sql migration guide or something?
@@ -57,6 +57,8 @@ object Row { | |||
/** | |||
* Merge multiple rows into a single row, one after another. | |||
*/ | |||
|
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 think it's okay .. virtually no one uses it .. We could also leave a note when we actually remove it out. It's going to warn that it's deprecated during build or in IDE I guess anyway. |
Test build #100305 has finished for PR 23271 at commit
|
Retest this please. |
Test build #100315 has finished for PR 23271 at commit
|
Merged to master. |
## What changes were proposed in this pull request? Deprecate Row.merge ## How was this patch tested? N/A Closes apache#23271 from KyleLi1985/master. Authored-by: 李亮 <liang.li.work@outlook.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
## What changes were proposed in this pull request? Deprecate Row.merge ## How was this patch tested? N/A Closes apache#23271 from KyleLi1985/master. Authored-by: 李亮 <liang.li.work@outlook.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
What changes were proposed in this pull request?
Deprecate Row.merge
How was this patch tested?
N/A