Repository navigation
Conversation
…gin#29218) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#29214 ## What this PR does / why we need it: Backport matrixorigin#29215 to `hotfix-20260922`. The VALUES planner previously derived types row by row while materializing `VALUE_SCAN`. That made the result depend on row order and could truncate values, lose precision, or select a type that could not represent every row. This PR resolves one order-independent common type for each VALUES column before materialization: - preserves DECIMAL precision and scale across all rows; - types bare `NULL` values consistently, including all-NULL columns; - uses the maximum declared width for mixed `CHAR`/`VARCHAR` values; - preserves `VECF64` when mixed with `VECF32` and string literals, independently of row order; - rejects inconsistent vector dimensions across the complete column domain; - preserves already-homogeneous domains such as `GEOMETRY`, including columns containing `NULL`; - uses a DECIMAL domain when mixed signed/unsigned integers cannot fit one integer type. The change is scoped to VALUES planning and does not alter global expression coercion such as `COALESCE`. It is adapted to the v4.2.1 type model without bringing newer main-only PAD SPACE protobuf and cast-overload dependencies into the hotfix branch. Regression coverage includes planner unit tests and distributed VALUES cases for reversed row order, mixed widths and numeric domains, NULL placement, all-NULL columns, DECIMAL scale, vector permutations/dimensions, and homogeneous GEOMETRY. The PR also carries main's temporary local Iceberg E2E disable while the workflow's Docker Hub dependency is unavailable. ### Validation Validated exact head `263e5b16be92602921218ce799c9c9a671d0d98d`: - `make build`: PASS; `./mo-service -version` reports branch `fix/v4.2.1-hotfix-20260916-values`, commit `263e5b16be`. - `GOWORK=off go test -count=1 -timeout=10m ./pkg/sql/plan`: PASS (`4.473s`). - `GOWORK=off go vet ./pkg/sql/plan`: PASS. - `golangci-lint run -c .golangci.yml --new-from-rev 9572bd3 ./pkg/sql/plan`: PASS (`0 issues`). - Fresh launch reached SQL readiness on `127.0.0.1:6001` after 5 seconds; `select version(), 1` returned `8.0.30-MatrixOne-v4.2.120260916, 1`. - Same-instance normal comparison: `./run.sh -n -g -t 2 -p test/distributed/cases/dml/select/values.sql -s test/distributed/resources`; run 1: `26/26`, run 2: `26/26`, both 100%, no failed/ignored/abnormal cases. - The service terminated cleanly after the rerun (`Shutdown complete`, exit 0). Full MatrixOne PR CI/BVT is not scheduled by the current workflow because its branch filter does not include base branch `hotfix-20260922`. (cherry picked from commit fe0f106)
…rigin#29219) ## What type of PR is this? - [ ] API-change - [x] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27933 ## What this PR does / why we need it: Backport the ODKU irregular-index routing from matrixorigin#27956, the synchronous FULLTEXT optimization from matrixorigin#28066, and the generated-key safety guard from matrixorigin#28076 to `hotfix-20260922`. This PR is independent of the VALUES fix in matrixorigin#29218. For `INSERT ... ON DUPLICATE KEY UPDATE` on tables with classic synchronous FULLTEXT indexes: - unchanged conflict rows skip hidden FULLTEXT delete, tokenization, and insert work; - new rows and rows whose indexed values change continue through the existing maintenance path; - all physical definitions of one logical irregular index stay in the same routing group; - comparisons include row identity and supported indexed text columns and use null-safe equality; - unsupported types, unknown plugins, asynchronous indexes, and incomplete metadata conservatively retain the original maintenance path. The backport also expands explicit assignments and implicit `ON UPDATE` columns through generated-column dependencies before primary/unique-key and irregular-index classification. An ODKU that can change a generated primary or unique key is rejected before maintenance can use a stale document identity; unrelated assignments remain supported. Hotfix-specific adaptation: - this release line has no newer `INSERT ALL` planner path, so no corresponding change is included; - this release line predates ordered ODKU assignments, so dependency closure is computed from the hotfix planner's final explicit and implicit assignment set. Regression coverage includes real planner-entry tests for explicit and implicit generated-UNIQUE dependencies, an unrelated-update control, sink-consumer plan invariants, and distributed generated-column/ODKU cases. Existing FULLTEXT and vector-index maintenance coverage is retained. The PR also carries main's temporary local Iceberg E2E disable while the workflow's Docker Hub dependency is unavailable. ### Validation Validated exact head `38cb71fcc3add986f99786fa9b29f5c90d159181`: - `make build`: PASS; `./mo-service -version` reports branch `backport/28066-on-9572bd3`, commit `38cb71fcc3`. - `GOWORK=off go test -count=1 -timeout=10m ./pkg/sql/plan ./pkg/fulltext/plugin/plan`: PASS (`4.552s`, `0.043s`). - `GOWORK=off go vet ./pkg/sql/plan ./pkg/fulltext/plugin/plan ./pkg/indexplugin/plan`: PASS. - `golangci-lint run -c .golangci.yml --new-from-rev 9572bd3 ./pkg/sql/plan ./pkg/fulltext/plugin/plan ./pkg/indexplugin/plan`: PASS (`0 issues`). - Fresh launch reached SQL readiness on `127.0.0.1:6001` after 11 seconds; `select version(), 1` returned `8.0.30-MatrixOne-v2806695723, 1`. - Same-instance normal comparison, run twice with `./run.sh -n -g -t 2`: `generated_column.sql` passed `174/174` in both runs; `on_duplicate_key_modern.sql` passed `265/265` in both runs. Each combined run was `439/439`, 100%, with no failed/ignored/abnormal cases. - The service terminated cleanly after the rerun (`Shutdown complete`, exit 0). Full MatrixOne PR CI/BVT is not scheduled by the current workflow because its branch filter does not include base branch `hotfix-20260922`. --------- Co-authored-by: 和光同尘 <[email protected]> (cherry picked from commit 96f9a63)
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? |
Contributor
|
This pull request is merged. |
2 of 7 tasks
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:
Related to #29214 and #27933.
What this PR does / why we need it:
Backport #29218 and #29219 from the independent
4.2-hotfix-20260922line tov4.2.1-hotfix. Both cherry-picks apply without conflicts; their 20 delivered files are identical to the source hotfix. Omit the unrelated temporary Iceberg CI disable carried by #29218.No catalog, index-storage or protocol migration is introduced. These optimizations do not claim to fix the cost of changed-text posting deletion or ordinary INSERT workloads.
Validation (Linux/amd64, Go 1.26.4, CGO):
make thirdparties,make cgo, releasemake build GOBUILD_OPT=-p=4: PASS.pkg/sql/planandpkg/fulltext/plugin/plan: PASS.pkg/indexplugin/plancompiles successfully and has no test files.go vet -mod=readonly -p=4 <closure>PASS; repository-pinned golangci-lint 2.6.2run --new-from-rev=origin/main <closure>and the same check against4711b18e82PASS (0 issues).molint check -mod=readonly -p=4 <closure>has no new findings: its two unchanged unsafe-recover diagnostics reproduce identically on clean base4711b18e82with the same binary and package closure.gofmtandgit diff --check: PASS.