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

[SPARK-45920][SQL][3.4] group by ordinal should be idempotent #43838

Closed
wants to merge 1 commit into from

Commits on Nov 16, 2023

  1. [SPARK-45920][SQL] group by ordinal should be idempotent

    GROUP BY ordinal is not idempotent today. If the ordinal points to another integer literal and the plan get analyzed again, we will re-do the ordinal resolution which can lead to wrong result or index out-of-bound error. This PR fixes it by using a hack: if the ordinal points to another integer literal, don't replace the ordinal.
    
    For advanced users or Spark plugins, they may manipulate the logical plans directly. We need to make the framework more reliable.
    
    No
    
    new test
    
    no
    
    Closes apache#43797 from cloud-fan/group.
    
    Authored-by: Wenchen Fan <wenchen@databricks.com>
    Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
    cloud-fan committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    f947e38 View commit details
    Browse the repository at this point in the history