zhuqi-lucas commented on PR #21956:
URL: https://github.com/apache/datafusion/pull/21956#issuecomment-4457944094
Thanks @adriangb! Adopted all five , landed in PR already.
One tweak in #3: your `reverse_row_groups = reversed_satisfies ||
is_descending` re-introduces a latent bug for source `[a DESC]` + request `[a
ASC]` — both flags are true while the request is ASC, so the formula
flips iteration to DESC after the stats-based reorder, wrong direction.
Kept the fix from the earlier "route stats-based RG reorder through
try_pushdown_sort" commit:
```rust
new_source.reverse_row_groups = if column_in_file_schema {
is_descending // stats reorder gives ASC-by-min; flip iff request
DESC
} else {
true // flipping the file's natural order
};
What do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]