Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Fixed descending ordering when specify nulls first #1286

Merged
merged 2 commits into from Nov 13, 2022
Merged

Fixed descending ordering when specify nulls first #1286

merged 2 commits into from Nov 13, 2022

Conversation

FANNG1
Copy link
Contributor

@FANNG1 FANNG1 commented Oct 31, 2022

databend is a database using arrow2 to sort the data, when running query like select * from xx order by xx desc nulls first, null is the last value not first, seems a logic bug in build_comparator_impl

@sundy-li
Copy link
Collaborator

sundy-li commented Nov 1, 2022

Need a test case to cover

@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

Base: 83.04% // Head: 83.12% // Increases project coverage by +0.08% 🎉

Coverage data is based on head (9ab08e3) compared to base (5bd0c7a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1286      +/-   ##
==========================================
+ Coverage   83.04%   83.12%   +0.08%     
==========================================
  Files         364      369       +5     
  Lines       39259    40187     +928     
==========================================
+ Hits        32602    33406     +804     
- Misses       6657     6781     +124     
Impacted Files Coverage Δ
src/compute/merge_sort/mod.rs 97.43% <100.00%> (+1.83%) ⬆️
src/io/orc/read/mod.rs 83.92% <0.00%> (-0.07%) ⬇️
src/io/ipc/read/common.rs 94.90% <0.00%> (-0.02%) ⬇️
src/compute/arithmetics/decimal/mul.rs 75.77% <0.00%> (-0.02%) ⬇️
src/array/binary/mod.rs 91.55% <0.00%> (ø)
src/compute/sort/mod.rs 38.07% <0.00%> (ø)
src/array/struct_/fmt.rs 100.00% <0.00%> (ø)
src/compute/sort/row/interner.rs 96.88% <0.00%> (ø)
src/compute/sort/row/fixed.rs 56.17% <0.00%> (ø)
src/compute/sort/row/dictionary.rs 65.21% <0.00%> (ø)
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@FANNG1
Copy link
Contributor Author

FANNG1 commented Nov 2, 2022

Need a test case to cover

I will try to add a test, this may take a time

@jorgecarleitao jorgecarleitao added the bug Something isn't working label Nov 2, 2022
@RinChanNOWWW
Copy link
Contributor

databend is a database using arrow2 to sort the data, when running query like select * from xx order by xx desc nulls first, null is the last value not first, seems a logic bug in build_comparator_impl

BTW, part of the bug will be solved after the row format is introduced into databend's sort.

@FANNG1
Copy link
Contributor Author

FANNG1 commented Nov 6, 2022

Need a test case to cover

add a ut in the latest commit

@jorgecarleitao jorgecarleitao changed the title [bug] fix desc ordering when specify nulls first Fixed descending ordering when specify nulls first Nov 13, 2022
@Xuanwo
Copy link
Contributor

Xuanwo commented Nov 13, 2022

#1299 could address the Clippy error.

This PR is ready for ready now.

@jorgecarleitao jorgecarleitao merged commit 95e117d into jorgecarleitao:main Nov 13, 2022
@jorgecarleitao
Copy link
Owner

Thanks a lot @sandflee, @sundy-li and @Xuanwo !

ritchie46 pushed a commit to ritchie46/arrow2 that referenced this pull request Mar 29, 2023
ritchie46 pushed a commit to ritchie46/arrow2 that referenced this pull request Apr 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants