(
(let $1 (DataType 'Int32))
(let $2 (DataType 'String))
(let $3 (StructType '('"key" $2) '('"subkey" $1) '('"value" $2)))
(let $4 '('('"_logical_id" '1064) '('"_id" '"9658400e-f3f985f6-6f7ad293-5c79adfd") '('"_wide_channels" $3)))
(let $5 (DqPhyStage '() (lambda '() (block '(
  (let $9 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $10 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $9)))
  (let $11 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $12 (YtStat '('Id '"Input") '('RecordsCount '"4") '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $13 (YtTable '"Input" $10 $11 $12 '() (Void) (Void) '"/Root/plato"))
  (let $14 '('"key" '"subkey" '"value"))
  (let $15 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $13 $14 (Void) (Void))) '()))))
  (let $16 (Bool 'true))
  (let $17 (Sort (NarrowFlatMap (DqReadWideWrap $15 '()) (lambda '($19 $20 $21) (block '(
    (let $22 (Coalesce (SafeCast $20 (OptionalType $1)) (Int32 '0)))
    (return (If (And (>= $22 (Int32 '1)) (<= $22 (Int32 '"3"))) (Just (AsStruct '('"key" $19) '('"subkey" $22) '('"value" $21))) (Nothing (OptionalType $3))))
  )))) '($16 $16) (lambda '($23) '((Member $23 '"key") (Member $23 '"subkey")))))
  (let $18 (lambda '($24) (Member $24 '"key") (Member $24 '"subkey") (Member $24 '"value")))
  (return (FromFlow (ExpandMap $17 $18)))
))) $4))
(let $6 (DqCnMerge (TDqOutput $5 '0) '('('0 '"Asc") '('1 '"Asc"))))
(let $7 (DqPhyStage '($6) (lambda '($25) (FromFlow (NarrowMap (ToFlow $25) (lambda '($26 $27 $28) (AsStruct '('"key" $26) '('"subkey" $27) '('"value" $28)))))) '('('"_logical_id" '1076) '('"_id" '"e9c875eb-15dab1e4-37d5f27f-854e8847"))))
(let $8 (DqCnResult (TDqOutput $7 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx '($5 $7) '($8) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $3) '0 '0)) '('('"type" '"query"))))
)
