github-2799.slt 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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/2799
  10. mode cockroach
  11. statement ok
  12. create table t1(f1 int, f2 int);
  13. query T multiline
  14. EXPLAIN OPTIMIZED PLAN WITH(humanized expressions, arity, join implementations) AS VERBOSE TEXT FOR SELECT * FROM t1 WHERE 1 in (SELECT 1 FROM (VALUES (0)) CONSTANT WHERE f1 > 1);
  15. ----
  16. Explained Query:
  17. Project (#0{f1}, #1{f2}) // { arity: 2 }
  18. Join on=(#0{f1} = #2{f1}) type=differential // { arity: 3 }
  19. implementation
  20. %1[#0]UKA » %0:t1[#0]K
  21. ArrangeBy keys=[[#0{f1}]] // { arity: 2 }
  22. ReadStorage materialize.public.t1 // { arity: 2 }
  23. ArrangeBy keys=[[#0{f1}]] // { arity: 1 }
  24. Distinct project=[#0{f1}] // { arity: 1 }
  25. Project (#0{f1}) // { arity: 1 }
  26. Filter (#0{f1} > 1) // { arity: 2 }
  27. ReadStorage materialize.public.t1 // { arity: 2 }
  28. Source materialize.public.t1
  29. Target cluster: quickstart
  30. EOF
  31. query T multiline
  32. EXPLAIN OPTIMIZED PLAN WITH(humanized expressions, arity, join implementations) AS VERBOSE TEXT FOR SELECT jsonb_array_elements('[1,2,3]'::jsonb);
  33. ----
  34. Explained Query (fast path):
  35. Constant
  36. - (1)
  37. - (2)
  38. - (3)
  39. Target cluster: quickstart
  40. EOF