(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '('StrictSchema '1))
(let $3 '('UniqueKeys '0))
(let $4 (Bool 'true))
(let $5 '('SortDirections '($4)))
(let $6 (DataType 'Int32))
(let $7 '('SortedByTypes '($6)))
(let $8 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0)))
(let $9 '('RecordsCount '1))
(let $10 '('ChunkCount '1))
(let $11 '('ModifyTime '0))
(let $12 '('Revision '0))
(let $13 '('1))
(let $14 (DataType 'Uint64))
(let $15 '('('"_logical_id" '2312) '('"_id" '"f22feed9-feda5ac1-b7a2eb5-f7657985") '('"_wide_channels" (StructType '('"o_custkey" $6) '('"o_orderkey" $6)))))
(let $16 (DqPhyStage '() (lambda '() (block '(
  (let $34 '@@["StructType";[["o_orderkey";["DataType";"Int32"]];["o_orderstatus";["DataType";"String"]];["o_comment";["DataType";"String"]];["o_totalprice";["DataType";"Double"]];["o_clerk";["DataType";"String"]];["o_custkey";["DataType";"Int32"]];["o_orderpriority";["DataType";"String"]];["o_orderdate";["OptionalType";["DataType";"Date"]]];["o_shippriority";["DataType";"Int64"]]]]@@)
  (let $35 '('"o_orderkey"))
  (let $36 (YqlRowSpec '('NativeYtTypeFlags '2) $2 $3 '('Type $34) $5 '('SortMembers $35) '('SortedBy $35) $7))
  (let $37 (YtStat '('Id '"orders") $9 '('DataSize '"224") $10 $11 $12))
  (let $38 (YtTable '"orders" $36 $8 $37 '() (Void) (Void) '"/Root/plato"))
  (let $39 '('"o_comment" '"o_custkey" '"o_orderkey"))
  (let $40 (YtReadTable! world $1 '((YtSection '((YtPath $38 $39 (Void) (Void))) '('('"unordered"))))))
  (let $41 (lambda '($56 $57 $58) $57 $58))
  (return (FromFlow (WideMap (WideFilter (DqReadWideWrap $40 '()) (lambda '($42 $43 $44) (block '(
    (let $45 (DataType 'String))
    (let $46 '($45))
    (let $47 '((OptionalType $45)))
    (let $48 (CallableType $13 $46 $46 $47))
    (let $49 (Udf '"Re2.PatternFromLike" (Void) (VoidType) '"" $48 (VoidType) '"" '()))
    (let $50 (DataType 'Bool))
    (let $51 (StructType '('"CaseSensitive" $50) '('"DotNl" $50) '('"Literal" $50) '('"LogErrors" $50) '('"LongestMatch" $50) '('"MaxMem" $14) '('"NeverCapture" $50) '('"NeverNl" $50) '('"OneLine" $50) '('"PerlClasses" $50) '('"PosixSyntax" $50) '('"Utf8" $50) '('"WordBoundary" $50)))
    (let $52 (OptionalType $50))
    (let $53 (CallableType '('"13") '($51) '($52 '"Utf8") '($52 '"PosixSyntax") '($52 '"LongestMatch") '($52 '"LogErrors") '((OptionalType $14) '"MaxMem") '($52 '"Literal") '($52 '"NeverNl") '($52 '"DotNl") '($52 '"NeverCapture") '($52 '"CaseSensitive") '($52 '"PerlClasses") '($52 '"WordBoundary") '($52 '"OneLine")))
    (let $54 (Udf '"Re2.Options" (Void) (VoidType) '"" $53 (VoidType) '"" '('('"strict"))))
    (let $55 (CallableType '() '($50) $47))
    (return (Not (Apply (AssumeStrict (Udf '"Re2.Match" '((Apply $49 (String '"%unusual%requests%")) (Just (NamedApply $54 '() (AsStruct '('"CaseSensitive" (Just $4)))))) (VoidType) '"" $55 (TupleType $45 (OptionalType $51)) '"" '())) (Just $42))))
  )))) $41)))
))) $15))
(let $17 (DqCnBroadcast (TDqOutput $16 '0)))
(let $18 '('_yql_agg_0 $14))
(let $19 '('('"_logical_id" '2453) '('"_id" '"cf41e6bf-987ca24-40c8c757-4aaee476") '('"_wide_channels" (StructType $18 '('"c.c_custkey" $6)))))
(let $20 (DqPhyStage '($17) (lambda '($59) (block '(
  (let $60 '('Many 'Hashed 'Compact))
  (let $61 (NarrowSqueezeToDict (ToFlow $59) (lambda '($63 $64) $63) (lambda '($65 $66) (AsStruct '('"o_custkey" $65) '('"o_orderkey" $66))) $60))
  (let $62 (lambda '($83 $84) $84 $83))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (FlatMap $61 (lambda '($67) (block '(
    (let $68 '@@["StructType";[["c_custkey";["DataType";"Int32"]];["c_acctbal";["DataType";"Double"]];["c_phone";["DataType";"String"]];["c_mktsegment";["DataType";"String"]];["c_nationkey";["DataType";"Int32"]];["c_comment";["DataType";"String"]];["c_name";["DataType";"String"]];["c_address";["DataType";"String"]]]]@@)
    (let $69 '('"c_custkey"))
    (let $70 (YqlRowSpec '('NativeYtTypeFlags '0) $2 $3 '('Type $68) $5 '('SortMembers $69) '('SortedBy $69) $7))
    (let $71 (YtStat '('Id '"customer") $9 '('DataSize '"247") $10 $11 $12))
    (let $72 (YtTable '"customer" $70 $8 $71 '() (Void) (Void) '"/Root/plato"))
    (let $73 (YtReadTable! world $1 '((YtSection '((YtPath $72 $69 (Void) (Void))) '()))))
    (return (MapJoinCore (DqReadWideWrap $73 '()) $67 'Left '('0) '('"o_custkey") '('0 '0) '('"o_orderkey" '1) '('"c.c_custkey") '('"o.o_custkey")))
  )))))) '-1073741824 (lambda '($74 $75) $74) (lambda '($76 $77 $78) (AggrCountInit $78)) (lambda '($79 $80 $81 $82) (AggrCountUpdate $81 $82)) $62))
))) $19))
(let $21 (DqCnHashShuffle (TDqOutput $20 '0) $13 '0 '"HashV2"))
(let $22 (lambda '($104 $105) $105 $104))
(let $23 '('"c_count" $14))
(let $24 '('('"_logical_id" '3368) '('"_id" '"e4d9a422-9b0cc5a-80fa401d-64e816d5") '('"_wide_channels" (StructType $18 $23))))
(let $25 (DqPhyStage '($21) (lambda '($85) (block '(
  (let $86 (Uint64 '1))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (WideCombiner (ToFlow (WideFromBlocks $85)) '"" (lambda '($87 $88) $88) (lambda '($89 $90 $91) $90) (lambda '($92 $93 $94 $95) (AggrAdd $93 $95)) (lambda '($96 $97) $97)))) '-1073741824 (lambda '($98) $98) (lambda '($99 $100) $86) (lambda '($101 $102 $103) (AggrAdd $103 $86)) $22))
))) $24))
(let $26 (DqCnHashShuffle (TDqOutput $25 '0) $13 '0 '"HashV2"))
(let $27 (StructType $23 '('"custdist" $14)))
(let $28 '('('"_logical_id" '3921) '('"_id" '"a46f1154-8b6587b7-4216a22c-4a41bef9") '('"_wide_channels" $27)))
(let $29 (DqPhyStage '($26) (lambda '($106) (block '(
  (let $107 (WideCombiner (ToFlow (WideFromBlocks $106)) '"" (lambda '($110 $111) $111) (lambda '($112 $113 $114) $113) (lambda '($115 $116 $117 $118) (AggrAdd $116 $118)) $22))
  (let $108 (Bool 'false))
  (let $109 (lambda '($119 $120) $120 $119))
  (return (FromFlow (WideMap (WideSort $107 '('('0 $108) '('1 $108))) $109)))
))) $28))
(let $30 (DqCnMerge (TDqOutput $29 '0) '('('1 '"Desc") '('0 '"Desc"))))
(let $31 (DqPhyStage '($30) (lambda '($121) (FromFlow (NarrowMap (ToFlow $121) (lambda '($122 $123) (AsStruct '('"c_count" $122) '('"custdist" $123)))))) '('('"_logical_id" '3933) '('"_id" '"f21e4fcc-8afe3c74-eee1e50a-808ee13f"))))
(let $32 '($16 $20 $25 $29 $31))
(let $33 (DqCnResult (TDqOutput $31 '0) '('"c_count" '"custdist")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $32 '($33) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $27) '0 '0)) '('('"type" '"query"))))
)
