Repository navigation
TUR-118: Cypher: answer null for an ordering between types with no order - #1181
Conversation
|
Note AI-generated summary. SummaryThe two TUR-118 queries already answered correctly after 52fd65e (TUR-124). They are pinned here. The rest of the PR fixes the same openCypher rule where it still failed: an ordering across types was an analyzer error instead of null.
ExprAnalyzer < <= > >=
- allowlist of 8 same-type pairs + 9 ListItem pairs, else ANALYZE ERROR
+ any two ordering operands -> Bool
DBProgramGenerator::translateBinaryExpr
- if comparesAgainstNull -> nullConstantColumn
+ if comparesAgainstNull || ordersAsDisjointTypes -> nullConstantColumn
else -> db.lt / db.gt / db.lte / db.gteMap values were rejected by every ordering operator, even against their own type. They now go through the same kernels as list cells. The Evidence
Merge DangerDoor: two-way Revert the commit and the analyzer rejects these queries again. No storage format, wire format or enum ordinal changes. Blast Radius: queries Queries that used to fail at analysis now run and return null. A WHERE built on one of them now keeps no rows instead of raising an error. ORDER BY is untouched: it still sorts across types by openCypher orderability. |
Answer null for <, <=, > and >= between values of types with no order between them.