GitHub user alamb added a comment to the discussion: How does 'sort' interact 
with record batches?

I think you need to add the sort after the window function"
- Related ticket for anyone followng along: 
https://github.com/apache/datafusion/issues/15833


Something like
```rust
ctx
        .table("table")
        .await?
        .window(vec![row_number().alias(DATA_FUSION_ROW_NUMBER)])
       .sort(vec![ident("userPrimarkyKey").sort(true, true)])?
``` 

GitHub link: 
https://github.com/apache/datafusion/discussions/15711#discussioncomment-12974099

----
This is an automatically sent email for github@datafusion.apache.org.
To unsubscribe, please send an email to: 
github-unsubscr...@datafusion.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to