Repository navigation
Conversation
|
Follow-up validation for exact head d7c5b17: the clean maintenance worktree now has workspace-local third-party artifacts, and controlled-CGo tests for pkg/sql/jsonvalue and pkg/container/bytejson pass; git diff --check also passes. The source scope remains the G1 JSON_TABLE foundation only: no SQL parser, planner, executor, or claim of constant/correlated/stage-datalink BVT acceptance. Fresh CI has passed preflight, shared build, coverage eligibility and PR-size; Ubuntu UT, SCA, coverage, and the applicable BVT jobs are still running. The fengttt SQL/BVT request remains an outstanding dependent-consumer acceptance item; this update does not request re-review or merge. |
|
Thanks. I checked the approved delivery split for issue #28036. PR #28924 is the G1 foundation: bounded JSON path iteration, scalar conversion, and JSON-cell admission. It intentionally contains no SQL parser, planner, executor, or JSON_TABLE table-function entry point, so the requested correlated-table, constant-text, and stage-datalink statements cannot execute against this head. I will not add an unexecutable or skipped BVT to the foundation PR. Those cases belong to the dependent consumer PR and must exercise the public SQL path. The PR body records the exact BVT:N/A boundary and keeps #28036 open for the later consumer/QA stages. This remains an open acceptance item pending maintainer agreement on the G1 split; no re-review or merge is being requested by this comment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review at d7c5b17. Reviewed all seven changed files, the accepted RFC/delivery boundary, existing owners and prior reviews. No CI wait.
New P2 counterexample is attached inline: malformed decimal admission is still inconsistent between direct and path JSON conversion. Independent controlled-CGo tests reproduce it; existing focused decimal diagnostics/range/rounding and self-referential traversal regressions pass. This is a library boundary finding, not a claim that JSON_TABLE SQL is exposed by this PR.
Prior review closure: approved RFC #28273 and implementation metadata satisfy the design gate; previous decimal truncation, compatible spelling diagnostics, signed endpoint and double-rounding fixes are present and their focused tests passed independently. Direct malformed VARCHAR conversion is repaired, but malformed JSON emission remains incomplete as below. fengttt's constant-text/correlated/stage-datalink BVT request remains an explicit open acceptance item: G1 has no SQL consumer and maintainer acceptance of the split has not been recorded. Do not add skipped/unexecutable BVT or close #28036 to manufacture closure.
Engineering quality: bounded decimal analysis and cell admission are justified, and warning/session policy remains outside these helpers. Please also reconsider the compatibility aliases with no pre-existing production consumers. The builder ownership test that clones first.Data before later builder mutation does not prove independence of the returned buffer; retain the original returned slice for that assertion rather than increasing the test matrix. These are nonblocking cleanup observations.
aunjgr
left a comment
There was a problem hiding this comment.
Reviewed d7c5b17. One correctness blocker remains in the new library boundary: ConvertScalar(T_json) calls validateJSONValue, whose validDecimalJSONPayload rejects malformed decimal spellings such as +1 and 01. ConvertPathMatches(..., T_json), however, routes a single match through convertJSONValueWithLimit -> MarshalStorageCompatibleWithLimit, which checks the ByteJSON envelope/size but not that decimal lexical rule. It can return StatusSuccess with bytes whose MarshalJSON text is invalid JSON. Use the same bounded decimal admission for direct, path and builder paths, and test final JSON validity for malformed and valid controls. Green CI does not cover this counterexample. The split-delivery/BVT acceptance question should also remain explicit; it is not a substitute for fixing the library invariant.
gouhongshen
left a comment
There was a problem hiding this comment.
Codex automated review
Reviewed head d7c5b17 against origin/main: 7 files, ~4.3k added lines, all new library code (bytejson path iterator + JSON_TABLE array builder, jsonvalue conversion boundary) plus RFC metadata. There is no SQL consumer, so nothing user-visible changes on main; these are library-boundary findings.
Prior review disposition, not re-reported: XuPeng-SH's inline P2 and aunjgr's review at this same head both flag the divergent decimal admission between ConvertScalar(T_json) -> validateJSONValue/validDecimalJSONPayload and ConvertPathMatches(T_json) -> MarshalStorageCompatibleWithLimit. That is still unaddressed and I deliberately did not duplicate it. XuPeng-SH's two nonblocking cleanups (compatibility aliases with no production consumers; the builder-ownership test cloning first.Data) and fengttt's constant-text/correlated/stage-datalink BVT acceptance question are left with their raisers. The design gate is closed: the RFC header now points at approved #28273 and registers this PR.
Verified sound or fixed: the earlier unbounded recursive-descent counterexample is closed, because Reset rejects the root through IsValidByteJson -> bytejsonvalidate.Container, which enforces maxContainerDepth=100 plus a serialized-work charge equal to len(data), so a self-referential child offset cannot pass admission. Iterator traversal is faithful to ByteJson.query (pkg/container/bytejson/bytejson.go:962) for double-star suffix-then-children order, object/scalar [0] and range autowrap, key wildcard, and array wildcard/range; the absent cnt==0 guard for subPathRange is harmless because genRange(0) always returns subPathIdxErr via the orig1 >= cnt test (pkg/container/bytejson/path.go:389). The bounded decimal scanner models the legacy parsers exactly, including the real asymmetry that Parse64 accepts '+' only after an exponent marker (pkg/container/types/decimal.go:2036) while Parse128/Parse256 skip '+' anywhere (decimal.go:2176 and 2309) - I attempted a '1.5+3' counterexample and it agrees with Parse128's 1.53. Builder admission, uint32 offset rewriting in Build, and the storage-size preflight are internally consistent, and JSONDocumentMaxNestingDepth agrees with bytejsonvalidate.maxContainerDepth at 100. truncateText's rune-count convention matches MO's existing width rule (pkg/sql/util/eval_expr_util.go:836). safeMarshal and MarshalStorageCompatibleWithLimit do not diverge, since ByteJson.Marshal already applies StorageCompatible.
New this round: one blocking boundary defect plus three non-blocking ones. The blocker is that the path-conversion entry points - which this PR documents as the production JSON_TABLE route (conversion.go:281) and which alone own the RFC's one-match/multi-match policy - hardcode ConversionOptions{}, so a single-match TIMESTAMP column is parsed in UTC regardless of session time_zone and still returns StatusSuccess. No location-carrying path API exists, and fixing the signature after stage 3 depends on it is an API break. Non-blocking: fractional-to-integer conversions lose the truncation diagnostic that decimal and text targets preserve; WarningDescriptor.Message cannot render the RFC-pinned MySQL 1265 text; and iterator lifecycle errors are not sticky (Close clears initErr, the recover path never records it), which contradicts the fail-closed intent and the builder's done flag in the same PR.
No local build or test run: this worktree has no native libmo/thirdparties artifacts and I did not modify it, its git state, or dependencies. Every finding below is proven from source at the reviewed head.
P1 - Path-conversion entry points cannot carry the session time zone, so a single-match TIMESTAMP column silently converts in UTC (pkg/sql/jsonvalue/conversion.go:316)
ConvertPathMatchesWithLimitContext is the only place that implements the RFC's match policy (one match converted directly; multiple matches aggregated into a JSON array for T_json and a conversion error otherwise), and this PR documents it as the production route: "Production JSON_TABLE uses ConvertPathMatches or its context form" (conversion.go:281).
For a single non-JSON match it calls ConvertScalarWithContext(ctx, first, target, ConversionOptions{}) at conversion.go:316. Location is therefore always nil, and the T_timestamp branch substitutes time.UTC at conversion.go:232-235. No exported path-level entry point accepts ConversionOptions or a *time.Location - the complete set is ConvertPathMatches, ConvertPathMatchesContext, ConvertPathMatchesWithLimit and ConvertPathMatchesWithLimitContext (conversion.go:270, 275, 282, 288). ConvertScalarWithLocation (conversion.go:124) exists only for the scalar route.
That the location is mandatory rather than optional is established by this PR's own code and test: the ConversionOptions doc says it "is intentionally supplied at execution time rather than captured in a plan or a constant default" (conversion.go:102-104), and TestConvertScalarTruncationAndTimestampLocation asserts UTC and UTC+8 produce different values (conversion_test.go:250-254). No test covers T_timestamp through ConvertPathMatches.
Consequence: a JSON_TABLE column declared TIMESTAMP over a path with exactly one match parses the JSON datetime text in UTC instead of the session time_zone and returns StatusSuccess, so the shifted value is undetectable to the caller - there is no status, warning or error to inspect. The only way for a stage-3 consumer to get correct behavior is to bypass this API and re-implement the multi-match/ON ERROR classification and the bounded JSON aggregation itself, duplicating exactly the logic this boundary exists to own. Because the fix changes an exported signature, deferring it past the consumer PR turns it into an API break.
Suggested fix: thread ConversionOptions through the path entry points (for example a ConvertPathMatchesWithOptions(ctx, iterator, target, options, maxBytes) that all four convenience forms delegate to), and make a nil Location for T_timestamp an explicit error instead of a silent UTC substitution so the session value can never be dropped unnoticed. Add a regression asserting that a single-match T_timestamp path conversion differs between time.UTC and a non-UTC location, mirroring the existing scalar-route assertion.
P2 - Fractional JSON numbers converted to integer targets return StatusSuccess with no truncation diagnostic (pkg/sql/jsonvalue/conversion.go:534)
The RFC requires the conversion boundary to distinguish "successful conversion with truncation diagnostic" from plain success (docs/rfcs/00000000_mysql_json_table.md:126-132), and this PR implements that for two of the three lossy classes: text targets via truncateText (conversion.go:180-190) and decimal targets via decimalResult (conversion.go:761-771), both returning StatusTruncated plus WARN_DATA_TRUNCATED.
Integer targets are the hole. convertSignedInteger and convertUnsignedInteger (conversion.go:534-583) call numericToInt/numericToUint, which route JSON numerics to bytejson.NumericToInt64 / NumericToUint64. Those helpers are documented as discarding "the fractional part toward zero" (pkg/container/bytejson/numeric_key.go:52-54) and return only (value, ok) - the fact that information was discarded is not reported. The callers then return Result{Value: v, Status: StatusSuccess} with Warning left nil.
So ConvertScalar(12.7, INT) yields 12, StatusSuccess and no warning, while ConvertScalar("12.345", DECIMAL(10,2)) yields 12.35, StatusTruncated and WARN_DATA_TRUNCATED (asserted at conversion_test.go:274-282). Both discard source information; only one is classified as truncation. The consumer consequently has no signal with which to publish a row-level truncation diagnostic for INT/BIGINT/UNSIGNED/BIT columns, which the RFC's execution-phase diagnostics contract expects (docs/rfcs/00000000_mysql_json_table.md:221-225).
Scope note: the value semantics are not the issue. Truncation toward zero matches MO's existing JSON-to-integer coercion (jsonToInt64Scalar, pkg/sql/plan/function/func_cast.go:3006-3019), and the RFC asks the conversion path to reuse existing coercion helpers, so I am not requesting a change to rounding. This is a diagnostic-classification gap only.
Suggested fix: have the integer helpers report whether the exact source had a discarded fractional part (for example returning a truncated flag alongside the value, derived from the same bounded analysis already used for decimals), then emit StatusTruncated plus WARN_DATA_TRUNCATED. Cover exact and lossy controls for float, decimal and numeric-string sources, as the decimal tests already do.
P2 - WarningDescriptor.Message cannot render the RFC-pinned MySQL truncation text and duplicates the sink's formatting (pkg/sql/jsonvalue/conversion.go:186)
The RFC pins execution-phase diagnostics to "the MySQL 8.0.46 code/message pair for that condition" (docs/rfcs/00000000_mysql_json_table.md:221-223). MO already owns that pair: WARN_DATA_TRUNCATED is registered as {1265, ["01000"], "...truncated for column '%s' at row %ld"} (pkg/common/moerr/mysql_error_define.go:5711), and the existing cast layer formats it as "Data truncated for column '%s' at row %d" (pkg/sql/plan/function/func_cast.go:7151-7152, also 4766-4767).
The descriptors returned here instead carry bespoke text derived from the target type: "JSON_TABLE value truncated for %s" (conversion.go:186) and "JSON_TABLE decimal value truncated for %s" (conversion.go:767). WarningDescriptor exposes only Code and Message (conversion.go:83-86), so neither the column name nor the row ordinal - both required by MySQL's text and by MO's registered template - is available to the caller.
The result is that a consumer cannot derive the contract-mandated message from what this layer returns; it must discard Message and rebuild the text from Code alone. The field then reads as authoritative while being unusable, and it will drift from whatever the warning sink actually emits. It also splits message ownership across two layers, which conflicts with the PR's own stated boundary that "this layer never writes a session warning or performs warning deduplication" (conversion.go:81-82).
Suggested fix: pick one owner. Either drop Message and return only the code (letting the sink format the MySQL text it already has a template for), or extend the descriptor with the structured facts the sink needs (column identity, row ordinal) so MySQL's exact text is renderable. Add a test asserting the descriptor carries whatever the chosen contract requires, rather than asserting the current bespoke string.
P2 - Iterator lifecycle errors are not sticky: after Close or a recovered panic, Next reports normal exhaustion instead of the failure (pkg/container/bytejson/path_iterator.go:115)
NextContext returns (ByteJson{}, false, nil) whenever the stack is empty (path_iterator.go:152 and 332), and that ok=false is the sole signal for "no match". Two paths make a failed cursor look merely exhausted:
- Close clears initErr (path_iterator.go:113-115). Concretely, NewPathIterator(root, nil) sets initErr to "JSON path iterator requires a path" (path_iterator.go:96-98) and the first Next returns it; after Close, the next Next returns ok=false with err=nil. A use-after-Free in the stage-3 executor therefore degrades into a silent no-match.
- The recover handler (path_iterator.go:130-142) clears the stack but never records the failure, so only the first call returns the malformed-document error; an immediate retry returns ok=false with err=nil. The comment there states the intent is to fail closed, but the fail-closed state does not persist.
This matters because ConvertPathMatchesWithLimitContext maps ok=false to StatusMissing (conversion.go:301-303), and the RFC assigns Missing to ON EMPTY. So both cases convert a lifecycle or corruption bug into NULL-complemented rows rather than a deterministic error - the opposite of the fail-closed posture this PR states for malformed input, and unlike NextContext's own documented retry contract for cancellation, which deliberately leaves the cursor in place (path_iterator.go:125-128).
The sibling component added in this same PR does it correctly: JSONTableArrayBuilder keeps a done flag and returns moerr.NewInvalidStateNoCtx("JSON_TABLE array builder is closed") from both AppendContext (json_table_array.go:83-85) and Build (json_table_array.go:526-528).
Suggested fix: make the terminal state sticky on the iterator too - record a closed/failed condition (for example set initErr in Close and in the recover path) so every later Next keeps returning it until Reset re-arms the cursor, and add a small test asserting Next after Close and Next after a recovered panic both keep returning an error rather than ok=false.
aunjgr
left a comment
There was a problem hiding this comment.
Re-reviewed 882260f9af08ee035f3663ad495ff7270b589522, including the admission/options repair since my d7c5b175 request for changes. APPROVE for the documented G1 foundation.
My malformed-decimal finding is closed. The strict, shortest-uvarint and complete-JSON-number check now has one owner in bytejsonvalidate.DecimalJSONPayload; direct scalar emission and recursive storage-size admission both call it. Single path matches and nested/builder values can no longer bypass the same lexical rule. The regression checks invalid +1, 01, incomplete exponents and whitespace alongside valid controls and final JSON validity.
The separate timestamp-path defect is also closed: the options-carrying path entry passes the execution location to scalar conversion, and non-NULL TIMESTAMP conversion without that location fails explicitly. Missing/JSON NULL keep their respective statuses. The UTC versus UTC+8 regression checks the actual converted value.
I reused the recorded three-package normal validation for the unchanged semantic source and checked the test-only SCA follow-up; current CI is green and the PR diff checks pass. The approved RFC explicitly separates bounded primitives from their SQL consumer, so library/API tests are the applicable proof for G1. Public constant/correlated/stage-input SQL and complete diagnostic publication remain acceptance work for the consumer increments; this approval does not close #28036.
gouhongshen
left a comment
There was a problem hiding this comment.
Codex automated review
Reviewed 882260f. The prior timestamp blocker is fixed: the options-carrying path API threads execution location and nil location fails closed. The decimal-admission issue raised by XuPeng-SH and aunjgr is fixed by one bounded complete-JSON-number validator used by direct, path, nested, and builder routes. My iterator-after-Close concern is withdrawn because post-Close no-match is explicitly tested; the warning-message and integer truncation notes are withdrawn as non-blocking G1 consumer-boundary follow-ups. fengttt's SQL/BVT request remains dependent-consumer acceptance work. No blockers remain.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep re-review of exact head 882260f9af08ee035f3663ad495ff7270b589522 against main/merge-base 466eb8ff4f65752ad25d7e19274770459f5ef934: APPROVE for the documented G1 foundation, not acceptance of the complete JSON_TABLE SQL feature.
Design / ownership. The approved, merged RFC #28273 explicitly permits this staged foundation. The iterator owns only its bounded traversal stack and borrows the document; the array builder owns copied output; jsonvalue owns conversion outcomes and atomic vector append, while ON EMPTY/ON ERROR and SQL diagnostics remain the future executor's responsibility. No worker, queue, distributed state machine or new persisted representation is introduced. I inspected the complete nine-file change map and rechecked the semantic delta since my d7c5b17 review. No new blocking correctness, ownership or resource-bound issue was found.
Previous blockers. The malformed-decimal direct/path mismatch is fixed at the shared bytejsonvalidate admission owner: canonical framing and complete JSON-number syntax now apply to scalar, nested, path and builder routes. Timestamp options now reach the scalar conversion through ConvertPathMatchesWithOptions; absent execution location fails closed rather than silently selecting UTC. Missing and JSON-null outcomes remain distinct. Earlier decimal rounding/range/diagnostic, malformed-ByteJSON and self-referential-container fixes are preserved.
Independent validation in this review. On an isolated Darwin/arm64 checkout, after building its native libraries, both commands passed:
mo-cgo-test -count=1 -timeout=120s ./pkg/container/bytejson ./pkg/internal/bytejsonvalidate ./pkg/sql/jsonvalue- the same complete three-package selection with
-race -count=1 -timeout=180s.
These runs include an uncommitted review-only challenge which mutates the original numeric/string/nested-object source buffer after Append, injects malformed decimal framing and cancellation, then appends a valid value, builds, closes and checks the detached result. All three source-shape cases passed. Existing independent decimal/reference-path, serialized-work, admission-before-expansion and vector rollback tests were also executed. Current-head required CI, SCA and BVT checks are green; no CI rerun or wait was needed.
Performance / scope. Traversal cursor retention is depth-bounded; encoded output and preflight work are bounded, including huge exponents and aliased malformed containers. This does not establish end-to-end JSON_TABLE throughput: document validation/copies still have costs and there is no SQL consumer here. No mixed-version rollout claim is made.
Not every historical comment is closed. fengttt's constant/correlated/stage-datalink SQL/BVT acceptance request has no recorded sign-off and remains a consumer-stage requirement under the approved split. I am not dismissing that review or declaring #28036 complete. Non-blocking cleanup also remains: unused convenience aliases, and the existing ownership test copies first.Data before mutating it, which weakens that specific assertion (the independent direct-mutation challenge above passes). The diagnostic consumer must still close the integer-warning/presentation policy when integrated. These are explicitly not represented as completed SQL acceptance.
No implementation changes were made or pushed; review-only tests remain outside the PR.
|
@fengttt The executable consumer/BVT categories requested in review 5284020018 are now delivered in d2c5d8d.
The canonical fixture is test/distributed/cases/function/table_func_json_table.sql with its checked .result and resources/json_table/input.json. On the exact final Darwin/arm64 service, two comparison runs passed 73/73 statements each; an independently enumerated oracle checked 50 output/error contracts, not merely generated expected output. Six full normal packages, full table_function/compile race suites and 100 lifecycle race repetitions passed. The final build/source/native bindings and raw results are retained in this task; the locally executed binary SHA256 is b9a9a125a3afd44fbaa3ae54c636324b485772da738937535fd4823281edf0a7. This is a finite serial G2 core, not full G3 or deployment acceptance. LEFT correlation, reverse policy syntax, persisted views and unaccepted lossy scalar policies are explicitly rejected; distributed diagnostic transport/full compatibility and QA remain open. Earlier G1-only approvals do not approve this new consumer. I am requesting your review of this delivered consumer/BVT increment, not claiming the entire issue is complete. New-head CI/SCA is separate and pending. |
|
Published The patch adds one grammar alternative, regenerates the parser with zero new conflicts, and adds regression controls for case variants, comments, NULL arguments, INSERT, CTAS, a plain Validation on darwin/arm64, Go 1.27.1:
New-head CI is still pending. This incremental grammar repair does not close the outstanding design/consumer/QA review requirements or attribute the separate coverage failure; no review thread was resolved and no re-review request was made on that basis. |
|
Published The old assertion equated unchanged authorization contents with an unchanged physical cache token. The integration test now compares canonical hashes of all seven tenant authorization catalogs before/after the actual INSERT, checks the resulting data row count and all three independent query/prepared protocols, and proves that its contents oracle observes a real REVOKE. The engine test explicitly retains invalidation on watermark movement, stable-state reuse, pending/future/unready rejection and same-watermark reconstruction identity. No sleep, retry or permissive cache fallback was added. Validation bound to the two final test-file hashes over source
Both exact owned Linux containers are absent after completion. Complete raw logs, source/native/binary hashes, frozen wrappers and reports are retained in the manual task evidence. The original whole issues package also passed with diagnostic-only logging and its original assertion; the CI scheduling trigger was not reproduced, so this is not a flaky/upstream attribution or a rerun claim. New-head required CI remains independent and pending. This test-only increment preserves Ready and does not close full G3/distributed diagnostic, remaining compatibility, persisted-view or deployment QA gates, resolve any review thread, or request another review. |
|
Incremental CI repair in d2a7c2a: unlock now treats typed EPIPE/ECONNRESET/ConnectionReset as transport ambiguity, refreshes the allocator binding, and either retries the same owner or completes old-generation cleanup. Deterministic owner rejections remain terminal; no message-substring retry policy was added. The deterministic regression failed on the previous production source for both same-owner retry and reassigned-owner cleanup. On Linux amd64 with Go 1.27.1 and qualified native artifacts: lockservice normal and race each passed 654/654 tests; focused coverage (including TestUnlockWithBindTimeout) passed three repetitions. Focused adaptive race passed the new regression 73/73, deterministic owner rejection 100/100, cancellation during bind refresh 100/100, and TestUnlockWithBindTimeout 100/100. Full go vet for lockservice and a txn/client consumer build passed. This is a scoped transport-classification repair, not a claim that all PR acceptance is complete. New-head required CI still needs verification. The previous TestDelete4 durable-count failure remains an independent unresolved cluster; the full G3/distributed/mixed-version and deployment acceptance gaps are retained. No CI rerun, base synchronization, or review-thread closure was performed. |
|
Incremental CI setup repair published as Run 37892714020's two Compose jobs failed before BVT because the native SDK image provided Go 1.27.0 while Validation: the new contract fails against the original Dockerfiles and passes after the patch; six existing native-contract tests pass; BVT for this incremental setup-only delta is N/A: the failure occurs before a SQL runtime exists; the before/after contract and actual full-module container are the relevant regressions. The PR's existing canonical JSON_TABLE BVT and immutable kernel/race evidence remain separate. The old head's ONNX Runtime download HTTP 504 is a different setup cluster. A local immutable fallback download matched the pinned SHA256, but that does not establish CI-runner connectivity. No blind rerun was issued. New-head CI, remaining G3/distributed/compatibility/deployment acceptance, and reviewer decisions are not claimed complete by this patch. |
|
Validation update for head
This fills the full normal owning-package validation gap, but does not establish the cause of the earlier CI Additional bounded mechanism comparison (separate from the full-package run above):
The comparison demonstrates an observable old/main mechanism difference, not attribution of CI run37925002566's 94/93 result to that mechanism. A real competing-predecessor/transfer/restart storage-entry control is prepared but NOT_RUN. Original CI causality and required-CI failure remain open; no automatic rerun, synchronization, resolution, or re-review follows from this comparison. Additional real-storage CheckAll control (normal, non-race)This supersedes the earlier NOT_RUN status for this specific CheckAll control, not for the original Ubuntu CI failure. Two fresh Go 1.27.1 linux/amd64 CGo test binaries ran the unchanged upstream competing-predecessor assertions with default CheckAll and real storage. The private fixture only renames the upstream test; it does not change its oracle or replace CheckAll with CheckIncremental.
The root independently verified source/fixture bytes, both fresh binaries and loaded libraries, complete raw test2json events, exit codes, no skips, no OOM/swap, and exact container/PID/cgroup/deadline cessation. Raw evidence is retained in This is one normal-mode mechanism control per subject, not a matching reproduction of original CI. The original failure runs TestDelete4 with Bounded original-CI-mode diagnostic — r5linux1The unchanged original Compilation/runtime mode is Linux/amd64 Go 1.27.1, The independent audit verifies source/module bytes, binary/build mode, actual SDK loader libraries, all nine test2json terminal/exit outcomes, fixed CPU4/7GiB/noSwap/PID512 limits, no OOM, the original whole-lifecycle deadline, and actual stopped container/cgroup/watchdog units. Root-audit SHA256: This does not reproduce the original CI four-heavy-package pressure, attribute its 94/93 failure, prove flakiness, or establish whole-PR acceptance. It also does not undo the separately retained deterministic transferred-delete counterexample above. No source change, base synchronization, CI rerun, thread resolution or re-review request is performed by this evidence update. The original CI failure remains diagnostically unattributed; current required-check status is recorded separately below. Current exact-head required-check snapshot: |
|
Published This resolves the actual merge conflicts while retaining the pinned Go 1.27.1 installation, native/builder stage separation, and main's asynchronous metric notification fix. It also repairs the CI seed-contract regression to accept explicit, exact-version Go installation only when replacement and execution order are verified. Actual Linux/amd64 Go 1.27.1 validation on this exact candidate:
This is incremental delivery, not whole-PR acceptance. The old-head Ubuntu UT TestDelete4 94/93 failure remains retrospectively unattributed; successful current-candidate runs do not prove it was flaky or establish its old root cause. New-head CI is a separate pending gate. Standalone JSON_TABLE BVT and privilege dual-CN tests do not substitute for full distributed JSON_TABLE/deployment acceptance. Existing review requests are retained; no duplicate re-review request or automatic finding closure is being claimed. Delivery marker: pr28924-current-candidate-v52-78798b1c |
Merge Queue Status
This pull request spent 35 minutes 15 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. Waiting for any of
All conditions
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:
Related to #28036
QA required: yes. This partial feature must not close the issue.
What this PR does / why we need it:
Preserves the JSON_TABLE G1 conversion/path foundation and adds an executable, serial G2 SQL consumer for the approved RFC in #28273. The consumer connects contextual parser/AST grammar, dynamic-schema binding, correlated APPLY planning, bounded iterator frames, scalar/default conversion, vector output, and existing DATALINK/stage ownership.
The supported core includes constant JSON/text input, JSON/text/DATALINK column input, direct and correlated stage-DATALINK, ordinality, typed PATH/EXISTS columns, nested sibling traversal, ON EMPTY/ON ERROR, prepared reuse, and INNER/CROSS correlation with ON/USING/NATURAL predicates preserved. Invalid DEFAULTs fail during binding even for an empty source. Missing/unmatched nested inputs produce NULL-complemented rows, not DEFAULT-filled rows.
Warning publication uses the existing attempt-owned sink and occurs at successful batch production, including early LIMIT. One local function occurrence emits at most one warning per truncating column across input/output batches; failed/cancelled attempts discard their pending sink through the existing execution owner. Operators close iterators, release result/executor memory and reset generation state for reuse. JSON_TABLE execution is forced onto one coordinator scope until distributed keyed-once diagnostics have their separate verified contract; input scans may still be remote.
This is not complete G3/MySQL compatibility. Correlated LEFT JOIN, reversed policy syntax requiring parse-time diagnostics, and persisted JSON_TABLE views are rejected explicitly. Lossy character and fractional-to-integer conversions whose compatibility policy is not yet accepted also fail closed rather than silently claiming NULL ON ERROR compatibility. Distributed diagnostic identity/transport, full retry/remote terminal accounting, persisted-view upgrade/downgrade and deployment QA remain separate open acceptance gates.
Validation and evidence
Current metric-fixture CI repair
Current head:
1d4fbab3cad522824c07e083c90c23e71a0e0f3d. TestExporter now waits for the two actual asynchronous full raw-histogram collector sends before gathering and restoring the global buffer limit. All original four sends, fourteen samples, clock, counter/gauge and capacity assertions remain unchanged. No production JSON_TABLE, kernel or native source changed.PASS on actual Linux/amd64 Go 1.27.1, CPU4/8GiB/no swap: focused normal count5; full owning-package normal and atomic coverage; race probe; focused race count100; full owning-package race. Raw executions, compiler/default-vet evidence, coverage and exact source/native hashes were independently verified by root. Genuine native provenance and actual resolved library closure are verified; unused libmo is not claimed as loaded. Separate golangci-lint and new SQL/BVT execution are not claimed. BVT: N/A for this test-only completion oracle; the full PR retains its canonical JSON_TABLE SQL/result pair and earlier immutable evidence.
The independent TestDelete4 CI failure (committed count108 versus value107) remains unresolved. Its bounded exact base/head controls are pending: the first validator stopped at an incorrect unused-libmo loader requirement before executing those tests. This incremental push is not a CI-green, flaky/upstream, full-feature, QA or review-closure claim. No failed-job rerun, thread resolution or re-review is inferred.
Previous incremental CI-toolchain repair
Recorded head:
bd35929c5d53d69dbab9f764430694c3ebaf42a4. Both source-build Dockerfiles retain the published native SDK and replace Go 1.27.0 with Go 1.27.1 to satisfy the module minimum with local toolchain selection. The before/after regression contract and six existing native-contract tests pass. An owned, resource-capped mo-55 Linux/amd64 container used actual Go 1.27.1 to download the full repository modules without changing go.mod/go.sum (exit 0; no OOM). Both Dockerfiles pass BuildKit checks for amd64/arm64; ARM execution and a new full service-image/BVT run are not claimed. Temporary containers/builders were verified absent.BVT for this incremental setup-only delta is N/A because the failure happens before SQL runtime; the contract and real module container are the relevant regressions. Existing canonical JSON_TABLE BVT and immutable kernel/race evidence below remain separate. The old-head ONNX download HTTP 504 is an independent setup cluster, not diagnosed as flaky. New-head CI and full-feature acceptance remain pending; no blind rerun or review closure is inferred.
Previous test-only CI repair and validation
Recorded head:
f043ab08560754bdcc958983cee83a68f52ee03a. Fixes the privilege-cache test's content-versus-physical-version oracle; production authorization and JSON_TABLE source are unchanged. The exact two test files over accepted sourcea5e592952359f713389caab54d2a7fad34cc7b64and basef6c86c9c0452db27af1b0c9aceff1aa5b96aabadpassed eleven normal owning packages, focused physical-version and JSON_TABLE lifecycle race (100 each), full table_function/compile race, isolated mo-50 Linux race (3 focused repetitions plus all 155 issues tests), pinned incremental lint/molint, and a complete supported ARCHSIMD=0 build. Two real canonical JSON_TABLE BVT comparisons passed 73/73 each, with zero failed/ignored/abnormal. SQL database/stage teardown and exact owned local service/Linux container absence were verified.The old physical-token equality expectation has a deterministic counterexample with no catalog row mutation. The original full issues run passed with diagnostic-only logging; the original CI scheduling trigger was not reproduced and is not classified as flaky/upstream. New-head required CI is pending and independent. Full G3/remaining compatibility/distributed diagnostics/persisted-view/deployment QA are not closed by this test-only repair. Complete evidence and hashes are retained in the manual task, with the publication comment explaining the source/native/binary binding and build-mode limit.
Previous integrated consumer validation
Previous integrated head: 2805e60, a normal merge of actual main f6c86c9 after GitHub reported a real conflict. The merge preserves both main's registered plugin coordinator/transaction constraints and JSON_TABLE's serial warning ownership. Parser regeneration retained both grammar sets. Three new planner test constructors were adapted to main's existing test-process owner.
PASS for the integrated tree 610e1ed4993dae018975ec84f4f8afe60ae4bd03 on Darwin/arm64, Go1.27.1: seven complete normal owning packages, affected table_function/compile race and coordinator tests, native preparation and final service build. Two actual unchanged canonical BVT comparisons each passed 73/73, with zero failures/ignored/abnormal; the independent 50-contract oracle passed before/after. SQL database/stage teardown is 0/0 and the exact owned service stopped. This merge used focused affected race, not a claimed full new-main race suite.
Executed integrated service SHA256: e425fa9d91fcc95a3bd082109b050c950c159fe28d7d825a0990cd6f98b84c4d; native library SHA256: e2fd2236b49444926de47d8a216c15c7547a8a7df265f89a478d0f5be5bda107. New-head CI and independent review remain pending. The existing fengttt review request is retained, not duplicated; a request does not clear CHANGES_REQUESTED.
Historical pre-merge consumer evidence
Starting head: 882260f. Current consumer commit: d2c5d8d; actual validation base/merge-base: 466eb8f.
PASS on the exact final source: six complete normal owning packages (5202 top-level / 9652 nested PASS records), full table_function and compile race suites, and 100 lifecycle race repetitions. Native provenance and final service build passed on Darwin/arm64. Frozen and post-validation Go hashes match; the root independently checked all 21 changed file hashes and reviewed the production/test delta.
PASS on the actual final service: two separate canonical SQL/BVT comparison runs, each 73/73 statements with zero failures/ignored/abnormal. An independent finite oracle checked 50 output/error contracts before and after the runs, including empty-result headers, correlated ON/USING/NATURAL results, direct/correlated stage-DATALINK, prepared reuse, early LIMIT/cross-batch warnings, failed-attempt Error without leaked Warning, and quoted PATH/DEFAULT bytes in both SQL modes. Test database/stage teardown counts are zero; the owned service was stopped. Earlier 57-statement BVT is not used for this final delta.
The exact locally executed service SHA256 is b9a9a125a3afd44fbaa3ae54c636324b485772da738937535fd4823281edf0a7. Raw logs, command/native/source manifests, both BVT reports and the independent oracle are retained in the task evidence. New-head required CI/SCA and independent review remain pending; no local SCA or deployment PASS is claimed.
The existing G1 fixes remain: representation-aware decimal diagnostics, malformed stored JSON and complete decimal-payload admission, explicit timestamp session-location options, bounded traversal/building, and original ownership cleanup. Historical validation belongs to its recorded immutable heads; it is not new-head CI or full-feature acceptance.
Dependencies and QA
Approved design/RFC #28273 describes the staged G1/G2/G3 delivery; referenced approval is not approval of this exact implementation. Real SQL consumer/BVT delivery answers the previously unexecutable examples, but does not claim fengttt has accepted the split or withdrawn any review requirement. Other reviewers' actual diagnostic/iterator requirements and full-feature gates remain in the private per-finding ledger.
Ready is preserved. No thread is automatically resolved, no reviewer is automatically re-requested while applicable criteria remain incomplete, and no deployment/CI/merge/issue-closure success is inferred from local tests.