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

Issue found on page 'Order Preservation' #4035

Closed
soerenwolfers opened this issue Nov 9, 2024 · 3 comments · Fixed by #4157
Closed

Issue found on page 'Order Preservation' #4035

soerenwolfers opened this issue Nov 9, 2024 · 3 comments · Fixed by #4157

Comments

@soerenwolfers
Copy link
Collaborator

soerenwolfers commented Nov 9, 2024

It's quite unclear to me what

For many operations, DuckDB preserves the insertion order of rows, similarly to data frame libraries such as Pandas. The following operations and components respect insertion order: The CSV reader

means: A user could be forgiven to conclude from this sentence, e.g., that aggregate functions are fed inputs in the "original table order" (see duckdb/duckdb#14755), that sorting is stable (duckdb/duckdb#14941), or generally that arbitrarily complex and nested queries on data respects that original order (at least for the CSV reader), none of which I don't believe is the case.

I also wonder why the paragraph starts with "For many operations preserve..." and then ends with "The following operations and components respect ..: <EXACTLY ONE COMPONENT AND NOT A SINGLE OPERATION> The CSV reader".

Page URL: https://duckdb.org/docs/sql/dialect/order_preservation.html

@soerenwolfers
Copy link
Collaborator Author

@szarnyasg I think this is one of the biggest causes for confusion about duckdb, so a few words about SQLs general approach and duckdb's actual specific enhancements would be super useful. I can't help out in this case because I genuinely don't know what duckdb's philosophy here is not what the current specifics look like.

@szarnyasg
Copy link
Collaborator

Hi @soerenwolfers, great point. A fix is coming. Still a lot more could be said about the topic but this quick patch should clarify the topic.

@soerenwolfers
Copy link
Collaborator Author

@szarnyasg This is great and offers way more powerful guarantees than I expected! I'll make a PR that adds explicit answers to the two questions/issues I linked above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants