yql-12941.sql 501 B

12345678910111213141516171819
  1. /* syntax version 1 */
  2. /* postgres can not */
  3. /* yt can not */
  4. pragma warning("disable", "4510");
  5. $opt_type = Struct<x:UInt32?, y:Int32?>;
  6. $xy_keys = AsTuple(AsAtom("x"), AsAtom("y"));
  7. $range_for = ($pred) -> (YQL::RangeComputeFor($opt_type, $pred, $xy_keys));
  8. $pred1 = ($row) -> (($row.x == 3u and ($row.y > 300 or $row.y == 100)) ?? false);
  9. $pred2 = ($row) -> (($row.y > 300 and $row.x == 3u or $row.x == 3u and $row.y == 100) ?? false);
  10. select
  11. $range_for($pred1),
  12. $range_for($pred2),
  13. ;