Skip to content
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

BatchSort gets dropped from an inner batch query #17228

Closed
kwannoel opened this issue Jun 13, 2024 · 1 comment
Closed

BatchSort gets dropped from an inner batch query #17228

kwannoel opened this issue Jun 13, 2024 · 1 comment
Labels
type/bug Something isn't working
Milestone

Comments

@kwannoel
Copy link
Contributor

kwannoel commented Jun 13, 2024

Describe the bug

dev=> explain select * from rw_catalog.rw_event_logs_unordered order by timestamp desc
dev-> ;
                                            QUERY PLAN                                             
---------------------------------------------------------------------------------------------------
 BatchSort { order: [rw_event_logs_unordered.timestamp DESC] }
 └─BatchScan { table: rw_event_logs_unordered, columns: [unique_id, timestamp, event_type, info] }
(2 rows)


dev=> explain select * from ( select * from rw_catalog.rw_event_logs_unordered order by timestamp desc);
                                           QUERY PLAN                                            
-------------------------------------------------------------------------------------------------
 BatchScan { table: rw_event_logs_unordered, columns: [unique_id, timestamp, event_type, info] }
(1 row)

Error message/log

No response

To Reproduce

No response

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@kwannoel kwannoel added the type/bug Something isn't working label Jun 13, 2024
@github-actions github-actions bot added this to the release-1.10 milestone Jun 13, 2024
@kwannoel kwannoel changed the title BatchSort gets dropped when a batch query is created and queried as a view BatchSort gets dropped from an inner batch query Jun 13, 2024
@xiangjinwu
Copy link
Contributor

xiangjinwu commented Jun 13, 2024

It is by design that order by is only effective at top level or part of agg/window function. Do you expect Project/Filter to be order-preserving while Agg/Join are allowed to output in any order? What about other relational operators?

@kwannoel kwannoel closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants