Repository navigation
fix: preserve temporal scale and timezone in group_concat - #28701
Conversation
Render temporal inputs at their declared scale and use the initiating session timezone for TIMESTAMP values across local and remote execution.
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed the complete current diff at f3ae3fc against main db4edb4. One P2 correctness blocker remains: remote finalization cannot rely on the existing session timezone codec to preserve a named location (inline finding).
The scale-aware formatting covers ordinary, ordered and DISTINCT payload rendering; group/merge/spill reconstruction and window/timewin creation configure execution-local timezone, and cleanup does not serialize a location pointer into aggregate state. NULL handling, raw equality/order payloads and bounded truncation mechanisms remain structurally unchanged. Added formatter and SQL/prepared tests exercise fractional precision and fixed +08:00 rebinding, but that fixed-offset case does not expose the named-zone transport failure.
Validation: exact-head source tracing through session setting, process serialization/deserialization, distributed shuffle-group NeedEval=true construction, aggregate creation and final rendering; inspected all changed tests and PR comments. Also inspected Go's actual time binary codec and local timezone database historical Shanghai offset. I did not run MatrixOne UT/BVT or a live two-CN SQL reproduction, and did not wait for CI. The finding is a composed source-derived counterexample, not a claimed executed SQL result.
aptend
left a comment
There was a problem hiding this comment.
Deep review of exact head f3ae3fc9b35489bed0d169db908c43869e399b94 against exact base/merge-base db4edb49d2a9da049781aa985b6227b1601db39b. I read the complete existing review, inline comment, unresolved thread, issue discussion, and PR contract, then independently traced the full eleven-file diff through ordinary/ordered/DISTINCT finalization, group/merge/spill reconstruction, window/time-window construction, remote shuffle ownership, and process session serialization. The scale-aware formatting and fixed-offset local/prepared paths are correct, and raw payload/order/distinct behavior remains unchanged. One blocking distributed named-timezone defect remains inline: the process codec does not preserve IANA timezone rules, so the newly consumed remote location can format TIMESTAMP values with the wrong offset.
Validation at the exact head: repository-required third-party/CGo artifacts built; full ./pkg/sql/colexec/aggexec ./pkg/sql/colexec/group ./pkg/sql/colexec/timewin ./pkg/sql/colexec/window tests passed; focused aggregate race tests passed; git diff --check passed; all GitHub checks are green. A review-only process-codec counterexample reproduced the named-zone offset corruption and was removed.
Address the review at the execution boundary. Retain a local path when the selected workers cannot preserve the expression contract and recheck the destination before sending. Include focused codec, placement, and execution regressions.
Reject remote rendering without a portable timezone owner and validate the pipeline destination against the probed worker identity. Keep the named-zone regression independent of process-global time.Local so race validation is safe while background services are running.
Resolve legacy address-only scopes against the live CN inventory before probing protocol support. When a scope includes a service ID, require both its identity and pipeline address to match. Verify unknown destinations, stale addresses, cancellation, and successful legacy routing without weakening the remote feature gate.
Distinguish fixed offsets from historical and daylight-saving locations using transition bounds. Keep UTC and fixed SYSTEM sessions on the legacy compatible remote path, while unportable rule-bearing locations stay on the coordinator. Do not reinterpret a fixed offset as IANA rules merely because its display name matches a named location. Cover both classifications and destination validation.
|
Merged newest main in b7c9324 and resolved the integration conflicts without dropping either timezone formatting or the new GROUP_CONCAT warning-source state. Main now owns protocol65 for ASCII and66 for aggregate row provenance. Named-timezone remote finalization therefore requires67, with current-main66 workers taking the existing local fallback. The actual lowered-aggregate send-time fence remains intact. Full compile/process/aggregate/group tests and the real two-CN named-zone/fallback test pass on the combined code; full SCA passes. Both previously reviewed fixes remain in place. |
aptend
left a comment
There was a problem hiding this comment.
Deep re-review of exact head b7c9324 against exact base and merge-base 0002cd5. I read all prior reviews, inline comments, author replies, and resolved threads, then checked both the full diff and the increment since the prior reviewed f3ae3fc head. The previous IANA timezone-loss blocker is closed by transporting and reloading the named location, preserving fixed-offset compatibility, and retaining named rules across forwarded hops. The later lowered-aggregate bypass is also closed: the send-time fence inspects Aggregate.Op plus TIMESTAMP arguments recursively in child pipelines, while placement and destination probes fail closed for old or unknown workers. Temporal scale and timezone formatting cover ordinary, ordered, DISTINCT, merge, spill, window, and time-window executor construction without changing raw equality/order payloads. No blocking issue found. Validation at this exact head: repository-required thirdparties and CGo built; focused process, aggregate, and compile timezone/protocol tests passed; full group, timewin, and window package tests passed; the executed two-CN named-zone winter/summer remote-owner and old-worker fallback test passed; gofmt and git diff checks passed; required GitHub CI is green.
Merge Queue Status
This pull request spent 35 minutes 11 seconds in the queue, with no time running CI. Waiting for any of
All conditions
ReasonPull request #28701 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
|
…in#28701) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#28657 ## What this PR does / why we need it: GROUP_CONCAT used scale-blind temporal formatting and the internal UTC representation of TIMESTAMP. Its remote process codec also retained only an offset, so named locations could lose historical and daylight-saving rules: Asia/Shanghai could become a fixed +08:05:43 zone instead of using the offset applicable to each timestamp. Render DATETIME and TIME at their declared scale and TIMESTAMP in the initiating session location. Configure group, merge-group, window, and time-window executors consistently. Add the IANA timezone name to process session metadata and reconstruct that named location on the receiving CN. Preserve the legacy time-zone bytes for fixed-offset and older payloads; reject invalid named identities instead of silently discarding their rules. Require compatible worker capability before remotely finalizing named-zone GROUP_CONCAT. Probe selected worker versions and validate their destination addresses, use local placement when capability cannot be established, and recheck before sending. Machine-local SYSTEM zones with historical or DST rules remain with the coordinator when no portable name is available; UTC and fixed-offset system zones retain their compatible remote path. Aggregate payload and spill formats are unchanged. Cover named-zone codec round trips through two hops, fixed-offset compatibility, invalid names, winter/summer finalization, and a real two-CN query whose remote worker finalizes GROUP_CONCAT. Verify that lowering the worker capability moves execution locally while preserving the result. The send-time fence inspects lowered Group/MergeGroup aggregate IDs and TIMESTAMP arguments, including nested/forwarded pipeline children, rather than relying only on function expressions. Exercise a real encoded NeedEval group with a compatible destination followed by a capability downgrade, plus DISTINCT and non-TIMESTAMP controls. --------- Co-authored-by: XuPeng-SH <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…in#28701) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#28657 ## What this PR does / why we need it: GROUP_CONCAT used scale-blind temporal formatting and the internal UTC representation of TIMESTAMP. Its remote process codec also retained only an offset, so named locations could lose historical and daylight-saving rules: Asia/Shanghai could become a fixed +08:05:43 zone instead of using the offset applicable to each timestamp. Render DATETIME and TIME at their declared scale and TIMESTAMP in the initiating session location. Configure group, merge-group, window, and time-window executors consistently. Add the IANA timezone name to process session metadata and reconstruct that named location on the receiving CN. Preserve the legacy time-zone bytes for fixed-offset and older payloads; reject invalid named identities instead of silently discarding their rules. Require compatible worker capability before remotely finalizing named-zone GROUP_CONCAT. Probe selected worker versions and validate their destination addresses, use local placement when capability cannot be established, and recheck before sending. Machine-local SYSTEM zones with historical or DST rules remain with the coordinator when no portable name is available; UTC and fixed-offset system zones retain their compatible remote path. Aggregate payload and spill formats are unchanged. Cover named-zone codec round trips through two hops, fixed-offset compatibility, invalid names, winter/summer finalization, and a real two-CN query whose remote worker finalizes GROUP_CONCAT. Verify that lowering the worker capability moves execution locally while preserving the result. The send-time fence inspects lowered Group/MergeGroup aggregate IDs and TIMESTAMP arguments, including nested/forwarded pipeline children, rather than relying only on function expressions. Exercise a real encoded NeedEval group with a compatible destination followed by a capability downgrade, plus DISTINCT and non-TIMESTAMP controls. --------- Co-authored-by: XuPeng-SH <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…in#28701) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#28657 ## What this PR does / why we need it: GROUP_CONCAT used scale-blind temporal formatting and the internal UTC representation of TIMESTAMP. Its remote process codec also retained only an offset, so named locations could lose historical and daylight-saving rules: Asia/Shanghai could become a fixed +08:05:43 zone instead of using the offset applicable to each timestamp. Render DATETIME and TIME at their declared scale and TIMESTAMP in the initiating session location. Configure group, merge-group, window, and time-window executors consistently. Add the IANA timezone name to process session metadata and reconstruct that named location on the receiving CN. Preserve the legacy time-zone bytes for fixed-offset and older payloads; reject invalid named identities instead of silently discarding their rules. Require compatible worker capability before remotely finalizing named-zone GROUP_CONCAT. Probe selected worker versions and validate their destination addresses, use local placement when capability cannot be established, and recheck before sending. Machine-local SYSTEM zones with historical or DST rules remain with the coordinator when no portable name is available; UTC and fixed-offset system zones retain their compatible remote path. Aggregate payload and spill formats are unchanged. Cover named-zone codec round trips through two hops, fixed-offset compatibility, invalid names, winter/summer finalization, and a real two-CN query whose remote worker finalizes GROUP_CONCAT. Verify that lowering the worker capability moves execution locally while preserving the result. The send-time fence inspects lowered Group/MergeGroup aggregate IDs and TIMESTAMP arguments, including nested/forwarded pipeline children, rather than relying only on function expressions. Exercise a real encoded NeedEval group with a compatible destination followed by a capability downgrade, plus DISTINCT and non-TIMESTAMP controls. --------- Co-authored-by: XuPeng-SH <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
issue #28657
What this PR does / why we need it:
GROUP_CONCAT used scale-blind temporal formatting and the internal UTC representation of TIMESTAMP. Its remote process codec also retained only an offset, so named locations could lose historical and daylight-saving rules: Asia/Shanghai could become a fixed +08:05:43 zone instead of using the offset applicable to each timestamp.
Render DATETIME and TIME at their declared scale and TIMESTAMP in the initiating session location. Configure group, merge-group, window, and time-window executors consistently. Add the IANA timezone name to process session metadata and reconstruct that named location on the receiving CN. Preserve the legacy time-zone bytes for fixed-offset and older payloads; reject invalid named identities instead of silently discarding their rules.
Require compatible worker capability before remotely finalizing named-zone GROUP_CONCAT. Probe selected worker versions and validate their destination addresses, use local placement when capability cannot be established, and recheck before sending. Machine-local SYSTEM zones with historical or DST rules remain with the coordinator when no portable name is available; UTC and fixed-offset system zones retain their compatible remote path. Aggregate payload and spill formats are unchanged.
Cover named-zone codec round trips through two hops, fixed-offset compatibility, invalid names, winter/summer finalization, and a real two-CN query whose remote worker finalizes GROUP_CONCAT. Verify that lowering the worker capability moves execution locally while preserving the result.
The send-time fence inspects lowered Group/MergeGroup aggregate IDs and TIMESTAMP arguments, including nested/forwarded pipeline children, rather than relying only on function expressions. Exercise a real encoded NeedEval group with a compatible destination followed by a capability downgrade, plus DISTINCT and non-TIMESTAMP controls.