github-2666.slt 860 B

1234567891011121314151617181920212223242526
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. # Regression test for https://github.com/MaterializeInc/database-issues/issues/2666
  10. mode cockroach
  11. statement ok
  12. CREATE VIEW t2 (f1, f2) AS VALUES (NULL, 0), (NULL, 0), (1, 1), (2, 2), (2, 2), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8);
  13. query TII rowsort
  14. SELECT true, a1.f1, a2.f1 FROM t2 AS a1 LEFT JOIN (SELECT 8 AS f1, f1 AS f2 FROM t2) AS a2 ON a2.f2 + a2.f1 < 9 GROUP BY 2, 3;
  15. ----
  16. true NULL NULL
  17. true 1 NULL
  18. true 2 NULL
  19. true 4 NULL
  20. true 5 NULL
  21. true 6 NULL
  22. true 7 NULL
  23. true 8 NULL