Repository navigation
fix: [branch-1.2] respect SQL execution config when captured keys are unset (#7348) - #7643
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Backport of #7348 to
branch-1.2. Closes #7312 on this branch.Rationale for this change
A captured Comet setting may be unset on the session after a plan is cached. Inside a later SQL execution Spark propagates the current SQL configuration to the task, but if none of the captured keys remains set,
CapturedSQLConf.withConfmistakes the absence of those keys for an unpropagated configuration and reinstalls the stale capture, so the task runs with settings the user has since unset.branch-1.2has the samewithConfcheck (it came in with #7302, backported in #7337). See #7348 and #7312 for the full analysis.What changes are included in this PR?
Cherry-pick of 8386a34 (
git cherry-pick -x) with no conflicts and no adaptations.withConfnow skips the captured configuration when the task has a SQL execution id. The source PR's regression test inCometSessionExtensionsSuiteis included.Other release branches:
branch-1.2is the newest release branch, so there is no newer one to port to. Whetherbranch-1.1needs a backport is not part of this PR.How are these changes tested?
On this branch, with JDK 17 and the default Spark profile (4.1):
./mvnw test-compilepasses, andCometSessionExtensionsSuitepasses (3 tests, 0 failures) against a native library built frombranch-1.2. WithCapturedSQLConf.scalareverted tobranch-1.2's version, the new testcaptured configs do not override a SQL execution after a setting is unsetfails, so the branch has the bug and the test catches it. I ran the default Spark profile only.