GitHub user alamb added a comment to the discussion: How does 'sort' interact with record batches?
If the data isn't sorted by `userPrimaryKey` after `sort()` is called, then I think that is a bug. I wonder if you could provide an explain plan? Something like ```rust ctx .table("table") .await? .window(vec![row_number().alias(DATA_FUSION_ROW_NUMBER)]) .sort(vec![ident("userPrimarkyKey").sort(true, true)])? .explain(false, false) ``` GitHub link: https://github.com/apache/datafusion/discussions/15711#discussioncomment-12979830 ---- 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