arrow icon indicating copy to clipboard operation
arrow copied to clipboard

[C++] OrderBy SelectK does not display non-empty results

Open Light-City opened this issue 3 years ago • 2 comments

Describe the bug, including details regarding any error messages, version, and platform.

When limit k is greater than the actual table data and the table contains Null/NaN, the data cannot be obtained and only non-empty results are available.

for example:

select * from test;
 i | j 
---+---
   | 5
 1 | 3
 3 |  
   |  
 2 | 5
 1 | 5
 3 | 5
(7 rows)

When we execute order by limit k:

 i | j 
---+---
 1 | 3
 1 | 5
 2 | 5
 3 | 5
 3 |  
(5 rows)

Only 5 non-empty records will be returned.

Therefore, we support returning non-null and supporting the order of setting Null for each SortKey.

commit: https://github.com/apache/arrow/pull/38584/commits/25fef201776ce4b795bb4ff525a01e86d92a3040

Component(s)

C++

Light-City avatar Nov 08 '23 10:11 Light-City

@pitrou the PR https://github.com/apache/arrow/pull/46926 also solved this issue which you might want to close

taepper avatar Jun 22 '26 12:06 taepper

I see, thanks @taepper

pitrou avatar Jun 22 '26 13:06 pitrou