github-5536.slt 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 database-issues#5536.
  10. statement ok
  11. CREATE TABLE t0(c0 FLOAT DEFAULT (-1.77794611E9));
  12. statement ok
  13. CREATE TABLE t3(c0 smallint , c1 CHAR(111) , c2 REAL , c3 FLOAT );
  14. statement ok
  15. CREATE TABLE t5(c0 INT );
  16. statement ok
  17. CREATE VIEW v0(c0) AS (SELECT ALL (0.31161855206970124)::VARCHAR FROM t5 WHERE (t5.c0) BETWEEN (t5.c0) AND (t5.c0));
  18. query T multiline
  19. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SELECT
  20. t3.c0, t3.c1, t3.c3, t3.c2
  21. FROM
  22. t0,
  23. v0
  24. FULL OUTER JOIN t3 ON (((-6.2850675E8)>(0.56364256))) IS FALSE
  25. RIGHT OUTER JOIN t5 ON ((- (t5.c0)) BETWEEN (t3.c2) AND (0.15850659265367217)) IS NOT UNKNOWN
  26. WHERE (t3.c1) IN (CAST(((t3.c1)LIKE(v0.c0)) AS VARCHAR));
  27. ----
  28. Explained Query:
  29. Project (#0{c0}, #1{c1}, #3{c3}, #2{c2})
  30. Filter (((integer_to_numeric(#5) <= 0.15850659265367217) AND (integer_to_real(#5) >= #2{c2}))) IS NOT NULL
  31. Map (-(#4{c0}))
  32. CrossJoin type=delta
  33. ArrangeBy keys=[[]]
  34. Project ()
  35. ReadStorage materialize.public.t0
  36. ArrangeBy keys=[[]]
  37. Project ()
  38. Filter (#0{c0} <= #0{c0}) AND (#0{c0} >= #0{c0})
  39. ReadStorage materialize.public.t5
  40. ArrangeBy keys=[[]]
  41. Filter (#1{c1} = text_to_char[len=unbounded](text_to_varchar[len=unbounded](boolean_to_text(like["0.31161855206970124"](padchar(#1{c1}))))))
  42. ReadStorage materialize.public.t3
  43. ArrangeBy keys=[[]]
  44. ReadStorage materialize.public.t5
  45. Source materialize.public.t0
  46. Source materialize.public.t3
  47. filter=((#1{c1} = text_to_char[len=unbounded](text_to_varchar[len=unbounded](boolean_to_text(like["0.31161855206970124"](padchar(#1{c1})))))))
  48. Source materialize.public.t5
  49. Target cluster: quickstart
  50. EOF