(
(let $1 (Int32 '1))
(let $2 (DataType 'Date32))
(let $3 '($2))
(let $4 (CallableType '() $3 $3))
(let $5 (Callable $4 (lambda '($82) $82)))
(let $6 (DataType 'Timestamp64))
(let $7 '($6))
(let $8 (CallableType '() $7 $7))
(let $9 (Callable $8 (lambda '($83) $83)))
(let $10 (DataType 'Datetime64))
(let $11 (Int32 '"4"))
(let $12 (DataType 'Interval64))
(let $13 '($12))
(let $14 (CallableType '() $13 $13))
(let $15 (Callable $14 (lambda '($84) $84)))
(let $16 (Int32 '2))
(let $17 '($10))
(let $18 (CallableType '() $17 $17))
(let $19 (Callable $18 (lambda '($85) $85)))
(let $20 (Int32 '3))
(let $21 '('('"_logical_id" '3699) '('"_id" '"1823949e-82750cd4-9a880d3b-7f3ae2d6") '('"_partition_mode" '"single")))
(let $22 (DqPhyStage '() (lambda '() (block '(
  (let $76 (Unwrap (SafeCast $1 (OptionalType (DataType 'Date)))))
  (let $77 (Int32 '"-1"))
  (let $78 (Unwrap (SafeCast $77 (OptionalType $2))))
  (let $79 (Unwrap (SafeCast (Int32 '"86400") (OptionalType (DataType 'Datetime)))))
  (let $80 (SafeCast (Int32 '"-86400") $10))
  (let $81 (* (Int64 '"86400") (Int32 '"1000000")))
  (return (Iterator (AsList (AsStruct '('"column0" $1) '('"column1" (Apply $5 (SafeCast $76 $2))) '('"column10" (Apply $9 (SafeCast $78 $6))) '('"column11" (Apply $9 (SafeCast $79 $6))) '('"column12" (Apply $9 (SafeCast $80 $6))) '('"column13" (Apply $9 (SafeCast (Unwrap (SafeCast $81 (OptionalType (DataType 'Timestamp)))) $6))) '('"column14" (Apply $9 (Unwrap (SafeCast $81 (OptionalType $6))))) '('"column15" $11) '('"column16" (Apply $15 (SafeCast (SafeCast $1 (DataType 'Interval)) $12))) '('"column17" (Apply $15 (SafeCast $77 $12))) '('"column2" (Apply $5 $78)) '('"column3" $16) '('"column4" (Apply $19 (SafeCast $76 $10))) '('"column5" (Apply $19 (SafeCast $78 $10))) '('"column6" (Apply $19 (SafeCast $79 $10))) '('"column7" (Apply $19 $80)) '('"column8" $20) '('"column9" (Apply $9 (SafeCast $76 $6)))))))
))) $21))
(let $23 '('"column0" '"column1" '"column2" '"column3" '"column4" '"column5" '"column6" '"column7" '"column8" '"column9" '"column10" '"column11" '"column12" '"column13" '"column14" '"column15" '"column16" '"column17"))
(let $24 (DqCnResult (TDqOutput $22 '0) $23))
(let $25 '('('"type" '"generic")))
(let $26 (KqpPhysicalTx '($22) '($24) '() $25))
(let $27 (DataSource '"yt" '"/Root/plato"))
(let $28 '('NativeYtTypeFlags '0))
(let $29 '('StrictSchema '1))
(let $30 '('UniqueKeys '0))
(let $31 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0)))
(let $32 '('ChunkCount '1))
(let $33 '('ModifyTime '0))
(let $34 '('Revision '0))
(let $35 (Bool 'true))
(let $36 (DataType 'Int32))
(let $37 '('"column1" $36))
(let $38 '('"column2" $6))
(let $39 '('"column3" $10))
(let $40 '('"column4" $2))
(let $41 '('"column5" $36))
(let $42 '('"column6" $6))
(let $43 '('"column7" $10))
(let $44 '('"column8" $36))
(let $45 '('"column9" $6))
(let $46 '('"row" (DataType 'Int64)))
(let $47 (StructType $37 '('"column10" $36) '('"column11" $12) $38 $39 $40 $41 $42 $43 $44 $45 $46))
(let $48 '('('"_logical_id" '3876) '('"_id" '"b3e337a2-310d5e65-120b0b26-3556c4df") '('"_wide_channels" $47)))
(let $49 (DqPhyStage '() (lambda '() (block '(
  (let $86 '@@["StructType";[["row";["DataType";"Int64"]];["d32";["DataType";"Date32"]];["dt64";["DataType";"Datetime64"]];["ts64";["DataType";"Timestamp64"]];["i64";["DataType";"Interval64"]]]]@@)
  (let $87 (YqlRowSpec $28 $29 $30 '('Type $86)))
  (let $88 (YtStat '('Id '"BigDates") '('RecordsCount '"27") '('DataSize '"2125") $32 $33 $34))
  (let $89 (YtTable '"BigDates" $87 $31 $88 '() (Void) (Void) '"/Root/plato"))
  (let $90 '('"d32" '"dt64" '"i64" '"row" '"ts64"))
  (let $91 (YtReadTable! world $27 '((YtSection '((YtPath $89 $90 (Void) (Void))) '()))))
  (let $92 (lambda '($93 $94 $95 $96 $97) $1 $11 (Apply $15 $95) (Apply $9 (SafeCast $93 $6)) (Apply $19 (SafeCast $93 $10)) (Apply $5 $93) $16 (Apply $9 (SafeCast $94 $6)) (Apply $19 $94) $20 (Apply $9 $97) $96))
  (return (FromFlow (WideMap (WideSort (DqReadWideWrap $91 '()) '('('3 $35))) $92)))
))) $48))
(let $50 (DqCnMerge (TDqOutput $49 '0) '('('"11" '"Asc"))))
(let $51 (DqPhyStage '($50) (lambda '($98) (FromFlow (NarrowMap (ToFlow $98) (lambda '($99 $100 $101 $102 $103 $104 $105 $106 $107 $108 $109 $110) (AsStruct '('"column1" $99) '('"column10" $100) '('"column11" $101) '('"column2" $102) '('"column3" $103) '('"column4" $104) '('"column5" $105) '('"column6" $106) '('"column7" $107) '('"column8" $108) '('"column9" $109) '('"row" $110)))))) '('('"_logical_id" '3888) '('"_id" '"21c2fe25-d740c311-b591d728-2440c1d0"))))
(let $52 '('"row" '"column1" '"column2" '"column3" '"column4" '"column5" '"column6" '"column7" '"column8" '"column9" '"column10" '"column11"))
(let $53 (DqCnResult (TDqOutput $51 '0) $52))
(let $54 (KqpPhysicalTx '($49 $51) '($53) '() $25))
(let $55 (StructType $37 $38 $39 $40 $41 $42 $43 $44 $45 '('"row" (DataType 'Uint64))))
(let $56 '('('"_logical_id" '4059) '('"_id" '"5367e35b-1c510b83-d8861e6e-12f41d82") '('"_wide_channels" $55)))
(let $57 (DqPhyStage '() (lambda '() (block '(
  (let $111 '@@["StructType";[["row";["DataType";"Uint64"]];["d";["DataType";"Date"]];["dt";["DataType";"Datetime"]];["ts";["DataType";"Timestamp"]]]]@@)
  (let $112 (YqlRowSpec $28 $29 $30 '('Type $111)))
  (let $113 (YtStat '('Id '"NarrowDates") '('RecordsCount '"12") '('DataSize '"635") $32 $33 $34))
  (let $114 (YtTable '"NarrowDates" $112 $31 $113 '() (Void) (Void) '"/Root/plato"))
  (let $115 '('"d" '"dt" '"row" '"ts"))
  (let $116 (YtReadTable! world $27 '((YtSection '((YtPath $114 $115 (Void) (Void))) '()))))
  (let $117 (lambda '($118 $119 $120 $121) $1 (Apply $9 (SafeCast $118 $6)) (Apply $19 (SafeCast $118 $10)) (Apply $5 (SafeCast $118 $2)) $16 (Apply $9 (SafeCast $119 $6)) (Apply $19 (SafeCast $119 $10)) $20 (Apply $9 (SafeCast $121 $6)) $120))
  (return (FromFlow (WideMap (WideSort (DqReadWideWrap $116 '()) '('('2 $35))) $117)))
))) $56))
(let $58 (DqCnMerge (TDqOutput $57 '0) '('('"9" '"Asc"))))
(let $59 (DqPhyStage '($58) (lambda '($122) (FromFlow (NarrowMap (ToFlow $122) (lambda '($123 $124 $125 $126 $127 $128 $129 $130 $131 $132) (AsStruct '('"column1" $123) '('"column2" $124) '('"column3" $125) '('"column4" $126) '('"column5" $127) '('"column6" $128) '('"column7" $129) '('"column8" $130) '('"column9" $131) '('"row" $132)))))) '('('"_logical_id" '4071) '('"_id" '"1cdef5f5-bdfaee21-94955c43-f096cb29"))))
(let $60 '('"row" '"column1" '"column2" '"column3" '"column4" '"column5" '"column6" '"column7" '"column8" '"column9"))
(let $61 (DqCnResult (TDqOutput $59 '0) $60))
(let $62 (KqpPhysicalTx '($57 $59) '($61) '() $25))
(let $63 (StructType '('"column1" $12) $46))
(let $64 '('('"_logical_id" '4193) '('"_id" '"c59316b6-9c395a42-8b8ccf07-66276903") '('"_wide_channels" $63)))
(let $65 (DqPhyStage '() (lambda '() (block '(
  (let $133 '@@["StructType";[["row";["DataType";"Int64"]];["i";["DataType";"Interval"]]]]@@)
  (let $134 (YqlRowSpec $28 $29 $30 '('Type $133)))
  (let $135 (YtStat '('Id '"NarrowInterval") '('RecordsCount '"23") '('DataSize '"650") $32 $33 $34))
  (let $136 (YtTable '"NarrowInterval" $134 $31 $135 '() (Void) (Void) '"/Root/plato"))
  (let $137 (YtReadTable! world $27 '((YtSection '((YtPath $136 '('"i" '"row") (Void) (Void))) '()))))
  (let $138 (lambda '($139 $140) (Apply $15 (SafeCast $139 $12)) $140))
  (return (FromFlow (WideMap (WideSort (DqReadWideWrap $137 '()) '('('1 $35))) $138)))
))) $64))
(let $66 (DqCnMerge (TDqOutput $65 '0) '('('1 '"Asc"))))
(let $67 (DqPhyStage '($66) (lambda '($141) (FromFlow (NarrowMap (ToFlow $141) (lambda '($142 $143) (AsStruct '('"column1" $142) '('"row" $143)))))) '('('"_logical_id" '4205) '('"_id" '"eafd9e67-7e3d5aae-c49dfaaa-1faa8a97"))))
(let $68 (DqCnResult (TDqOutput $67 '0) '('"row" '"column1")))
(let $69 (KqpPhysicalTx '($65 $67) '($68) '() $25))
(let $70 '($26 $54 $62 $69))
(let $71 (KqpTxResultBinding (ListType (StructType '('"column0" $36) '('"column1" $2) '('"column10" $6) '('"column11" $6) '('"column12" $6) '('"column13" $6) '('"column14" $6) '('"column15" $36) '('"column16" $12) '('"column17" $12) '('"column2" $2) '('"column3" $36) '('"column4" $10) '('"column5" $10) '('"column6" $10) $43 $44 $45)) '0 '0))
(let $72 (KqpTxResultBinding (ListType $47) '1 '0))
(let $73 (KqpTxResultBinding (ListType $55) '2 '0))
(let $74 (KqpTxResultBinding (ListType $63) '3 '0))
(let $75 '($71 $72 $73 $74))
(return (KqpPhysicalQuery $70 $75 '('('"type" '"query"))))
)
