File tree Expand file tree Collapse file tree 9 files changed +115
-14
lines changed
hybrid_file/part0/canondata
yt_native_file/part15/canondata Expand file tree Collapse file tree 9 files changed +115
-14
lines changed Original file line number Diff line number Diff line change @@ -651,28 +651,30 @@ class TLineageScanner {
651
651
auto & res = (*lineage.Fields )[x.first ];
652
652
TMaybe<bool > hasStructItems;
653
653
for (const auto & i : inners) {
654
- auto f = (*i.Fields ).FindPtr (x.first );
655
- for (const auto & x : f->Items ) {
656
- res.Items .insert (x);
657
- }
654
+ if ( auto f = (*i.Fields ).FindPtr (x.first )) {
655
+ for (const auto & x : f->Items ) {
656
+ res.Items .insert (x);
657
+ }
658
658
659
- if (f->StructItems || f->Items .empty ()) {
660
- if (!hasStructItems) {
661
- hasStructItems = true ;
659
+ if (f->StructItems || f->Items .empty ()) {
660
+ if (!hasStructItems) {
661
+ hasStructItems = true ;
662
+ }
663
+ } else {
664
+ hasStructItems = false ;
662
665
}
663
- } else {
664
- hasStructItems = false ;
665
666
}
666
667
}
667
668
668
669
if (hasStructItems && *hasStructItems) {
669
670
res.StructItems .ConstructInPlace ();
670
671
for (const auto & i : inners) {
671
- auto f = (*i.Fields ).FindPtr (x.first );
672
- if (f->StructItems ) {
673
- for (const auto & si : *f->StructItems ) {
674
- for (const auto & x : si.second ) {
675
- (*res.StructItems )[si.first ].insert (x);
672
+ if (auto f = (*i.Fields ).FindPtr (x.first )) {
673
+ if (f->StructItems ) {
674
+ for (const auto & si : *f->StructItems ) {
675
+ for (const auto & x : si.second ) {
676
+ (*res.StructItems )[si.first ].insert (x);
677
+ }
676
678
}
677
679
}
678
680
}
Original file line number Diff line number Diff line change 1564
1564
}
1565
1565
],
1566
1566
"test.test[limit-limit_over_sort_desc_in_subquery--Results]" : [],
1567
+ "test.test[lineage-grouping_sets--Analyze]" : [
1568
+ {
1569
+ "checksum" : " ee99aa53db458c422309608d038b21b2" ,
1570
+ "size" : 8305 ,
1571
+ "uri" : " https://{canondata_backend}/1130705/0ef38e114204c1ac6d0d5ad14792a285fb1413c8/resource.tar.gz#test.test_lineage-grouping_sets--Analyze_/plan.txt"
1572
+ }
1573
+ ],
1574
+ "test.test[lineage-grouping_sets--Debug]" : [
1575
+ {
1576
+ "checksum" : " e8e65c2d3c076aec649b104e3ecfe944" ,
1577
+ "size" : 4039 ,
1578
+ "uri" : " https://{canondata_backend}/1130705/0ef38e114204c1ac6d0d5ad14792a285fb1413c8/resource.tar.gz#test.test_lineage-grouping_sets--Debug_/opt.yql_patched"
1579
+ }
1580
+ ],
1581
+ "test.test[lineage-grouping_sets--Plan]" : [
1582
+ {
1583
+ "checksum" : " ee99aa53db458c422309608d038b21b2" ,
1584
+ "size" : 8305 ,
1585
+ "uri" : " https://{canondata_backend}/1130705/0ef38e114204c1ac6d0d5ad14792a285fb1413c8/resource.tar.gz#test.test_lineage-grouping_sets--Plan_/plan.txt"
1586
+ }
1587
+ ],
1588
+ "test.test[lineage-grouping_sets--Results]" : [],
1567
1589
"test.test[optimizers-aggregate_over_aggregate--Analyze]" : [
1568
1590
{
1569
1591
"checksum" : " 3446b4cc5f51a2503e749ebbd8230bfd" ,
Original file line number Diff line number Diff line change 1651
1651
"uri" : " https://{canondata_backend}/1924537/7199a3a7eba1a101a7ecd6552b3df25cb9a6ef2b/resource.tar.gz#test.test_limit-empty_read_after_limit-default.txt-Plan_/plan.txt"
1652
1652
}
1653
1653
],
1654
+ "test.test[lineage-grouping_sets--Debug]" : [
1655
+ {
1656
+ "checksum" : " fa1003bed584f483404d70a523c1f9b9" ,
1657
+ "size" : 8168 ,
1658
+ "uri" : " https://{canondata_backend}/1942671/a089042abddfd51839b75278c8f86236a82e2fbd/resource.tar.gz#test.test_lineage-grouping_sets--Debug_/opt.yql_patched"
1659
+ }
1660
+ ],
1661
+ "test.test[lineage-grouping_sets--Plan]" : [
1662
+ {
1663
+ "checksum" : " 0af9a91ec025f87c1ec526f00c82a8ce" ,
1664
+ "size" : 14693 ,
1665
+ "uri" : " https://{canondata_backend}/1942671/a089042abddfd51839b75278c8f86236a82e2fbd/resource.tar.gz#test.test_lineage-grouping_sets--Plan_/plan.txt"
1666
+ }
1667
+ ],
1654
1668
"test.test[match_recognize-alerts-default.txt-Debug]" : [
1655
1669
{
1656
1670
"checksum" : " 902f8b167c5875200480d237a6493bb7" ,
Original file line number Diff line number Diff line change 10590
10590
"uri": "https://{canondata_backend}/1871002/ba7501739621731b8f5b85f57d8e4868dadf87e3/resource.tar.gz#test_sql2yql.test_lineage-group_by_asstruct_key_/sql.yql"
10591
10591
}
10592
10592
],
10593
+ "test_sql2yql.test[lineage-grouping_sets]": [
10594
+ {
10595
+ "checksum": "bc9f636e423a6c856a4ff05a6b5c3a82",
10596
+ "size": 3196,
10597
+ "uri": "https://{canondata_backend}/1781765/5483cde59b65341125b67709093030a3d2bd1b0e/resource.tar.gz#test_sql2yql.test_lineage-grouping_sets_/sql.yql"
10598
+ }
10599
+ ],
10593
10600
"test_sql2yql.test[lineage-if_struct]": [
10594
10601
{
10595
10602
"checksum": "aafa05e38853f6b86488a387b26f7ec0",
30148
30155
"uri": "https://{canondata_backend}/1880306/64654158d6bfb1289c66c626a8162239289559d0/resource.tar.gz#test_sql_format.test_lineage-group_by_asstruct_key_/formatted.sql"
30149
30156
}
30150
30157
],
30158
+ "test_sql_format.test[lineage-grouping_sets]": [
30159
+ {
30160
+ "checksum": "7e57dcc9ca531cfa66e69bd7f1460ad2",
30161
+ "size": 296,
30162
+ "uri": "https://{canondata_backend}/1781765/5483cde59b65341125b67709093030a3d2bd1b0e/resource.tar.gz#test_sql_format.test_lineage-grouping_sets_/formatted.sql"
30163
+ }
30164
+ ],
30151
30165
"test_sql_format.test[lineage-if_struct]": [
30152
30166
{
30153
30167
"checksum": "36232c04d90172af80321e69783af38f",
Original file line number Diff line number Diff line change
1
+ in Input input_optional.txt
Original file line number Diff line number Diff line change
1
+ USE plato;
2
+
3
+ $data = select
4
+ key, subkey, value
5
+ from Input
6
+ group by GROUPING SETS (
7
+ (key, subkey),
8
+ (subkey, value)
9
+ );
10
+
11
+ INSERT INTO @tmp WITH TRUNCATE
12
+ SELECT
13
+ b .value
14
+ FROM $data AS a
15
+ LEFT JOIN Input AS b
16
+ USING (key)
17
+
Original file line number Diff line number Diff line change
1
+ {"key"="075";"subkey"="1";"value"=1};
2
+ {"key"="800";"subkey"="2";"value"=2};
3
+ {"key"="020";"subkey"="3";"value"=3};
4
+ {"key"="150";"subkey"="4";"value"=4};
Original file line number Diff line number Diff line change
1
+ {
2
+ "_yql_row_spec"={
3
+ "Type"=["StructType";[["key";["OptionalType";["DataType";"String"]]];["subkey";["OptionalType";["DataType";"String"]]];["value";["OptionalType";["DataType";"Int64"];];];];];
4
+ }
5
+ }
Original file line number Diff line number Diff line change 1432
1432
"uri" : " https://{canondata_backend}/1903280/4c77300cd3fef018d27d7f75b6ff956e63258b21/resource.tar.gz#test.test_limit-limit_over_sort_desc_in_subquery--Results_/results.txt"
1433
1433
}
1434
1434
],
1435
+ "test.test[lineage-grouping_sets--Debug]" : [
1436
+ {
1437
+ "checksum" : " 9d2798e2536159bea2cb8dc1a8089078" ,
1438
+ "size" : 7296 ,
1439
+ "uri" : " https://{canondata_backend}/1775319/aecc6e3ae91d93c26e7063f6d946a08835835da0/resource.tar.gz#test.test_lineage-grouping_sets--Debug_/opt.yql"
1440
+ }
1441
+ ],
1442
+ "test.test[lineage-grouping_sets--Lineage]" : [
1443
+ {
1444
+ "checksum" : " 4e5a26084952308cda7be7008d40b234" ,
1445
+ "size" : 1120 ,
1446
+ "uri" : " https://{canondata_backend}/1775319/aecc6e3ae91d93c26e7063f6d946a08835835da0/resource.tar.gz#test.test_lineage-grouping_sets--Lineage_/results.txt"
1447
+ }
1448
+ ],
1449
+ "test.test[lineage-grouping_sets--Plan]" : [
1450
+ {
1451
+ "checksum" : " 9027e176da83bb029fbe250f66b43333" ,
1452
+ "size" : 13407 ,
1453
+ "uri" : " https://{canondata_backend}/1775319/aecc6e3ae91d93c26e7063f6d946a08835835da0/resource.tar.gz#test.test_lineage-grouping_sets--Plan_/plan.txt"
1454
+ }
1455
+ ],
1456
+ "test.test[lineage-grouping_sets--Results]" : [],
1435
1457
"test.test[lineage-union_all_tablerow-default.txt-Debug]" : [
1436
1458
{
1437
1459
"checksum" : " 2714ab7621308c8eb706e51f237548dd" ,
You can’t perform that action at this time.
0 commit comments