|
580 | 580 | "error": "invalid-arity" |
581 | 581 | }, |
582 | 582 | { |
583 | | - "description": "function projection on single arg function", |
| 583 | + "comment": "function projection on single arg function", |
584 | 584 | "expression": "numbers[].to_string(@)", |
585 | 585 | "result": ["-1", "3", "4", "5"] |
586 | 586 | }, |
587 | 587 | { |
588 | | - "description": "function projection on single arg function", |
| 588 | + "comment": "function projection on single arg function", |
589 | 589 | "expression": "array[].to_number(@)", |
590 | 590 | "result": [-1, 3, 4, 5, 100] |
591 | 591 | } |
|
603 | 603 | }, |
604 | 604 | "cases": [ |
605 | 605 | { |
606 | | - "description": "function projection on variadic function", |
| 606 | + "comment": "function projection on variadic function", |
607 | 607 | "expression": "foo[].not_null(f, e, d, c, b, a)", |
608 | 608 | "result": ["b", "c", "d", "e", "f"] |
609 | 609 | } |
|
621 | 621 | }, |
622 | 622 | "cases": [ |
623 | 623 | { |
624 | | - "description": "sort by field expression", |
| 624 | + "comment": "sort by field expression", |
625 | 625 | "expression": "sort_by(people, &age)", |
626 | 626 | "result": [ |
627 | 627 | {"age": 10, "age_str": "10", "bool": true, "name": 3}, |
|
642 | 642 | ] |
643 | 643 | }, |
644 | 644 | { |
645 | | - "description": "sort by function expression", |
| 645 | + "comment": "sort by function expression", |
646 | 646 | "expression": "sort_by(people, &to_number(age_str))", |
647 | 647 | "result": [ |
648 | 648 | {"age": 10, "age_str": "10", "bool": true, "name": 3}, |
|
653 | 653 | ] |
654 | 654 | }, |
655 | 655 | { |
656 | | - "description": "function projection on sort_by function", |
| 656 | + "comment": "function projection on sort_by function", |
657 | 657 | "expression": "sort_by(people, &age)[].name", |
658 | 658 | "result": [3, "a", "c", "b", "d"] |
659 | 659 | }, |
|
749 | 749 | }, |
750 | 750 | "cases": [ |
751 | 751 | { |
752 | | - "description": "stable sort order", |
| 752 | + "comment": "stable sort order", |
753 | 753 | "expression": "sort_by(people, &age)", |
754 | 754 | "result": [ |
755 | 755 | {"age": 10, "order": "1"}, |
|
0 commit comments