|
609 | 609 | },
|
610 | 610 | "cases": [
|
611 | 611 | {
|
612 |
| - "description": "function projection on variadic function", |
| 612 | + "description": "sort by field expression", |
613 | 613 | "expression": "sort_by(people, &age)",
|
614 | 614 | "result": [
|
615 | 615 | {"age": 10, "age_str": "10", "bool": true, "name": 3},
|
|
620 | 620 | ]
|
621 | 621 | },
|
622 | 622 | {
|
623 |
| - "description": "function projection on variadic function", |
| 623 | + "description": "sort by function expression", |
624 | 624 | "expression": "sort_by(people, &to_number(age_str))",
|
625 | 625 | "result": [
|
626 | 626 | {"age": 10, "age_str": "10", "bool": true, "name": 3},
|
|
631 | 631 | ]
|
632 | 632 | },
|
633 | 633 | {
|
634 |
| - "description": "function projection on variadic function", |
| 634 | + "description": "function projection on sort_by function", |
635 | 635 | "expression": "sort_by(people, &age)[].name",
|
636 | 636 | "result": [3, "a", "c", "b", "d"]
|
637 | 637 | },
|
|
655 | 655 | "expression": "sort_by(people, &age)[].extra",
|
656 | 656 | "result": ["foo", "bar"]
|
657 | 657 | },
|
| 658 | + { |
| 659 | + "expression": "sort_by(`[]`, &age)", |
| 660 | + "result": [] |
| 661 | + }, |
658 | 662 | {
|
659 | 663 | "expression": "max_by(people, &age)",
|
660 | 664 | "result": {"age": 50, "age_str": "50", "bool": false, "name": "d"}
|
|
0 commit comments