(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '('NativeYtTypeFlags '0))
(let $3 '('StrictSchema '1))
(let $4 '('UniqueKeys '0))
(let $5 '@@["StructType";[["s_suppkey";["DataType";"Int32"]];["s_comment";["DataType";"String"]];["s_address";["DataType";"String"]];["s_acctbal";["DataType";"Double"]];["s_nationkey";["DataType";"Int32"]];["s_name";["DataType";"String"]];["s_phone";["DataType";"String"]]]]@@)
(let $6 (Bool 'true))
(let $7 '('SortDirections '($6)))
(let $8 '('"s_suppkey"))
(let $9 (DataType 'Int32))
(let $10 '('SortedByTypes '($9)))
(let $11 (YqlRowSpec $2 $3 $4 '('Type $5) $7 '('SortMembers $8) '('SortedBy $8) $10))
(let $12 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0)))
(let $13 '('RecordsCount '1))
(let $14 '('ChunkCount '1))
(let $15 '('ModifyTime '0))
(let $16 '('Revision '0))
(let $17 (YtStat '('Id '"supplier") $13 '('DataSize '"206") $14 $15 $16))
(let $18 (YtTable '"supplier" $11 $12 $17 '() (Void) (Void) '"/Root/plato"))
(let $19 '('('"unordered")))
(let $20 '('1))
(let $21 (DataType 'String))
(let $22 '($21))
(let $23 (OptionalType $21))
(let $24 '($23))
(let $25 (CallableType $20 $22 $22 $24))
(let $26 (Udf '"Re2.PatternFromLike" (Void) (VoidType) '"" $25 (VoidType) '"" '()))
(let $27 (DataType 'Bool))
(let $28 (DataType 'Uint64))
(let $29 (StructType '('"CaseSensitive" $27) '('"DotNl" $27) '('"Literal" $27) '('"LogErrors" $27) '('"LongestMatch" $27) '('"MaxMem" $28) '('"NeverCapture" $27) '('"NeverNl" $27) '('"OneLine" $27) '('"PerlClasses" $27) '('"PosixSyntax" $27) '('"Utf8" $27) '('"WordBoundary" $27)))
(let $30 (OptionalType $27))
(let $31 (OptionalType $28))
(let $32 (CallableType '('"13") '($29) '($30 '"Utf8") '($30 '"PosixSyntax") '($30 '"LongestMatch") '($30 '"LogErrors") '($31 '"MaxMem") '($30 '"Literal") '($30 '"NeverNl") '($30 '"DotNl") '($30 '"NeverCapture") '($30 '"CaseSensitive") '($30 '"PerlClasses") '($30 '"WordBoundary") '($30 '"OneLine")))
(let $33 (Udf '"Re2.Options" (Void) (VoidType) '"" $32 (VoidType) '"" '('('"strict"))))
(let $34 (CallableType '() '($27) $24))
(let $35 (AssumeStrict (Udf '"Re2.Match" '((Apply $26 (String '"%Customer%Complaints%")) (Just (NamedApply $33 '() (AsStruct '('"CaseSensitive" (Just $6)))))) (VoidType) '"" $34 (TupleType $21 (OptionalType $29)) '"" '())))
(let $36 '('"_wide_channels" (StructType '('"s_suppkey" $9))))
(let $37 '('('"_logical_id" '5125) '('"_id" '"61079eef-4ae870d2-2b2fefb9-8eee647e") $36))
(let $38 (DqPhyStage '() (lambda '() (block '(
  (let $95 (YtReadTable! world $1 '((YtSection '((YtPath $18 '('"s_comment" '"s_suppkey") (Void) (Void))) $19))))
  (return (FromFlow (WideMap (WideFilter (DqReadWideWrap $95 '()) (lambda '($96 $97) (Not (Apply $35 (Just $96))))) (lambda '($98 $99) $99))))
))) $37))
(let $39 (DqCnBroadcast (TDqOutput $38 '0)))
(let $40 (lambda '($102) $102))
(let $41 '('Many 'Hashed 'Compact))
(let $42 '@@["StructType";[["ps_partkey";["DataType";"Int32"]];["ps_suppkey";["DataType";"Int32"]];["ps_comment";["DataType";"String"]];["ps_supplycost";["DataType";"Double"]];["ps_availqty";["DataType";"Int64"]]]]@@)
(let $43 '('"ps_partkey" '"ps_suppkey"))
(let $44 (YqlRowSpec $2 $3 $4 '('Type $42) '('SortDirections '($6 $6)) '('SortMembers $43) '('SortedBy $43) '('SortedByTypes '($9 $9))))
(let $45 (YtStat '('Id '"partsupp") $13 '('DataSize '"284") $14 $15 $16))
(let $46 (YtTable '"partsupp" $44 $12 $45 '() (Void) (Void) '"/Root/plato"))
(let $47 '((YtPath $46 $43 (Void) (Void))))
(let $48 '('0 '0 '1 '1))
(let $49 '('"ps.ps_suppkey"))
(let $50 '('"w.s_suppkey"))
(let $51 '('"_wide_channels" (StructType '('"ps_partkey" $9) '('"ps_suppkey" $9))))
(let $52 '('('"_logical_id" '5483) '('"_id" '"137050b4-f40adadf-2efb579f-3e229d50") $51))
(let $53 (DqPhyStage '($39) (lambda '($100) (block '(
  (let $101 (NarrowSqueezeToDict (ToFlow $100) $40 (lambda '($103) (AsStruct '('"s_suppkey" $103))) $41))
  (return (FromFlow (FlatMap $101 (lambda '($104) (block '(
    (let $105 (YtReadTable! world $1 '((YtSection $47 '()))))
    (return (MapJoinCore (DqReadWideWrap $105 '()) $104 'Inner $20 $8 $48 '() $49 $50))
  ))))))
))) $52))
(let $54 (Not (Apply $35 (Nothing $23))))
(let $55 '('('"_logical_id" '5172) '('"_id" '"bb0eb84c-89a06a48-1af805e2-6412b9e") $36))
(let $56 (DqPhyStage '() (lambda '() (block '(
  (let $106 (YtReadTable! world $1 '((YtSection '((YtPath $18 $8 (Void) (Void))) $19))))
  (return (FromFlow (WideFilter (DqReadWideWrap $106 '()) (lambda '($107) $54))))
))) $55))
(let $57 (DqCnBroadcast (TDqOutput $56 '0)))
(let $58 '('('"_logical_id" '5417) '('"_id" '"fae71261-5754a0f-b46f927e-784dd912") $51))
(let $59 (DqPhyStage '($57) (lambda '($108) (block '(
  (let $109 '('One 'Hashed 'Compact))
  (let $110 (NarrowSqueezeToDict (ToFlow $108) $40 (lambda '($111) (Void)) $109))
  (return (FromFlow (FlatMap $110 (lambda '($112) (block '(
    (let $113 (YtReadTable! world $1 '((YtSection $47 $19))))
    (return (MapJoinCore (WideFilter (DqReadWideWrap $113 '()) (lambda '($114 $115) $54)) $112 '"LeftOnly" $20 $8 $48 '() $49 $50))
  ))))))
))) $58))
(let $60 '('"p_partkey"))
(let $61 '('"p_brand" $21))
(let $62 (DataType 'Int64))
(let $63 '('"p_size" $62))
(let $64 '('"p_type" $21))
(let $65 (StructType $61 '('"p_partkey" $9) $63 $64))
(let $66 '('('"_logical_id" '5213) '('"_id" '"78fe8ec6-5afccc1f-cac01f36-b43585e8") '('"_wide_channels" $65)))
(let $67 (DqPhyStage '() (lambda '() (block '(
  (let $116 '@@["StructType";[["p_partkey";["DataType";"Int32"]];["p_name";["DataType";"String"]];["p_container";["DataType";"String"]];["p_size";["DataType";"Int64"]];["p_type";["DataType";"String"]];["p_comment";["DataType";"String"]];["p_retailprice";["DataType";"Double"]];["p_mfgr";["DataType";"String"]];["p_brand";["DataType";"String"]]]]@@)
  (let $117 (YqlRowSpec $2 $3 $4 '('Type $116) $7 '('SortMembers $60) '('SortedBy $60) $10))
  (let $118 (YtStat '('Id '"part") $13 '('DataSize '"239") $14 $15 $16))
  (let $119 (YtTable '"part" $117 $12 $118 '() (Void) (Void) '"/Root/plato"))
  (let $120 '('"p_brand" '"p_partkey" '"p_size" '"p_type"))
  (let $121 (YtReadTable! world $1 '((YtSection '((YtPath $119 $120 (Void) (Void))) $19))))
  (return (FromFlow (WideFilter (DqReadWideWrap $121 '()) (lambda '($122 $123 $124 $125) (block '(
    (let $126 (Or (== $124 (Int32 '"20")) (== $124 (Int32 '"27")) (== $124 (Int32 '"11")) (== $124 (Int32 '"45")) (== $124 (Int32 '"40")) (== $124 (Int32 '"41")) (== $124 (Int32 '"34")) (== $124 (Int32 '"36"))))
    (return (And (!= $122 (String '"Brand#33")) (Not (StartsWith $125 (String '"PROMO POLISHED"))) $126))
  ))))))
))) $66))
(let $68 (DqCnParallelUnionAll (TDqOutput $53 '0)))
(let $69 (DqCnParallelUnionAll (TDqOutput $59 '0)))
(let $70 (DqCnBroadcast (TDqOutput $67 '0)))
(let $71 '($68 $69 $70))
(let $72 (lambda '($149 $150 $151 $152) $149 $150 $151 $152))
(let $73 '('"p.p_brand" $21))
(let $74 '('"p.p_size" $62))
(let $75 '('"p.p_type" $21))
(let $76 (StructType '('"j.ps_suppkey" $9) $73 $74 $75))
(let $77 '('('"_logical_id" '5682) '('"_id" '"d8d4a426-a829bd3c-afa3031b-a8563b53") '('"_wide_channels" $76)))
(let $78 (DqPhyStage $71 (lambda '($127 $128 $129) (block '(
  (let $130 (NarrowSqueezeToDict (ToFlow $129) (lambda '($135 $136 $137 $138) $136) (lambda '($139 $140 $141 $142) (AsStruct '('"p_brand" $139) '('"p_partkey" $140) '('"p_size" $141) '('"p_type" $142))) $41))
  (let $131 (lambda '($148) (Member $148 '"j.ps_suppkey") (Member $148 '"p.p_brand") (Member $148 '"p.p_size") (Member $148 '"p.p_type")))
  (let $132 (lambda '($153 $154 $155 $156 $157 $158 $159 $160) $153 $154 $155 $156))
  (let $133 (lambda '($161 $162 $163 $164 $165 $166 $167 $168 $169 $170 $171 $172) $169 $170 $171 $172))
  (let $134 (lambda '($173 $174 $175 $176 $177 $178 $179 $180) $177 $178 $179 $180))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (ExpandMap (FlatMap $130 (lambda '($143) (block '(
    (let $144 (lambda '($146 $147) (AsStruct '('"ps_partkey" $146) '('"ps_suppkey" $147))))
    (let $145 '('"p_brand" '"p.p_brand" '"p_size" '"p.p_size" '"p_type" '"p.p_type"))
    (return (MapJoinCore (Extend (NarrowMap (ToFlow $127) $144) (NarrowMap (ToFlow $128) $144)) $143 'Inner '('"ps_partkey") $60 '('"ps_suppkey" '"j.ps_suppkey") $145 '('"j.ps_partkey") '('"p.p_partkey")))
  )))) $131))) '-1073741824 $72 $132 $133 $134))
))) $77))
(let $79 '('0 '1 '2 '3))
(let $80 (DqCnHashShuffle (TDqOutput $78 '0) $79 '0 '"HashV2"))
(let $81 (StructType '('_yql_agg_0 $31) $73 $74 $75))
(let $82 '('('"_logical_id" '6509) '('"_id" '"cb576462-6d99c9ff-af013947-93ea588a") '('"_wide_channels" $81)))
(let $83 (DqPhyStage '($80) (lambda '($181) (block '(
  (let $182 (lambda '($186 $187 $188 $189 $190 $191 $192 $193)))
  (let $183 (lambda '($194 $195 $196 $197) $195 $196 $197))
  (let $184 (lambda '($198 $199 $200) $198 $199 $200))
  (let $185 (lambda '($214 $215 $216 $217) (Just $217) $214 $215 $216))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (WideCombiner (ToFlow (WideFromBlocks $181)) '"" $72 $182 $182 $183))) '-1073741824 $184 (lambda '($201 $202 $203 $204 $205 $206) (Uint64 '1)) (lambda '($207 $208 $209 $210 $211 $212 $213) (Inc $213)) $185))
))) $82))
(let $84 '('1 '2 '3))
(let $85 (DqCnHashShuffle (TDqOutput $83 '0) $84 '0 '"HashV2"))
(let $86 (StructType $61 $63 $64 '('"supplier_cnt" $28)))
(let $87 '('('"_logical_id" '7167) '('"_id" '"c03afd52-ac57d3e9-9f2452ac-5010d8bc") '('"_wide_channels" $86)))
(let $88 (DqPhyStage '($85) (lambda '($218) (block '(
  (let $219 (lambda '($224 $225 $226 $227) $225 $226 $227))
  (let $220 (lambda '($245 $246 $247 $248) (Unwrap $248) $245 $246 $247))
  (let $221 (WideCombiner (ToFlow (WideFromBlocks $218)) '"" $219 (lambda '($228 $229 $230 $231 $232 $233 $234) $231) (lambda '($235 $236 $237 $238 $239 $240 $241 $242) (IfPresent $238 (lambda '($243) (IfPresent $242 (lambda '($244) (Just (AggrAdd $243 $244))) $238)) $242)) $220))
  (let $222 '('('0 (Bool 'false)) '('1 $6) '('3 $6) '('2 $6)))
  (let $223 (lambda '($249 $250 $251 $252) $250 $251 $252 $249))
  (return (FromFlow (WideMap (WideSort $221 $222) $223)))
))) $87))
(let $89 '('('3 '"Desc") '('0 '"Asc") '('2 '"Asc") '('1 '"Asc")))
(let $90 (DqCnMerge (TDqOutput $88 '0) $89))
(let $91 (DqPhyStage '($90) (lambda '($253) (FromFlow (NarrowMap (ToFlow $253) (lambda '($254 $255 $256 $257) (AsStruct '('"p_brand" $254) '('"p_size" $255) '('"p_type" $256) '('"supplier_cnt" $257)))))) '('('"_logical_id" '7179) '('"_id" '"9ce60162-1fa5b107-4157450f-707b48a0"))))
(let $92 '($38 $53 $56 $59 $67 $78 $83 $88 $91))
(let $93 '('"p_brand" '"p_type" '"p_size" '"supplier_cnt"))
(let $94 (DqCnResult (TDqOutput $91 '0) $93))
(return (KqpPhysicalQuery '((KqpPhysicalTx $92 '($94) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $86) '0 '0)) '('('"type" '"query"))))
)
