Martin Vogel
0a0ef516d6
fix(cypher): parse and apply the full multi-key ORDER BY list, keeping LIMIT ( #1334 )
...
The Cypher request model stored a single order_by expression; on
ORDER BY key1 DESC, key2 ASC LIMIT n the parser consumed only key1,
left ', key2 ... LIMIT n' unparsed, and the query silently returned the
entire result set (6326 rows / 117 KB instead of 5 on the reporter's
graph - a token flood straight into agent context).
The return clause now models up to CBM_CYPHER_ORDER_KEYS_MAX (8) sort
keys with per-key direction (Cypher semantics). Both sort sites -
rb_apply_order_by for RETURN and sort_bindings for the WITH pipeline -
compare key-by-key with later keys breaking ties. More keys than the
modeled maximum is a loud parse error, never a silently dropped
remainder. The no-ORDER-BY projection fast path is preserved via
order_key_count == 0.
Tests: parse-level (2 keys, per-key direction, LIMIT consumed;
9-key over-cap rejected), exec-level RETURN (limit kept, tiebreak
ordering, per-key direction), and exec-level WITH pipeline (limit kept).
All RED before the fix (row_count 4 instead of 2), GREEN after.
Recorded, pre-existing and unchanged: an ORDER BY key that is not part
of the projection is silently skipped (single-key main behaves the
same); sorting by unprojected properties needs hidden-column projection
and is a separate issue.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com >
2026-08-04 18:09:33 +02:00
..
2026-07-10 09:12:40 +00:00
2026-08-03 01:51:30 +02:00
2026-07-28 17:03:01 +02:00
2026-06-05 21:53:25 +02:00
2026-06-05 21:53:25 +02:00
2026-07-13 01:50:03 +02:00
2026-03-15 22:37:34 +01:00
2026-07-28 22:49:22 +02:00
2026-07-31 22:02:19 +02:00
2026-08-01 17:36:21 +04:00
2026-05-30 18:26:44 +02:00
2026-07-11 03:28:32 +02:00
2026-06-29 09:45:28 -06:00
2026-07-22 17:48:20 +02:00
2026-08-03 01:47:35 +02:00
2026-07-18 15:52:50 +02:00
2026-08-02 11:41:03 +04:00
2026-07-13 01:50:02 +02:00
2026-07-14 21:13:52 +02:00
2026-07-13 02:00:32 +02:00
2026-07-14 21:13:52 +02:00
2026-04-01 23:22:44 +02:00
2026-07-18 15:52:50 +02:00
2026-06-06 22:16:04 +02:00
2026-07-18 15:26:38 +02:00
2026-07-23 17:36:00 +02:00
2026-07-18 15:52:50 +02:00
2026-08-04 18:09:33 +02:00
2026-07-29 17:05:10 +02:00
2026-07-21 15:32:15 +02:00
2026-07-21 15:32:15 +02:00
2026-07-31 01:53:49 +02:00
2026-07-18 11:48:59 +02:00
2026-08-04 04:56:32 +02:00
2026-07-18 01:26:08 +02:00
2026-07-18 01:26:08 +02:00
2026-07-18 01:26:08 +02:00
2026-07-21 15:32:15 +02:00
2026-07-23 17:36:00 +02:00
2026-06-23 06:38:45 +09:00
2026-06-23 06:38:45 +09:00
2026-03-25 09:28:11 +01:00
2026-07-10 09:12:40 +00:00
2026-07-18 15:52:50 +02:00
2026-07-18 15:52:50 +02:00
2026-06-07 12:35:53 +02:00
2026-06-08 22:55:23 +02:00
2026-08-01 01:29:20 +02:00
2026-07-16 01:21:45 +02:00
2026-06-05 21:53:25 +02:00
2026-07-02 00:37:52 +02:00
2026-06-22 23:51:49 +02:00
2026-07-18 15:52:50 +02:00
2026-06-05 21:53:25 +02:00
2026-08-01 01:29:20 +02:00
2026-06-07 19:13:01 +02:00
2026-06-07 19:13:01 +02:00
2026-06-07 19:13:01 +02:00
2026-06-27 16:23:26 +02:00
2026-06-07 20:05:24 +02:00
2026-06-07 20:05:24 +02:00
2026-06-27 16:23:26 +02:00
2026-07-08 00:05:19 +05:30
2026-07-03 20:16:39 +02:00
2026-05-21 22:52:16 +02:00
2026-07-24 16:08:42 +02:00
2026-07-23 17:36:00 +02:00
2026-08-04 04:58:44 +02:00
2026-07-17 22:32:53 +02:00
2026-07-19 00:42:19 +02:00
2026-06-22 22:04:31 +02:00
2026-07-18 13:48:06 +02:00
2026-06-02 18:52:37 +02:00
2026-07-18 15:52:50 +02:00
2026-07-18 15:52:50 +02:00
2026-07-18 15:52:50 +02:00
2026-07-31 03:42:43 +02:00
2026-07-18 14:38:07 +02:00
2026-06-28 13:05:05 +02:00
2026-07-18 15:52:50 +02:00
2026-03-15 22:37:34 +01:00
2026-08-01 01:29:20 +02:00
2026-07-18 01:26:08 +02:00
2026-06-08 22:55:23 +02:00
2026-07-18 15:52:50 +02:00
2026-08-01 01:29:20 +02:00
2026-07-26 00:55:24 +02:00
2026-06-12 02:17:39 +02:00
2026-07-29 17:05:10 +02:00
2026-08-03 17:44:52 +02:00
2026-07-24 16:08:42 +02:00
2026-07-08 19:13:25 +02:00
2026-07-03 19:57:01 +02:00
2026-07-18 15:52:50 +02:00
2026-07-18 15:52:50 +02:00
2026-08-03 20:26:03 +02:00
2026-07-21 15:32:15 +02:00
2026-07-18 01:26:08 +02:00
2026-07-18 01:26:08 +02:00
2026-07-23 17:36:00 +02:00
2026-05-09 15:44:09 +02:00
2026-05-09 14:16:15 +02:00
2026-07-18 15:52:50 +02:00
2026-07-10 21:07:11 +02:00
2026-07-30 03:45:33 +02:00
2026-06-23 13:52:08 -03:00
2026-07-18 15:52:50 +02:00
2026-07-18 15:52:50 +02:00
2026-08-03 15:42:32 +02:00
2026-07-18 11:48:59 +02:00
2026-06-24 03:15:36 +02:00
2026-07-13 04:17:58 +02:00
2026-07-18 01:26:08 +02:00
2026-07-06 19:32:03 +02:00
2026-06-28 21:57:35 -06:00
2026-07-29 10:22:19 +02:00
2026-07-25 00:37:05 +02:00
2026-07-13 11:43:00 +03:00
2026-07-18 13:31:18 +02:00
2026-07-19 12:35:58 +05:30
2026-03-20 20:32:38 +01:00
2026-08-01 01:29:20 +02:00
2026-07-03 20:16:39 +02:00
2026-08-03 18:41:49 +02:00
2026-07-17 22:32:53 +02:00
2026-07-13 01:48:29 +02:00
2026-03-24 23:48:23 +01:00
2026-06-24 20:33:52 +05:30
2026-07-21 15:32:15 +02:00
2026-03-24 23:48:23 +01:00
2026-07-18 15:52:50 +02:00
2026-06-10 12:11:02 +02:00
2026-07-21 15:32:15 +02:00
2026-07-23 00:53:41 +02:00
2026-04-06 14:34:07 +02:00
2026-07-28 17:03:01 +02:00
2026-07-23 00:53:41 +02:00
2026-07-28 17:03:01 +02:00
2026-06-05 21:53:25 +02:00
2026-07-29 21:18:58 +02:00
2026-07-27 23:05:16 +02:00
2026-07-29 10:22:19 +02:00
2026-07-30 20:35:04 +03:00
2026-06-06 19:48:48 +02:00
2026-07-29 23:50:53 +02:00
2026-03-24 23:48:23 +01:00
2026-04-15 23:56:03 +02:00