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

[BUG] In Spark 3.2.0 and above dynamic partition pruning and AQE are not mutually exclusive #1867

Closed
revans2 opened this issue Mar 4, 2021 · 5 comments
Assignees
Labels
audit_3.2.0 bug Something isn't working P1 Nice to have for release

Comments

@revans2
Copy link
Collaborator

revans2 commented Mar 4, 2021

The existing tests for this failed initially because they are testing that when DPP happens AQE is disabled. That is no longer the case and we need to look at that situation and see if we are doing the right thing. We should also add in tests to verify that we are doing the right thing.

@revans2 revans2 added bug Something isn't working ? - Needs Triage Need team to review and classify audit_3.2.0 labels Mar 4, 2021
@sameerz sameerz added P1 Nice to have for release and removed ? - Needs Triage Need team to review and classify labels Mar 9, 2021
@andygrove andygrove added this to the Mar 30 - Apr 9 milestone Mar 26, 2021
@andygrove
Copy link
Contributor

I started looking at this and I think it will be simple enough to add new tests but I am going to wait until #2073 is merged since branch-0.5 does not currently compile with Spark 3.2.0

@sameerz sameerz removed this from the Apr 12 - Apr 23 milestone Apr 19, 2021
@sameerz
Copy link
Collaborator

sameerz commented Apr 19, 2021

Removing from the sprint since we are not supporting Spark 3.2.0 in the 0.5 release.

@andygrove andygrove added this to the Aug 30 - Sept 10 milestone Sep 8, 2021
@andygrove andygrove removed their assignment Sep 13, 2021
@revans2 revans2 self-assigned this Sep 14, 2021
@revans2
Copy link
Collaborator Author

revans2 commented Sep 14, 2021

So the tests that are failing now for AdaptiveQueryExecSuite are all failing in Spark code, specifically in AQEShuffleReadExec.scala:86 where it has a hard coded set of partitioning that is allowed.

      // For coalesced shuffle read, the data distribution is not changed, only the number of
      // partitions is changed.
      child.outputPartitioning match {
        case h: HashPartitioning =>
          CurrentOrigin.withOrigin(h.origin)(h.copy(numPartitions = partitionSpecs.length))
        case r: RangePartitioning =>
          CurrentOrigin.withOrigin(r.origin)(r.copy(numPartitions = partitionSpecs.length))
        // This can only happen for `REBALANCE_PARTITIONS_BY_NONE`, which uses
        // `RoundRobinPartitioning` but we don't need to retain the number of partitions.
        case r: RoundRobinPartitioning =>
          r.copy(numPartitions = partitionSpecs.length)
        case other => throw new IllegalStateException(
          "Unexpected partitioning for coalesced shuffle read: " + other)
      }

This includes the one DPP test Join partitioned tables DPP fallback so I don't know what the next steps for this are. Do we need to get something into Spark before 3.2.0 ships or if there is a way for us to work around this.

@revans2
Copy link
Collaborator Author

revans2 commented Sep 14, 2021

As always Andy is on top of this.

https://issues.apache.org/jira/browse/SPARK-36666

That didn't make it into 3.2.0-RC2 but should be in the next one.

@revans2
Copy link
Collaborator Author

revans2 commented Sep 14, 2021

I think I can just close this. If I manually update things to test on 3.2.1-SNAPHSOT (which includes the above fix) there are no failures in the AQE tests

@revans2 revans2 closed this as completed Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit_3.2.0 bug Something isn't working P1 Nice to have for release
Projects
None yet
Development

No branches or pull requests

3 participants