Repository navigation
fix async ivfflat include and generated column updates - #29698
Conversation
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? |
35ef337 to
f0489f5
Compare
|
mo-bot review · Commit: Assessment: request_changes Reviewed the complete six-file delta and its callers. Timestamp value preservation remains incomplete, and the new generated-column dependency traversal introduces exponential planning work. Model: Session:
Validation:
Limitations:
|
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: f0489f508cb0c8040877bfb2f4752268a830f5a2
Assessment: request_changes
Reviewed the complete six-file delta and its callers. Timestamp value preservation remains incomplete, and the new generated-column dependency traversal introduces exponential planning work.
Model: gpt-6-astra / xhigh
Session: 01a12d8f-7dea-77c2-a565-38d45b5564e4 · slot 0 · generation 0
-
P2
pkg/iscp/util.go:422: Replay an async IVFFLAT row whose INCLUDE column is TIMESTAMP(6), containing 2026-01-02 03:04:05.123456.
Impact: The hidden index still loses fractional seconds, potentially changing covering-query values and filtering results. This is an unresolved part of the stated timestamp repair, rather than a newly introduced precision regression. Preserve the declared scale through the intermediate SQL casts.
Evidence: appendTimestampSQL preserves the raw bytes, but index_sqlwriter.go:757-773 constructs CAST(column_N AS TIMESTAMP) using Type.DescString(), which omits temporal scale. The parser defaults that cast to scale 0; timestampToTimestamp applies TruncateToScale(0). The extracted-function host probe in timestamp_probe.log produces 03:04:05.000000; .987654 rounds to the next second. The new test only parses the standalone literal and misses this consumer boundary. -
P2
pkg/sql/plan/bind_update.go:4666: Use an indexed generated column, or INCLUDE column, with repeated dependencies such as g1=g0+g0 through g24=g23+g23, then update an unrelated payload column through ODKU.
Impact: Deleting each visited entry on return makes the traversal enumerate dependency paths instead of distinct columns. Small schemas therefore cause exponential CPU work during planning. Reuse the existing generated-column dependency closure or memoize completed results.
Evidence: The extracted current-head closure performed 33,554,431 visits at depth 24; the merge-base closure performed one. Results are recorded in dependency_probe.log and dependency_base_probe.log. collectRefColPos retains duplicate references, and splitIrregularIndexesByUpdatedColumns reaches this helper even though bind_insert.go:2811 already computes possiblyChangedCols using collectGeneratedColumnDependents. The added tests contain only simple chains and do not exercise shared dependencies.
Validation:
-
Verified the frozen HEAD, clean source checkout, complete delta and git diff --check.
-
Traced serialization through row extraction, writer projection, casts and consumer error/reset handling; traced UPDATE/ODKU dependency ownership and plugin hooks.
-
Verified that vector slot 1 matches the constructor layout and single-vector-column schema restriction. Plugin candidate checks found no new algorithm dispatch, dependency imports or removed interface assertions.
-
Reused frozen exact-head build, Ubuntu UT, arm64 SCA, coverage and multi-CN BVT successes, plus the author's reported iscp/plan/mysql package tests and vet.
-
Ran bounded standalone host probes with changed-source functions and explicit adapters. Probe sources, logs, SQL witnesses and review-record.json are under the assigned attempt directory.
Limitations:
-
Host probes establish traversal growth and scalar conversion behavior; they are not production SQL executions or whole-query benchmarks.
-
The repository provenance verifier rejected the retained native library because its stamp was missing. No local native tests or service were launched.
-
New CDC value round-trips and quantized INCLUDE storage behavior lack targeted public-path evidence in the supplied record; the added tests primarily assert generated SQL and parsing.
-
Linked issue bodies were not supplied. Reviewed their contracts as stated in the frozen PR description; supplied comments contain no substantive review concerns.
|
mo-bot review · Commit: Assessment: approve Reviewed the complete eight-file delta and its callers. Both previous findings are resolved: temporal casts preserve fractional scale, and generated-column dependency traversal retains visited nodes. Serialization, quantization ordering, UPDATE/ODKU maintenance, and existing CDC lifecycle ownership are consistent. No actionable unresolved findings remain. Model: Session: Validation:
Limitations:
|
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: cd98fbd4bc0f52a865474f06e917a4b1021e23d2
Assessment: approve
Reviewed the complete eight-file delta and its callers. Both previous findings are resolved: temporal casts preserve fractional scale, and generated-column dependency traversal retains visited nodes. Serialization, quantization ordering, UPDATE/ODKU maintenance, and existing CDC lifecycle ownership are consistent. No actionable unresolved findings remain.
Model: gpt-6-astra / xhigh
Session: 01a12d8f-7dea-77c2-a565-38d45b5564e4 · slot 0 · generation 0
Validation:
-
Traced special-value serialization through SQL binding and conversion, including BIT bytes, timestamp timezone/scale handling, and mixed NULL rows.
-
Reviewed regression assertions for stored INCLUDE values, snapshot and incremental CDC, updates/deletes, timezone changes, generated dependencies, and quantized projection ordering.
-
Reused frozen exact-head successful Ubuntu/x86 UT, Linux/arm64 SCA, coverage, PROXY BVT, and PESSIMISTIC BVT evidence; checked repository selection of the new vector SQL case.
-
Standalone probe of the extracted dependency traversal passed shared-reference cases at depths 8, 16, 24, and 128, expanding each generated node at most once.
-
Exact HEAD verified; checkout clean; diff whitespace and Go formatting checks passed. Detailed audit and probe artifacts are retained in the attempt directory.
Limitations:
-
CI evidence provides suite conclusions, not individual BVT logs. No local repository/native tests were rerun.
-
The standalone traversal probe uses stub surroundings; it is not production-planner validation or a SQL performance benchmark.
-
Separate linked-issue bodies were not supplied; issue contracts were assessed from the frozen PR description and review comments.
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
What changed
Fixes async IVFFLAT CDC/ISCP maintenance and synchronous generated-column invalidation for the six related bugs:
Validation
GOWORK=off go test -mod=mod -count=1 -timeout 180s ./pkg/iscp ./pkg/sql/plan ./pkg/sql/parsers/dialect/mysqlGOWORK=off go vet -mod=mod ./pkg/iscp ./pkg/sql/plan ./pkg/sql/parsers/dialect/mysqlCGo linker output contains the repository's existing duplicate-rpath/native-library warnings; all selected tests and vet completed successfully.