Skip to content

Expects PARTITION BY expression to be ordered in DataFusion 51 release #18527

Closed

Description

@alamb

Describe the bug

@shehabgamin reports in #17558 (comment):

Regressions
One of our tests related to window functions is failing with the error:

Expects PARTITION BY expression to be ordered

Here is the test in question:
https://github.com/lakehq/sail/blob/8bc2a05d595f02aba3a23fcd26aef81df36a7b96/python/pysail/tests/spark/test_execution.py#L124-L148

To Reproduce

Not sure

Expected behavior

No response

Additional context

No response

Activity

  1. added
    bugSomething isn't working
    on Nov 7, 2025
  2. added theissue type on Nov 7, 2025
  3. alamb commented on Nov 7, 2025

    @alamb
    ContributorAuthor

    I looked at that briefly at that test and it isn't clear where "Expects PARTITION BY expression to be ordered" is coming from. While the window function does have a partition by expression, I don't see why the partition by would be ordered.

    So in other words, I am not sure what the bug is

  4. linhr commented on Jan 30, 2026

    @linhr
    Contributor

    This turns out to be an issue within Sail when certain distributed query plans are constructed incorrectly, causing validation to fail for BoundedWindowAggExec. So nothing goes wrong in DataFusion.

    The issue was only noticed after DataFusion 51, possibly due to how validation/optimization logic changed recently for physical planning in DataFusion.

    @alamb Feel free to close this issue!

  5. alamb commented on Feb 3, 2026

    @alamb
    ContributorAuthor

    Thanks @linhr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions