(
(let $1 (DataType 'Int64))
(let $2 '('('"_logical_id" '4640) '('"_id" '"b2e95771-2f51083e-67e89144-eda8bcb") '('"_wide_channels" (StructType '('"c_custkey" $1)))))
(let $3 (DqPhyStage '() (lambda '() (block '(
  (let $29 (KqpTable '"/local/test_db/olap_yatests/tpch/s1/customer" '"72075186224037897:9" '"" '1))
  (let $30 (KqpBlockReadOlapTableRanges $29 (Void) '('"c_custkey") '() '() (lambda '($31) $31)))
  (return (WideFromBlocks (FromFlow $30)))
))) $2))
(let $4 '('1))
(let $5 (DataType 'Uint64))
(let $6 '('"o_custkey" $1))
(let $7 '('"o_orderkey" $1))
(let $8 '('('"_logical_id" '1977) '('"_id" '"1febc38e-9eb26195-d158bbb9-3d973264") '('"_wide_channels" (StructType $6 $7))))
(let $9 (DqPhyStage '() (lambda '() (block '(
  (let $32 (KqpTable '"/local/test_db/olap_yatests/tpch/s1/orders" '"72075186224037897:12" '"" '1))
  (let $33 '('"o_comment" '"o_custkey" '"o_orderkey"))
  (let $34 (KqpBlockReadOlapTableRanges $32 (Void) $33 '() '() (lambda '($35) (block '(
    (let $36 (StructType '('"o_comment" (DataType 'Utf8)) $6 $7))
    (let $37 (KqpOlapApply (lambda '($38) (block '(
      (let $39 (DataType 'String))
      (let $40 '($39))
      (let $41 '((OptionalType $39)))
      (let $42 (CallableType $4 $40 $40 $41))
      (let $43 (Udf '"Re2.PatternFromLike" (Void) (VoidType) '"" $42 (VoidType) '"" '()))
      (let $44 (DataType 'Bool))
      (let $45 (StructType '('"CaseSensitive" $44) '('"DotNl" $44) '('"Literal" $44) '('"LogErrors" $44) '('"LongestMatch" $44) '('"MaxMem" $5) '('"NeverCapture" $44) '('"NeverNl" $44) '('"OneLine" $44) '('"PerlClasses" $44) '('"PosixSyntax" $44) '('Utf8 $44) '('"WordBoundary" $44)))
      (let $46 (OptionalType $44))
      (let $47 (CallableType '('"13") '($45) '($46 'Utf8) '($46 '"PosixSyntax") '($46 '"LongestMatch") '($46 '"LogErrors") '((OptionalType $5) '"MaxMem") '($46 '"Literal") '($46 '"NeverNl") '($46 '"DotNl") '($46 '"NeverCapture") '($46 '"CaseSensitive") '($46 '"PerlClasses") '($46 '"WordBoundary") '($46 '"OneLine")))
      (let $48 (Udf '"Re2.Options" (Void) (VoidType) '"" $47 (VoidType) '"" '('('"strict"))))
      (let $49 (CallableType '() '($44) $41))
      (return (Not (Apply (AssumeStrict (Udf '"Re2.Match" '((Apply $43 (String '"%special%requests%")) (Just (NamedApply $48 '() (AsStruct '('"CaseSensitive" (Just (Bool 'true))))))) (VoidType) '"" $49 (TupleType $39 (OptionalType $45)) '"" '())) (Just (ToString $38)))))
    ))) '((KqpOlapApplyColumnArg $36 '"o_comment")) '""))
    (return (TKqpOlapExtractMembers (KqpOlapFilter $35 $37) '('"o_custkey" '"o_orderkey")))
  )))))
  (return (WideFromBlocks (FromFlow $34)))
))) $8))
(let $10 '('0))
(let $11 (DqCnHashShuffle (TDqOutput $3 '0) $10 '1 '"HashV1"))
(let $12 (DqCnHashShuffle (TDqOutput $9 '0) $10 '1 '"HashV1"))
(let $13 '('_yql_agg_0 $5))
(let $14 '('('"_logical_id" '2575) '('"_id" '"39d5c87e-a8541ea0-a51b2084-6e4e04f1") '('"_wide_channels" (StructType $13 '('"c.c_custkey" $1)))))
(let $15 (DqPhyStage '($11 $12) (lambda '($50 $51) (block '(
  (let $52 (lambda '($53 $54 $55) $54 $53 $55))
  (return (FromFlow (WideMap (ToFlow (BlockCombineHashed (WideToBlocks (FromFlow (GraceJoinCore (ToFlow $50) (ToFlow $51) '"Left" $10 $10 '('0 '0) '('1 '1) '('"c.c_custkey") '('"o.o_custkey") '()))) (Void) $10 '('((AggBlockApply 'count (OptionalType $1)) '1)))) $52)))
))) $14))
(let $16 (DqCnHashShuffle (TDqOutput $15 '0) $4 '0 '"HashV1"))
(let $17 (lambda '($66 $67 $68) $67 $66 $68))
(let $18 '('"c_count" $5))
(let $19 '('('"_logical_id" '3667) '('"_id" '"9eb455c4-93dfbe33-e5e3a394-404601f5") '('"_wide_channels" (StructType $13 $18))))
(let $20 (DqPhyStage '($16) (lambda '($56) (block '(
  (let $57 (lambda '($60 $61 $62) $61 $60 $62))
  (let $58 (AggBlockApplyState 'count $5 $5))
  (let $59 (lambda '($63 $64 $65) $64 $65))
  (return (FromFlow (WideMap (ToFlow (BlockCombineHashed (FromFlow (WideMap (ToFlow (BlockMergeFinalizeHashed (FromFlow (WideMap (ToFlow $56) $57)) $10 '('($58 '1)))) $59)) (Void) $10 '('((AggBlockApply 'count_all))))) $17)))
))) $19))
(let $21 (DqCnHashShuffle (TDqOutput $20 '0) $4 '0 '"HashV1"))
(let $22 (StructType $18 '('"custdist" $5)))
(let $23 '('('"_logical_id" '4456) '('"_id" '"945b469f-2222b7b7-e9222a11-927b729") '('"_wide_channels" $22)))
(let $24 (DqPhyStage '($21) (lambda '($69) (block '(
  (let $70 (AggBlockApplyState 'count_all $5 $5))
  (let $71 (Bool 'false))
  (return (FromFlow (WideSort (ToFlow (WideFromBlocks (BlockMergeFinalizeHashed (FromFlow (WideMap (ToFlow $69) $17)) $10 '('($70 '1))))) '('('1 $71) '('0 $71)))))
))) $23))
(let $25 (DqCnMerge (TDqOutput $24 '0) '('('1 '"Desc") '('0 '"Desc"))))
(let $26 (DqPhyStage '($25) (lambda '($72) (FromFlow (NarrowMap (ToFlow $72) (lambda '($73 $74) (AsStruct '('"c_count" $73) '('"custdist" $74)))))) '('('"_logical_id" '4468) '('"_id" '"2d68cb38-2dd6d750-22077cc6-34e46539"))))
(let $27 '($3 $9 $15 $20 $24 $26))
(let $28 (DqCnResult (TDqOutput $26 '0) '('"c_count" '"custdist")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $27 '($28) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $22) '0 '0)) '('('"type" '"query"))))
)
