Skip to content

fix(embedding): preserve exact decimals in NULL predicates and true joins - #29

Merged
aunjgr merged 1 commit into
matrixorigin:upstream-dev-mergefrom
aunjgr:fix/mo-exact-null-predicates
Oct 9, 2026
Merged

aunjgr merged 1 commit into
matrixorigin:upstream-dev-mergefrom
aunjgr:fix/mo-exact-null-predicates

Conversation

@aunjgr

@aunjgr aunjgr commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

After #28, MO exact-decimal queries still hit two GPU consumer gaps: IS NOT NULL can send Decimal256's private STRUCT through an unsupported cuDF AST unary operation, and canonical TPC-H Q11/Q15/Q22 retain JOIN ON true as unsupported DuckDB ANY_JOIN because exact preparation skips the ordinary optimizer.

Materialize exact NULL predicates from the canonical top-level validity mask, using the existing task stream/resource and AST temporary-column owner. Lower literal TRUE joins to equal constant keys in the existing GPU join, retaining join kind, projection maps, mark binding, duplicate rows and empty-side outer NULLs. Private key columns remain outside public output. FALSE/NULL predicates retain rejection before readers or GPU work start. The numeric URI, capability mask and ABI-v1 layouts remain unchanged.

Validation at clean head 2a39339beb0c2312dc4b71fbdd472e822450637c, frozen Pixi mo, cuDF/RMM 26.08, RTX 3070:

  • Exact and ordinary GPU controls: 14,879 assertions / 11 cases, including all physical widths, NULLs, offset slices, empty input, typed NULL literals and materialize/interpreted/JIT strategies.
  • Production C ABI numeric suite: 1,964 assertions / 10 cases. TRUE joins cover INNER/LEFT/RIGHT/FULL, both/either/neither side empty, duplicate/NULL payloads and Decimal256 high limbs; FALSE/NULL controls start no work.
  • Binding/preparation controls: 852 assertions / 81 cases. Eight SDK exporter tests and all pinned changed-file hooks pass.
  • Clean ABI-v1 SDK: exact source revision, header/literal schema and all 73 artifact fingerprints verified. An independent C99 consumer built from the exported link arguments passes real GPU work, credit accounting, shutdown and reuse.
  • Joint MO development consumer: all 22 native preparations and the full public MySQL numeric fixture pass. Its 31 terminal events confirm GPU tasks, capability 31, exact profile, no fallback and zero retained input/result credit. Values, metadata, numeric error ownership, masked errors, prepared division and empty/all-NULL scalar joins are checked against native MO.

The joint MO result uses an explicitly marked development SDK. C still pins merged #28 and must advance only after this PR merges, then repeat merged-pin delivery checks. This is preparation/small-fixture evidence; SF1/SF10, lifecycle/resource baselines and performance acceptance remain PR D. No rollout gate is waived. Local validation used matching official NVIDIA 615.71.09 libraries in a temporary test launcher; host packages and shipped artifacts were unchanged. CI status is reported separately from these local passes.

Refs MO #28968, MO #28966. Contract and ownership map: docs/mo-exact-null-predicates.md.

Consumer integration is available as draft MO C #29757.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant