Repository navigation
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? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-xupeng · review
Commit: aafb335ad40a84adcecf5e6c274cbfecfc7067e6
Assessment: approve
Reviewed the complete four-file delta, issue #29856, planner inputs, materialization and error/progress lifecycle. The fix correctly separates declared JSON object width from projected fields while preserving metadata synthesis and existing conversion paths. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a15209-2c6d-71e2-b8f3-aa17387fa283 · slot 2 · generation 0
Validation:
-
Verified clean assigned HEAD/merge-base, supplied patch consistency and git diff --check.
-
Independently reconciled exact-head CI run 39534708663: the external-reader package passed unfiltered race testing; the issues package completed successfully, including TestIssue29856KafkaJSONProjection (0.96s).
-
Normal coverage producer job 119009005594 completed with exit 0, 83222 pass events and no failed events. SCA job 119008966689 completed vet/molint and golangci-lint successfully.
-
Reviewed strict/non-strict projections, short-object rejection, CSV controls, existing malformed-message/progress tests and fixture cleanup.
-
Evidence retained in attempt-1/review-evidence.json and review-notes.json. Audit receipt checks/1792554519332110700-4.json matches the command, clean source fingerprint, exit 0 and retained review-audit logs.
Limitations:
-
No local Go tests, native builds or benchmarks were repeated; exact-head CI evidence was reused.
-
SQL regression uses a real frontend/planner/reader with kfake, not a live Apache Kafka deployment.
-
Validation checks total object key count and projected key names; unprojected key names/types remain outside the reader’s current contract, as disclosed in the PR.
Merge Queue Status
This pull request spent 4 hours 17 minutes 58 seconds in the queue, with no time running CI. ReasonThe merge conditions cannot be satisfied due to failing checks
Failing checks:
HintYou may have to fix your CI before adding the pull request to the queue again. Waiting for any of
All conditions
Requeued — the merge queue status continues in this comment ↓. |
aptend
left a comment
There was a problem hiding this comment.
Deep review of exact head aafb335 against base/merge-base 63a964a. Read all four changed files, linked #29856, all historical reviews/comments and the empty inline/thread collections. No blocking findings.
Verified the declared-width -> projected fields -> synthetic metadata closure from planner/compile into Kafka object parsing and materialization. The parser validates full declared key cardinality and projected key names before bypassing the invalid slice-length check; ordinary JSONL/CSV paths and per-column conversions remain intact. Short/malformed messages fail before clean-drain progress publication, and the existing Close/Reset/statement-terminal ownership still discards failed progress. Test fixtures use the existing shared embedded cluster with bounded fake-Kafka producer/reader operations and lexical cleanup.
The documented limitation that unprojected key names/types are unavailable after pruning is accepted for this focused fix; this is not an assertion of full-schema validation.
Independently verified and reused exact-head CI 39534708663: raw UT 119008966686 and checkpoint show the external-reader package in the unfiltered race run and successful issues-package batches; TestIssue29856KafkaJSONProjection is explicitly PASS (0.96s). Normal coverage producer 119009005594 exited 0 with 83,222 pass events and no failures, and raw SCA 119008966689 completed vet/molint and golangci-lint with 0 issues. Local gofmt/diff --check are clean. No duplicate local Go/native rebuild was run; SQL validation uses real MO frontend/planner/reader with kfake, not a live Apache Kafka deployment.
Merge Queue Status
This pull request spent 4 hours 53 minutes 9 seconds in the queue, with no time running CI. ReasonPull request #30695 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #29856
What this PR does / why we need it:
Kafka JSONL object scans currently size parsed fields from the projected columns. In strict SQL mode, a valid two-column message fails when only the first column or
__mo_message_idis selected because row validation compares that shortened slice with the full declared column count. In non-strict mode, the short-row path emits NULL for synthetic metadata.Validate each Kafka JSON object against the declared data-column count before materialization. For Kafka JSONL, materialize the projected data fields and synthetic metadata directly; the physical field slice no longer stands in for the full record width. This keeps allocations proportional to the projection, including metadata-only scans of wide tables. CSV and ordinary JSONL row handling retain their existing paths.
Regression coverage exercises full, first-column, later-column, and message-ID projections through SQL in strict and non-strict modes, a CSV control, and focused fake-Kafka checks for short objects and the pending-offset failure path. The pre-fix focused test reproduced the strict error and non-strict NULL offset.
Validation on the final diff:
mo-cgo-test -count=1 -timeout=240s ./pkg/sql/colexec/external(full package)go vet -mod=readonly ./pkg/sql/colexec/external ./pkg/tests/issueswith repository CGo include/library paths[email protected]:make -j4 cgoand focused Kafka reader plus SQL regression testsAfter planner pruning, only projected column names are available to the reader. The fix validates the object's total key count and all projected data keys; validating names of unprojected keys would require a larger planner-to-reader contract change.