(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '('NativeYtTypeFlags '0))
(let $3 '('StrictSchema '1))
(let $4 '('UniqueKeys '0))
(let $5 (Bool 'true))
(let $6 (DataType 'Uint64))
(let $7 (OptionalType $6))
(let $8 (DataType 'Uint16))
(let $9 (OptionalType $8))
(let $10 '('CanWrite '1))
(let $11 '('DoesExist '1))
(let $12 '('YqlCompatibleScheme '1))
(let $13 '('InferredScheme '0))
(let $14 '('IsDynamic '0))
(let $15 '('ChunkCount '1))
(let $16 '('ModifyTime '0))
(let $17 '('Revision '0))
(let $18 (OptionalType (DataType 'String)))
(let $19 (StructType '('"BaseNo" $9) '('"PhraseID" $7) '('"Text" $18)))
(let $20 '('('"_logical_id" '1026) '('"_id" '"526d30b5-ed800658-3c9dbf0a-6fa36da8") '('"_wide_channels" $19)))
(let $21 (DqPhyStage '() (lambda '() (block '(
  (let $30 '@@["StructType";[["PhraseID";["OptionalType";["DataType";"Uint64"]]];["BaseNo";["OptionalType";["DataType";"Uint16"]]];["Text";["OptionalType";["DataType";"String"]]]]]@@)
  (let $31 '('"PhraseID" '"BaseNo"))
  (let $32 (YqlRowSpec $2 $3 $4 '('Type $30) '('SortDirections '($5 $5)) '('SortMembers $31) '('SortedBy $31) '('SortedByTypes '($7 $9))))
  (let $33 (YtMeta $10 $11 $12 $13 $14))
  (let $34 (YtStat '('Id '"Input1") '('RecordsCount '"20") '('DataSize '"1104") $15 $16 $17))
  (let $35 (YtTable '"Input1" $32 $33 $34 '() (Void) (Void) '"/Root/plato"))
  (let $36 '('"BaseNo" '"PhraseID" '"Text"))
  (let $37 (YtReadTable! world $1 '((YtSection '((YtPath $35 $36 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $37 '())))
))) $20))
(let $22 (DqCnBroadcast (TDqOutput $21 '0)))
(let $23 (StructType '('"pd.Text" $18)))
(let $24 '('('"_logical_id" '1165) '('"_id" '"48d5df71-acf00460-b3d1c2ce-7e479460") '('"_wide_channels" $23)))
(let $25 (DqPhyStage '($22) (lambda '($38) (block '(
  (let $39 '('0 '1))
  (let $40 '('Many 'Hashed 'Compact))
  (let $41 (SqueezeToDict (NarrowFlatMap (WideFilter (ToFlow $38) (lambda '($42 $43 $44) (And (Exists $42) (Exists $43)))) (lambda '($45 $46 $47) (IfPresent (FilterNullElements (Just '($45 $46)) $39) (lambda '($48) (block '(
    (let $49 (AsStruct '('"BaseNo" $45) '('"PhraseID" $46) '('"Text" $47)))
    (return (Just '($48 $49)))
  ))) (Nothing (OptionalType (TupleType (TupleType $8 $6) $19)))))) (lambda '($50) (Nth $50 '0)) (lambda '($51) (Nth $51 '1)) $40))
  (return (FromFlow (WideSort (FlatMap $41 (lambda '($52) (block '(
    (let $53 '@@["StructType";[["BannerID";["OptionalType";["DataType";"Int64"]]];["BaseNo";["OptionalType";["DataType";"Uint16"]]];["PhraseID";["OptionalType";["DataType";"Uint64"]]];["ResultCost";["OptionalType";["DataType";"Int64"]]];["ResultFlatCost";["OptionalType";["DataType";"Int64"]]]]]@@)
    (let $54 (YqlRowSpec $2 $3 $4 '('Type $53)))
    (let $55 (YtMeta $10 $11 $12 $13 $14 '('Attrs '('('"native_strict_schema" '"false")))))
    (let $56 (YtStat '('Id '"Input2") '('RecordsCount '"5") '('DataSize '"443") $15 $16 $17))
    (let $57 (YtTable '"Input2" $54 $55 $56 '() (Void) (Void) '"/Root/plato"))
    (let $58 '('"BaseNo" '"PhraseID"))
    (let $59 (YtReadTable! world $1 '((YtSection '((YtPath $57 $58 (Void) (Void))) '()))))
    (return (MapJoinCore (WideFilter (DqReadWideWrap $59 '()) (lambda '($60 $61) (And (Exists $60) (Exists $61)))) $52 'Inner $39 $58 '() '('"Text" '0) '('"m2.BaseNo" '"m2.PhraseID") '('"pd.BaseNo" '"pd.PhraseID")))
  )))) '('('0 $5)))))
))) $24))
(let $26 (DqCnMerge (TDqOutput $25 '0) '('('0 '"Asc"))))
(let $27 (DqPhyStage '($26) (lambda '($62) (FromFlow (NarrowMap (ToFlow $62) (lambda '($63) (AsStruct '('"pd.Text" $63)))))) '('('"_logical_id" '1177) '('"_id" '"ca440413-f58a00d-50fc67f-894fb19"))))
(let $28 '($21 $25 $27))
(let $29 (DqCnResult (TDqOutput $27 '0) '('"pd.Text")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $28 '($29) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $23) '0 '0)) '('('"type" '"query"))))
)
