-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-31983] Fix Sorting for duration column and make Status column sortable #28752
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
Conversation
srowen
left a comment
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.
Looks good. Are there other similar cases, I wonder?
I will look into other places as well. |
|
Test build #123624 has finished for PR 28752 at commit
|
|
Looks good. Pending for other similar cases. |
|
I checked. I cannot find any similar case for other tables. |
|
@gengliangwang too FYI |
|
gentle ping @srowen @sarutak @HyukjinKwon |
|
LGTM. Do you all have an opinion on back porting to branch-3.0? I think I would. |
|
Just to be clear, We are talking about back porting pagination support or fixing this sorting issue ? If we are only fixing this sorting issue then implementation will be slightly different as we are using |
|
Pagination feature is not in |
|
Ok. I will raise a PR for that. Just one doubt, for fixing in 3.0 should I file a new JIRA(as implementation will be slightly different) or just raise as a follow up for this only. |
|
We will merge this just to master. If you can cleanly fix in 3.0 too, yes that's fine in a new PR. It should be the same JIRA. |
Oh. I created a new JIRA. SPARK-31642 is for introducing pagination support in structured streaming tab, so I filed another JIRA(https://issues.apache.org/jira/browse/SPARK-31983). I raised a PR here. |
|
Merged to master. I'll look at the backport. |
|
Oh I see, this was attached to the JIRA for pagination. It does make sense to have a separate JIRA for that. Let me retroactively fix up the links. |
…ed streaming tab ### What changes were proposed in this pull request? Sorting result for duration column in tables of structured streaming tab is wrong sometimes. <img width="1677" alt="Screenshot 2020-06-13 at 1 58 53 PM" src="https://user-images.githubusercontent.com/15366835/84572178-10755700-adb6-11ea-9131-338e8ba7fb24.png"> We are sorting on string, which results in this behaviour. `sorttable_numeric` and `sorttable_customkey` is used to fix this. Refer [this](#28752 (comment)) and [this](#28752 (comment)) After changes : <img width="1677" alt="Screenshot 2020-06-13 at 8 05 32 PM" src="https://user-images.githubusercontent.com/15366835/84572299-a8734080-adb6-11ea-9aa3-b4bc594de4cf.png"> ### Why are the changes needed? Sorting results are wrong for duration column in tables of structured streaming tab. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Screenshots attached. Closes #28823 from iRakson/testsort. Authored-by: iRakson <[email protected]> Signed-off-by: Kousuke Saruta <[email protected]>
…ed streaming tab ### What changes were proposed in this pull request? Sorting result for duration column in tables of structured streaming tab is wrong sometimes. <img width="1677" alt="Screenshot 2020-06-13 at 1 58 53 PM" src="https://user-images.githubusercontent.com/15366835/84572178-10755700-adb6-11ea-9131-338e8ba7fb24.png"> We are sorting on string, which results in this behaviour. `sorttable_numeric` and `sorttable_customkey` is used to fix this. Refer [this](apache#28752 (comment)) and [this](apache#28752 (comment)) After changes : <img width="1677" alt="Screenshot 2020-06-13 at 8 05 32 PM" src="https://user-images.githubusercontent.com/15366835/84572299-a8734080-adb6-11ea-9aa3-b4bc594de4cf.png"> ### Why are the changes needed? Sorting results are wrong for duration column in tables of structured streaming tab. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Screenshots attached. Closes apache#28823 from iRakson/testsort. Authored-by: iRakson <[email protected]> Signed-off-by: Kousuke Saruta <[email protected]>
What changes were proposed in this pull request?
In #28485 pagination support for tables of Structured Streaming Tab was added.
It missed 2 things:
Stringwas used which sometimes gives wrong results(consider"3 ms"and"12 ms"). Now we first sort the duration column and then convert it to readable StringWhy are the changes needed?
To fix the wrong result for sorting and making Status column sortable.
Does this PR introduce any user-facing change?
No
How was this patch tested?
After changes:
