Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-40050

Enhance EliminateSorts to support removing sorts via LocalLimit

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • SQL
    • None

    Description

      It seems we can remove Sort operator:

          val projectPlan = testRelation.select($"a", $"b")
          val unnecessaryOrderByPlan = projectPlan.orderBy($"a".asc)
          val localLimitPlan = LocalLimit(Literal(2), unnecessaryOrderByPlan)
          val projectPlanB = testRelationB.select($"d")
          val joinPlan = localLimitPlan.join(projectPlanB, RightOuter).select($"a", $"d")
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            yumwang Yuming Wang
            yumwang Yuming Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment