fix(frontend): reuse prepared DML specialization by semantic domain - #27802
Open
daviszhen wants to merge 9 commits into
Open
fix(frontend): reuse prepared DML specialization by semantic domain#27802daviszhen wants to merge 9 commits into
daviszhen wants to merge 9 commits into
Conversation
…origin#27493)" This reverts commit 8b0a5ff because it regressed TPCC performance. Preserve the later direct prepared-result specialization from matrixorigin#27713. Explicitly keep INSERT, UPDATE, DELETE, and MERGE on the cached parameterized compile path so removing the reverted DML write-root rewriter cannot reintroduce positional write corruption.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
…pcc-regression # Conflicts: # pkg/frontend/computation_wrapper.go # pkg/frontend/computation_wrapper_test.go
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.
What type of PR is this?
Which issue(s) this PR fixes:
issue #27804
What this PR does / why we need it:
The original full revert exposed correctness regressions already covered by current main, including forced multi-CN predicates and
INSERT IGNORE ... SELECT. This update keeps the correctness machinery from #27493 and fixes the TPCC regression by reusing execute-time specialization for stable prepared-statement semantic domains.ParamRefprovenance in cached plans so a cache hit reads the current execution values rather than values from the first execution;mainat4cbdc2cf46and integrates its prepared numeric-overload path.Validation
go test ./pkg/frontend ./pkg/sql/plan ./pkg/sql/plan/function ./pkg/sql/colexec -count=1go test ./pkg/tests/dml -run '^TestForcedMultiCNDeleteAndInsertIgnore$' -count=1go test ./pkg/tests/issues -run '^TestIssue27443BinaryPreparedDMLAndAggregate$' -count=1go vet ./pkg/frontend ./pkg/sql/plan ./pkg/sql/plan/function ./pkg/sql/colexec ./pkg/tests/dml ./pkg/tests/issuesgolangci-lint run -c .golangci.yml ./pkg/frontendBenchmarkBinaryDMLRuntimeSpecializationCache: 9.1 us/op, 1496 B/op, 26 allocs/op (100 iterations on the local validation host)git diff --check