multiply_limit.sql 844 B

12345678910111213141516171819202122232425262728293031
  1. /* syntax version 1 */
  2. /* postgres can not */
  3. /* dq can not */
  4. /* dqfile can not */
  5. /* yt can not */
  6. pragma warning("disable", "4510");
  7. pragma warning("disable", "1108");
  8. -- single over limit
  9. select YQL::RangeComputeFor(
  10. Struct<x:String, y:String>,
  11. ($row) -> ($row.x IN CAST(ListFromRange(0, 10001) AS List<String>)),
  12. AsTuple(AsAtom("x"), AsAtom("y"))
  13. );
  14. -- multiply over limit
  15. select YQL::RangeComputeFor(
  16. Struct<x:String, y:String>,
  17. ($row) -> ($row.x IN CAST(ListFromRange(0, 101) AS List<String>) and $row.y IN CAST(ListFromRange(0, 101) AS List<String>)),
  18. AsTuple(AsAtom("x"), AsAtom("y"))
  19. );
  20. -- fuzing predicates
  21. -- TODO: currently the result is (-inf, +inf) here. Optimally, it should be [0, +inf)
  22. select YQL::RangeComputeFor(
  23. Struct<x:Int32>,
  24. ($row) -> ($row.x IN ListFromRange(0, 20000)),
  25. AsTuple(AsAtom("x"))
  26. );