The parser has no CASE expression, neither the simple form nor the searched one.
MATCH (m:Post)
WITH CASE WHEN size(m.content) < 16 THEN 0
WHEN size(m.content) < 32 THEN 1
ELSE 2 END AS bucket
RETURN bucket, count(*) AS n
zu: 42001: line 2, column 11: expected MATCH, OPTIONAL MATCH, CALL, UNWIND, WITH, or RETURN, found 'WHEN'
ISO 39075 has CASE in the value expression grammar, both the simple form that compares one operand against a list of whens and the searched form that takes a predicate per when, with the NULLIF and COALESCE abbreviations alongside them. It belongs to G6, #121.
This is not a corner. It is the first thing a reporting query reaches for when it needs a bucket or a label, and it is the only reason snb-bi1 in graph-bench has no zu text: the shape is a posting summary grouped by year and by content length bucket, and the bucket is a CASE. Writing the bucket some other way would make it a different query, so the text is left out rather than bent, and the query skips. tamnd/graph-bench#86 has the note in place.
The other four BI shapes do have zu texts and zu is 9x to 34x ahead of ladybug on three of them, so this one skip is the whole of the gap in that family.
The parser has no CASE expression, neither the simple form nor the searched one.
MATCH (m:Post)
WITH CASE WHEN size(m.content) < 16 THEN 0
WHEN size(m.content) < 32 THEN 1
ELSE 2 END AS bucket
RETURN bucket, count(*) AS n
zu: 42001: line 2, column 11: expected MATCH, OPTIONAL MATCH, CALL, UNWIND, WITH, or RETURN, found 'WHEN'
ISO 39075 has CASE in the value expression grammar, both the simple form that compares one operand against a list of whens and the searched form that takes a predicate per when, with the NULLIF and COALESCE abbreviations alongside them. It belongs to G6, #121.
This is not a corner. It is the first thing a reporting query reaches for when it needs a bucket or a label, and it is the only reason snb-bi1 in graph-bench has no zu text: the shape is a posting summary grouped by year and by content length bucket, and the bucket is a CASE. Writing the bucket some other way would make it a different query, so the text is left out rather than bent, and the query skips. tamnd/graph-bench#86 has the note in place.
The other four BI shapes do have zu texts and zu is 9x to 34x ahead of ladybug on three of them, so this one skip is the whole of the gap in that family.