(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '@@["StructType";[["key";["OptionalType";["DataType";"String"]]];["subkey";["OptionalType";["DataType";"String"]]]]]@@)
(let $3 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '0) '('UniqueKeys '0) '('Type $2)))
(let $4 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
(let $5 '('RecordsCount '"4"))
(let $6 '('DataSize '"170"))
(let $7 '('ChunkCount '1))
(let $8 '('ModifyTime '0))
(let $9 '('Revision '0))
(let $10 '('"_other" '"subkey"))
(let $11 (DataType 'String))
(let $12 (OptionalType $11))
(let $13 (StructType '('"_other" (DictType $11 $11)) '('"subkey" $12)))
(let $14 '('('"_logical_id" '1354) '('"_id" '"32183208-177a528-1e27d0a3-3d7fc1f3") '('"_wide_channels" $13)))
(let $15 (DqPhyStage '() (lambda '() (block '(
  (let $25 (YtStat '('Id '"Input2") $5 $6 $7 $8 $9))
  (let $26 (YtTable '"Input2" $3 $4 $25 '() (Void) (Void) '"/Root/plato"))
  (let $27 (YtReadTable! world $1 '((YtSection '((YtPath $26 $10 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $27 '())))
))) $14))
(let $16 (DqCnBroadcast (TDqOutput $15 '0)))
(let $17 (StructType '('"i1v1" $12) '('"i1v2" $12) '('"i2v1" $12) '('"i2v2" $12) '('"sk" $12)))
(let $18 '('('"_logical_id" '1590) '('"_id" '"b9610109-66829a58-f9ef88c0-47a2a186") '('"_wide_channels" $17)))
(let $19 (DqPhyStage '($16) (lambda '($28) (block '(
  (let $29 (lambda '($33 $34) (Exists $34)))
  (let $30 '('Many 'Hashed 'Compact))
  (let $31 (SqueezeToDict (NarrowFlatMap (WideFilter (ToFlow $28) $29) (lambda '($35 $36) (IfPresent $36 (lambda '($37) (Just '($37 (AsStruct '('"_other" $35) '('"subkey" $36))))) (Nothing (OptionalType (TupleType $11 $13)))))) (lambda '($38) (Nth $38 '0)) (lambda '($39) (Nth $39 '1)) $30))
  (let $32 (lambda '($45 $46 $47) (block '(
    (let $48 (Just $45))
    (let $49 (Nothing (OptionalType (DictType $11 (DataType 'Yson)))))
    (let $50 (TryWeakMemberFromDict $48 $49 'String '"value1"))
    (let $51 (TryWeakMemberFromDict $48 $49 'String '"value2"))
    (let $52 (Just $47))
    (let $53 (TryWeakMemberFromDict $52 $49 'String '"value1"))
    (let $54 (TryWeakMemberFromDict $52 $49 'String '"value2"))
    (return (Coalesce $50 (Just (String '"funny"))) (Coalesce $51 (Just (String '"bunny"))) (Coalesce $53 (Just (String '"short"))) (Coalesce $54 (Just (String '"circuit"))) $46)
  ))))
  (return (FromFlow (WideMap (WideSort (FlatMap $31 (lambda '($40) (block '(
    (let $41 (YtStat '('Id '"Input1") $5 $6 $7 $8 $9))
    (let $42 (YtTable '"Input1" $3 $4 $41 '() (Void) (Void) '"/Root/plato"))
    (let $43 (YtReadTable! world $1 '((YtSection '((YtPath $42 $10 (Void) (Void))) '()))))
    (let $44 '('0 '0 '1 '1))
    (return (MapJoinCore (WideFilter (DqReadWideWrap $43 '()) $29) $40 'Inner '('1) '('"subkey") $44 '('"_other" '2) '('"i1.subkey") '('"i2.subkey")))
  )))) '('('1 (Bool 'true)))) $32)))
))) $18))
(let $20 (DqCnMerge (TDqOutput $19 '0) '('('"4" '"Asc"))))
(let $21 (DqPhyStage '($20) (lambda '($55) (FromFlow (NarrowMap (ToFlow $55) (lambda '($56 $57 $58 $59 $60) (AsStruct '('"i1v1" $56) '('"i1v2" $57) '('"i2v1" $58) '('"i2v2" $59) '('"sk" $60)))))) '('('"_logical_id" '1602) '('"_id" '"2d8635ce-87473646-2befd4e4-1eac55be"))))
(let $22 '($15 $19 $21))
(let $23 '('"sk" '"i1v1" '"i1v2" '"i2v1" '"i2v2"))
(let $24 (DqCnResult (TDqOutput $21 '0) $23))
(return (KqpPhysicalQuery '((KqpPhysicalTx $22 '($24) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $17) '0 '0)) '('('"type" '"query"))))
)
