Repository navigation
docs: define exact Sirius numeric contract - #29210
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed exact head 98f37b2 against main 510e28e.\n\nThe N0 design/inventory gate passes. The exact-decimal representation, physical-width/precision/scale/nullability identity, rounding/overflow/division/NULL/aggregate/metadata contracts, capability rejection flow, bounded-resource requirements, alternatives, and staged approval gates are coherent. The Q1-Q22 inventory is deterministic and correctly keeps unsupported queries declined without treating fallback as success.\n\nThis is a design/inventory-only change with no production enablement, so BVT is not required here. Future native/MO implementation PRs must link this exact approved revision and provide the specified independent public SQL parity, error/metadata, GPU, failure, and performance evidence before lowering or default cutover.
Merge Queue Status
This pull request spent 23 seconds in the queue, including 2 seconds running CI. Required conditions to merge
|
XuPeng-SH
left a comment
There was a problem hiding this comment.
Correction to the prior review after the complete exact-head design audit.\n\nREQUEST_CHANGES at exact head 98f37b2.\n\nThe design-first gate has concrete semantic blockers:\n\n1. docs/design/sirius-numeric.md:191–201 requires raw signed-256 intermediate overflow to fail, but the current native MO d256MulSlowOne/d256MulScaledFallback path uses a 512-bit scratch product and accepts raw overflow when the scaled result fits. The existing TestD256MulScaledRawOverflow fixes this behavior. For example, two DECIMAL(41,30) values of 10000000000 have a raw coefficient of 10^80 but a valid DECIMAL256(65,30) result coefficient of 10^50. The design must define overflow at the correct operation boundary and add this oracle.\n\n2. docs/design/sirius-numeric.md:186–196 requires declared-precision checks for scalar results, but current Decimal256 division follows decimalBatchArith without the precision check used by add/subtract/multiply. Resolve this conflict with the no-SQL-behavior-change invariant and pin the semantic baseline.\n\n3. Sections 3–5 do not define how statement kind/strict mode/IGNORE reach the native consumer or how native numeric failures map to distinct MatrixOne error classes. Type signatures alone cannot distinguish SELECT division-by-zero from qualifying strict DML. Freeze the carrier and error mapping, or explicitly reject unsupported contexts at preparation.\n\nThe Q1–Q22 inventory remains useful admission evidence; this correction is about design contradictions and cross-endpoint contract closure, not BVT or coverage percentage.
What type of PR is this?
Which issue(s) this PR fixes:
Refs #28968 and #28966. This design/inventory PR does not close either issue.
What this PR does / why we need it:
Defines the exact-numeric semantic contract required before embedded Sirius can execute every canonical TPC-H query without decimal narrowing, floating conversion, skipped assertions, or local fallback.
Current inventory: Q2, Q4, Q12, Q13, Q16, Q18, Q21, and Q22 are eligible; the other 14 queries decline explicitly. That is a blocker inventory, not a fallback or rollout claim. This PR changes no production eligibility or execution path.
Validation on the exact branch:
Reviewers should approve the exact design revision only if the wire representation and every semantic/error/metadata rule are acceptable; later native and MO implementation PRs must cite that approved revision.