(
(let $1 (DataType 'String))
(let $2 (StructType '('"Data" $1)))
(let $3 (DqPhyStage '() (lambda '() (block '(
  (let $7 '((StreamType $2)))
  (let $8 '($1))
  (let $9 (OptionalType $1))
  (let $10 '($9))
  (let $11 (CallableType '('"3") $7 $7 $8 '((OptionalType (ListType $1))) $10 $10))
  (let $12 (Udf '"Streaming.ProcessInline" (Void) (VoidType) '"" $11 (VoidType) '"" '()))
  (let $13 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $14 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $13)))
  (let $15 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $16 (YtStat '('Id '"Input1") '('RecordsCount '"9") '('DataSize '"360") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $17 (YtTable '"Input1" $14 $15 $16 '() (Void) (Void) '"/Root/plato"))
  (let $18 '('"key" '"subkey" '"value"))
  (let $19 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $17 $18 (Void) (Void))) '()))))
  (let $20 '@@
#!/bin/bash
cat - | grep $1 | head -n 3 | grep [234]
@@)
  (return (Apply $12 (FromFlow (NarrowMap (DqReadWideWrap $19 '()) (lambda '($21 $22 $23) (block '(
    (let $24 '((ListType $9) '"" '1))
    (let $25 (CallableType '() $8 $24 $8))
    (let $26 (Udf '"String.JoinFromList" (Void) (VoidType) '"" $25 (VoidType) '"" '('('"strict"))))
    (let $27 (AsList (Just $21) (Just $22) (Just $23)))
    (let $28 (Apply $26 $27 (String '",")))
    (return (AsStruct '('"Data" $28)))
  ))))) (String $20) (Just (AsList (String '"bar")))))
))) '('('"_logical_id" '815) '('"_id" '"de37cb65-8d1a2c34-98388c25-f64a1ce"))))
(let $4 (DqCnUnionAll (TDqOutput $3 '0)))
(let $5 (DqPhyStage '($4) (lambda '($29) $29) '('('"_logical_id" '851) '('"_id" '"dd6829fe-9009ed7d-82d32929-442ba5a4"))))
(let $6 (DqCnResult (TDqOutput $5 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx '($3 $5) '($6) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $2) '0 '0)) '('('"type" '"query"))))
)
