zihaozeng0021 commented on issue #2288:
URL: https://github.com/apache/age/issues/2288#issuecomment-3693471906
Thanks for the reply — I agree with the general point that “same result ≠
same cost”: different syntactic forms can lead to different execution routes
and evaluation orders.
That said, the key point in my report is that these predicates aren’t merely
“different routes”; they are *semantically provable* as unsatisfiable (i.e.,
they cannot evaluate to true for any row), so in principle the
planner/optimizer could prune the downstream work early. For example:
- `id(q) <> id(q)`: within the same row, the same expression compared to
itself should never be true.
- `WITH p, count(q) AS c WHERE c < 0`: `count()` cannot be negative.
- `WITH p, {n:q} AS m WHERE m.n IS NULL`: after a successful `MATCH
(q:Person)`, `q` should not be null (at least under typical Cypher
semantics/implementations).
Given that, seeing a cliff like ~0.3ms vs ~5 minutes suggests a missing
optimization (constant folding, predicate pushdown, short-circuiting, or
recognition of contradictions), not just “different routes” in a neutral sense.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]