File tree Expand file tree Collapse file tree 5 files changed +71
-1
lines changed
yt_native_file/part4/canondata Expand file tree Collapse file tree 5 files changed +71
-1
lines changed Original file line number Diff line number Diff line change 3
3
(let Unequals (lambda '(value) (lambda '(x) (!= x value))))
4
4
5
5
(let FindIndex (lambda '(list predicate) (block '(
6
- (let enumerated (Enumerate list))
6
+ (let enumerated (Enumerate (Coalesce list (EmptyList)) ))
7
7
(let filtered (Filter enumerated (lambda '(x) (Coalesce (Apply predicate (Nth x '1)) (Bool '0)))))
8
8
(return (Nth (ToOptional filtered) '0))
9
9
))))
Original file line number Diff line number Diff line change 671
671
}
672
672
],
673
673
"test.test[expr-int_literals_negative_typed-default.txt-Results]" : [],
674
+ "test.test[expr-list_indexof-default.txt-Analyze]" : [
675
+ {
676
+ "checksum" : " b4dd508a329723c74293d80f0278c705" ,
677
+ "size" : 505 ,
678
+ "uri" : " https://{canondata_backend}/995452/b1f2dabe2f59f069a24ebbb0bcf5d5b69f26631e/resource.tar.gz#test.test_expr-list_indexof-default.txt-Analyze_/plan.txt"
679
+ }
680
+ ],
681
+ "test.test[expr-list_indexof-default.txt-Debug]" : [
682
+ {
683
+ "checksum" : " 9968f0a681b374cf69e8272c94c136ad" ,
684
+ "size" : 1178 ,
685
+ "uri" : " https://{canondata_backend}/995452/b1f2dabe2f59f069a24ebbb0bcf5d5b69f26631e/resource.tar.gz#test.test_expr-list_indexof-default.txt-Debug_/opt.yql_patched"
686
+ }
687
+ ],
688
+ "test.test[expr-list_indexof-default.txt-Plan]" : [
689
+ {
690
+ "checksum" : " b4dd508a329723c74293d80f0278c705" ,
691
+ "size" : 505 ,
692
+ "uri" : " https://{canondata_backend}/995452/b1f2dabe2f59f069a24ebbb0bcf5d5b69f26631e/resource.tar.gz#test.test_expr-list_indexof-default.txt-Plan_/plan.txt"
693
+ }
694
+ ],
695
+ "test.test[expr-list_indexof-default.txt-Results]" : [],
674
696
"test.test[expr-list_to_from_tuple-default.txt-Analyze]" : [
675
697
{
676
698
"checksum" : " b4dd508a329723c74293d80f0278c705" ,
Original file line number Diff line number Diff line change 5368
5368
"uri": "https://{canondata_backend}/1936997/00f46808be87e2ae2d4ac3ac45675b659c5ace45/resource.tar.gz#test_sql2yql.test_expr-list_from_range_overflow_/sql.yql"
5369
5369
}
5370
5370
],
5371
+ "test_sql2yql.test[expr-list_indexof]": [
5372
+ {
5373
+ "checksum": "144ab782fb52c5d69f1520151a052067",
5374
+ "size": 2475,
5375
+ "uri": "https://{canondata_backend}/995452/d567f0e593fff30f6415ec4b4d2488a3e4c452ab/resource.tar.gz#test_sql2yql.test_expr-list_indexof_/sql.yql"
5376
+ }
5377
+ ],
5371
5378
"test_sql2yql.test[expr-list_not_null]": [
5372
5379
{
5373
5380
"checksum": "cfeb0d35501073250e10cfbc3eec4629",
22686
22693
"uri": "https://{canondata_backend}/1880306/64654158d6bfb1289c66c626a8162239289559d0/resource.tar.gz#test_sql_format.test_expr-list_from_range_overflow_/formatted.sql"
22687
22694
}
22688
22695
],
22696
+ "test_sql_format.test[expr-list_indexof]": [
22697
+ {
22698
+ "checksum": "a57adb914ca0edb11239bfd6bb2abd5f",
22699
+ "size": 288,
22700
+ "uri": "https://{canondata_backend}/995452/d567f0e593fff30f6415ec4b4d2488a3e4c452ab/resource.tar.gz#test_sql_format.test_expr-list_indexof_/formatted.sql"
22701
+ }
22702
+ ],
22689
22703
"test_sql_format.test[expr-list_not_null]": [
22690
22704
{
22691
22705
"checksum": "93d47a5831fee1d864931d381a395bf2",
Original file line number Diff line number Diff line change
1
+ $list = [1 , 2 , 3 ];
2
+
3
+ $opt_list = [1 , null , 2 , 3 ];
4
+
5
+ select
6
+ ListIndexOf($list, 2 ),
7
+ ListIndexOf($list, 100 ),
8
+ ListIndexOf(Just($opt_list), 2 ),
9
+ ListIndexOf(Just($opt_list), 200 ),
10
+ ListIndexOf(Nothing(List< Int32> ?), 2 ),
11
+ ListIndexOf([], ' foo' ),
12
+ ListIndexOf(null , 1 .0 ),
13
+ ;
Original file line number Diff line number Diff line change 612
612
"uri" : " https://{canondata_backend}/1871002/6806fa776e6f886570695001139706dd4c62370f/resource.tar.gz#test.test_expr-int_literals_negative_typed-default.txt-Results_/results.txt"
613
613
}
614
614
],
615
+ "test.test[expr-list_indexof-default.txt-Debug]" : [
616
+ {
617
+ "checksum" : " 4046f783e3f0508a111f95094d4837ae" ,
618
+ "size" : 1107 ,
619
+ "uri" : " https://{canondata_backend}/1597364/7296385ae1f5dffe737a1cf8ab2f30e3d3465147/resource.tar.gz#test.test_expr-list_indexof-default.txt-Debug_/opt.yql"
620
+ }
621
+ ],
622
+ "test.test[expr-list_indexof-default.txt-Plan]" : [
623
+ {
624
+ "checksum" : " b4dd508a329723c74293d80f0278c705" ,
625
+ "size" : 505 ,
626
+ "uri" : " https://{canondata_backend}/1597364/7296385ae1f5dffe737a1cf8ab2f30e3d3465147/resource.tar.gz#test.test_expr-list_indexof-default.txt-Plan_/plan.txt"
627
+ }
628
+ ],
629
+ "test.test[expr-list_indexof-default.txt-Results]" : [
630
+ {
631
+ "checksum" : " 66c769d2bfe8215e35f4d5065c8b0f3d" ,
632
+ "size" : 3120 ,
633
+ "uri" : " https://{canondata_backend}/1597364/7296385ae1f5dffe737a1cf8ab2f30e3d3465147/resource.tar.gz#test.test_expr-list_indexof-default.txt-Results_/results.txt"
634
+ }
635
+ ],
615
636
"test.test[expr-list_to_from_tuple-default.txt-Debug]" : [
616
637
{
617
638
"checksum" : " 6d90d912c1af13e53aec4013f17cc329" ,
You can’t perform that action at this time.
0 commit comments