Why would the below query include output from cached_a?
WITH cached_b AS (
SELECT * from ([{"a":1, "b":2}, {"a":1, "b":2}]) AS A
),
cached_a AS (
SELECT 3
)
SELECT * FROM cached_b
Why would the below query include output from cached_a?
WITH cached_b AS (
SELECT * from ([{"a":1, "b":2}, {"a":1, "b":2}]) AS A
),
cached_a AS (
SELECT 3
)
SELECT * FROM cached_b
What version do you have? When I run that with 7.6.0 I get -
It is an issue fixed in 7.6 (you probably won’t be able to view it) MB-52918 Before the issue was addressed all bindings (LET or WITH identifiers) were included in a blanket “*” (“everything”) expansion.
You can avoid it with:
SELECT cached_b FROM cached_b
instead of “*”. (Or of course cached_b.*
etc.)