Skip to content

Support ORDER BY ALL for projected expressions - #83

Merged
osipovartem merged 1 commit into
embucket-sync-df55.0.0from
snowflake-order-by-all-expressions
Sep 12, 2026
Merged

osipovartem merged 1 commit into
embucket-sync-df55.0.0from
snowflake-order-by-all-expressions

Conversation

@osipovartem

Copy link
Copy Markdown
Collaborator

Summary

  • expand ORDER BY ALL to select-list ordinal positions instead of requiring raw column expressions
  • support computed expressions, aliases, aggregate outputs, and set-operation outputs
  • preserve the existing native SortExec path with no row-wise conversion

Snowflake validation

Compared against Snowflake on 2026-09-12 using focused queries. Computed expressions, explicit null ordering, set operations, and grouped aggregate output matched exactly. The oracle warehouse was suspended immediately afterward.

A fresh Snowflake check also showed that aggregate outputs are currently accepted with ORDER BY ALL, despite the current documentation note stating otherwise; tests follow observed engine behavior.

Validation

  • cargo +1.95.0 fmt --all -- --check
  • cargo +1.95.0 test -p datafusion-sqllogictest --test sqllogictests -- order_by_all.slt --test-threads 1
  • cargo +1.95.0 test -p datafusion-sql --test sql_integration -- --test-threads 8 (604 passed)
  • cargo +1.95.0 clippy -p datafusion-sql --all-targets -- -D warnings

@osipovartem
osipovartem merged commit 66fc54f into embucket-sync-df55.0.0 Sep 12, 2026
17 of 19 checks passed
@osipovartem
osipovartem deleted the snowflake-order-by-all-expressions branch September 12, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant