Skip to content

[#5298 第二批] filter-normalizer(Cube 面)NULL-safe 对齐:先实测既有 NULL 行为,分叉则改写;N1 入表按后落地者规则 #5977

Description

@os-zhuang

裁决依据:#5298「四项确认落档」评论(维护者 2026-08-06)——实施面①裁定全扩分批,本单是第二批;方向④:非否定路径 $ne/$nin/$notContains 包含 NULL 行。第一批(PR #5962:driver-sql 五出口 + read-scope-sql + formula $exists)已 MERGED。

任务

  1. 先实测:packages/services/service-analytics/src/strategies/filter-normalizer.ts 的 notEquals/notIn/notContains 降级路径(约 :267-275,极性表副本约 :710-719)对 NULL 行的既有行为——非否定路径上的 $ne / $nin / $notContains:driver-sql 排除 NULL 行,driver-memory / formula 返回它们(#5146 只裁定了 $not) #5298 成本清单明记此面未测(容器无 Cube 实例);用其真实消费端(native-sql 一致性 harness / MemoryAnalyticsService 路径)驱动实测,别静态读码下结论。
  2. 与裁决方向分叉的,改写对齐(参照 PR fix(drivers,analytics,formula): $ne / $nin / $notContains 在 $not 之外也 NULL-safe (#5298) #5962 中 read-scope-sql 的形态:OR 展开、复用极性判定);已一致则记录证据、一行不改。
  3. N1 入表判定:FILTER_LOGIC_CASES 的 N1($ne 含 NULL 行)按「后落地者入表」规则(非否定路径上的 $ne / $nin / $notContains:driver-sql 排除 NULL 行,driver-memory / formula 返回它们(#5146 只裁定了 $not) #5298 PM 裁定评论)——若 drivers(turso): remote 模式没有继承 #5146 的 $not NULL-safe —— 同一个 TursoDriver,local 返回 NULL 行、remote 不返回(实测,origin/main) #5903(turso remote)届时已 MERGED,本 PR 补 N1 入表(spec 表文档 RULED-but-not-yet-enrolled 小节有现成行,复制即可);未落地则如实留给 drivers(turso): remote 模式没有继承 #5146 的 $not NULL-safe —— 同一个 TursoDriver,local 返回 NULL 行、remote 不返回(实测,origin/main) #5903,报告说明。
  4. 反向验证方向预判:若第 2 步有改写,native-sql harness 的 N1 格(现红,见 PR fix(drivers,analytics,formula): $ne / $nin / $notContains 在 $not 之外也 NULL-safe (#5298) #5962 表文档小节)应转绿。

边界(⛔)

验收

  • filter-normalizer 对三算子的 NULL 行为与裁决一致(实测证据,非推断);service-analytics 全绿 + 相关 conformance harness 全绿;若有行为改写 → changeset。

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions