ImplicitEqualsOverDict.yql 806 B

1234567891011121314151617181920212223
  1. (
  2. (let config (DataSource 'config))
  3. (let world (Configure! world config 'PureDataSource 'yt))
  4. (let res_sink (DataSink 'result))
  5. # Dict<Uint32, Int16>> -> Dict<Uint32, Uint64> (false)
  6. (let value (AsDict '((Uint32 '0) (Int16 '"-1"))))
  7. (let commonType (DictType (DataType 'Uint32) (DataType 'Uint64)))
  8. (let imlicitEqualsResult (Exists (StrictCast value commonType)))
  9. (let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
  10. # Dict<Uint32, Uint16>> -> Dict<Uint32, Uint64> (true)
  11. (let value (AsDict '((Uint32 '0) (Uint16 '0))))
  12. (let commonType (DictType (DataType 'Uint32) (DataType 'Uint64)))
  13. (let imlicitEqualsResult (Exists (StrictCast value commonType)))
  14. (let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
  15. (let world (Commit! world res_sink))
  16. (return world)
  17. )