cluster_features.slt 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  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. # Test the ability to catch plan changes using the `enable eager delta joins`
  10. # config flag in EXPLAIN. This test can be deleted when the feature flag is
  11. # removed.
  12. mode cockroach
  13. # Role-based restrictions
  14. # -----------------------------------------------------------
  15. # Regular users cannot create clusters with FEATURES yet.
  16. statement error db error: ERROR: FEATURES not supported for non\-system users
  17. CREATE CLUSTER FOO SIZE = '1' FEATURES (ENABLE EAGER DELTA JOINS = TRUE);
  18. # Cluster and system config for the test DDL statements below
  19. # -----------------------------------------------------------
  20. simple conn=mz_system,user=mz_system
  21. CREATE CLUSTER c1 SIZE = '1' FEATURES (ENABLE EAGER DELTA JOINS = TRUE);
  22. ----
  23. COMPLETE 0
  24. simple conn=mz_system,user=mz_system
  25. CREATE CLUSTER c2 SIZE = '1' FEATURES (ENABLE EAGER DELTA JOINS = FALSE);
  26. ----
  27. COMPLETE 0
  28. simple conn=mz_system,user=mz_system
  29. GRANT ALL ON CLUSTER c1 TO materialize;
  30. ----
  31. COMPLETE 0
  32. simple conn=mz_system,user=mz_system
  33. GRANT ALL ON CLUSTER c2 TO materialize;
  34. ----
  35. COMPLETE 0
  36. # Schema for the test DDL statements below
  37. # ----------------------------------------
  38. statement ok
  39. CREATE TABLE t1 (
  40. x int,
  41. y int
  42. );
  43. statement ok
  44. CREATE TABLE t2 (
  45. x int,
  46. y int
  47. );
  48. statement ok
  49. CREATE TABLE t3 (
  50. x int,
  51. y int
  52. );
  53. # Test materialized views
  54. # -----------------------
  55. # Should be created with the feature flag turned on.
  56. statement ok
  57. CREATE MATERIALIZED VIEW mv1 IN CLUSTER c1 AS
  58. SELECT
  59. t1.y as f1,
  60. t2.y as f2,
  61. t3.y as f3
  62. FROM
  63. t1, t2, t3
  64. where
  65. t1.x = t2.x AND
  66. t2.y = t3.y;
  67. # Should be created with the feature flag turned off.
  68. statement ok
  69. CREATE MATERIALIZED VIEW mv2 IN CLUSTER c2 AS
  70. SELECT
  71. t1.y as f1,
  72. t2.y as f2,
  73. t3.y as f3
  74. FROM
  75. t1, t2, t3
  76. where
  77. t1.x = t2.x AND
  78. t2.y = t3.y;
  79. # EXPLAIN mv1 in c1 (should be running with the feature flag turned on).
  80. query T multiline
  81. EXPLAIN OPTIMIZED PLAN WITH(JOIN IMPLEMENTATIONS, HUMANIZED EXPRESSIONS) AS VERBOSE TEXT FOR
  82. MATERIALIZED VIEW mv1;
  83. ----
  84. materialize.public.mv1:
  85. Project (#1{y}, #3{y}, #3{y})
  86. Join on=(#0{x} = #2{x} AND #3{y} = #4{y}) type=delta
  87. implementation
  88. %0:t1 » %1:t2[#0{x}]K » %2:t3[#0{y}]K
  89. %1:t2 » %0:t1[#0{x}]K » %2:t3[#0{y}]K
  90. %2:t3 » %1:t2[#1{y}]K » %0:t1[#0{x}]K
  91. ArrangeBy keys=[[#0{x}]]
  92. Filter (#0{x}) IS NOT NULL
  93. ReadStorage materialize.public.t1
  94. ArrangeBy keys=[[#0{x}], [#1{y}]]
  95. Filter (#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL
  96. ReadStorage materialize.public.t2
  97. ArrangeBy keys=[[#0{y}]]
  98. Project (#1{y})
  99. Filter (#1{y}) IS NOT NULL
  100. ReadStorage materialize.public.t3
  101. Source materialize.public.t1
  102. filter=((#0{x}) IS NOT NULL)
  103. Source materialize.public.t2
  104. filter=((#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL)
  105. Source materialize.public.t3
  106. filter=((#1{y}) IS NOT NULL)
  107. Target cluster: c1
  108. EOF
  109. # EXPLAIN mv2 in c2 (should be running with the feature flag turned off).
  110. query T multiline
  111. EXPLAIN OPTIMIZED PLAN WITH(JOIN IMPLEMENTATIONS, HUMANIZED EXPRESSIONS) AS VERBOSE TEXT FOR
  112. MATERIALIZED VIEW mv2;
  113. ----
  114. materialize.public.mv2:
  115. Project (#1{y}, #3{y}, #3{y})
  116. Join on=(#0{x} = #2{x} AND #3{y} = #4{y}) type=differential
  117. implementation
  118. %0:t1[#0{x}]K » %1:t2[#0{x}]K » %2:t3[#0{y}]K
  119. ArrangeBy keys=[[#0{x}]]
  120. Filter (#0{x}) IS NOT NULL
  121. ReadStorage materialize.public.t1
  122. ArrangeBy keys=[[#0{x}]]
  123. Filter (#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL
  124. ReadStorage materialize.public.t2
  125. ArrangeBy keys=[[#0{y}]]
  126. Project (#1{y})
  127. Filter (#1{y}) IS NOT NULL
  128. ReadStorage materialize.public.t3
  129. Source materialize.public.t1
  130. filter=((#0{x}) IS NOT NULL)
  131. Source materialize.public.t2
  132. filter=((#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL)
  133. Source materialize.public.t3
  134. filter=((#1{y}) IS NOT NULL)
  135. Target cluster: c2
  136. EOF
  137. # EXPLAIN REPLAN mv1 in c1 (should be running with the feature flag turned on).
  138. query T multiline
  139. EXPLAIN OPTIMIZED PLAN WITH(JOIN IMPLEMENTATIONS, HUMANIZED EXPRESSIONS) AS VERBOSE TEXT FOR
  140. REPLAN MATERIALIZED VIEW mv1;
  141. ----
  142. materialize.public.mv1:
  143. Project (#1{y}, #3{y}, #3{y})
  144. Join on=(#0{x} = #2{x} AND #3{y} = #4{y}) type=delta
  145. implementation
  146. %0:t1 » %1:t2[#0{x}]K » %2:t3[#0{y}]K
  147. %1:t2 » %0:t1[#0{x}]K » %2:t3[#0{y}]K
  148. %2:t3 » %1:t2[#1{y}]K » %0:t1[#0{x}]K
  149. ArrangeBy keys=[[#0{x}]]
  150. Filter (#0{x}) IS NOT NULL
  151. ReadStorage materialize.public.t1
  152. ArrangeBy keys=[[#0{x}], [#1{y}]]
  153. Filter (#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL
  154. ReadStorage materialize.public.t2
  155. ArrangeBy keys=[[#0{y}]]
  156. Project (#1{y})
  157. Filter (#1{y}) IS NOT NULL
  158. ReadStorage materialize.public.t3
  159. Source materialize.public.t1
  160. filter=((#0{x}) IS NOT NULL)
  161. Source materialize.public.t2
  162. filter=((#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL)
  163. Source materialize.public.t3
  164. filter=((#1{y}) IS NOT NULL)
  165. Target cluster: c1
  166. EOF
  167. # EXPLAIN REPLAN mv1 in c1 with an explain-level feature override (should be
  168. # running with the feature flag turned off).
  169. query T multiline
  170. EXPLAIN OPTIMIZED PLAN WITH(JOIN IMPLEMENTATIONS, HUMANIZED EXPRESSIONS, ENABLE EAGER DELTA JOINS = FALSE) AS VERBOSE TEXT FOR
  171. REPLAN MATERIALIZED VIEW mv1;
  172. ----
  173. materialize.public.mv1:
  174. Project (#1{y}, #3{y}, #3{y})
  175. Join on=(#0{x} = #2{x} AND #3{y} = #4{y}) type=differential
  176. implementation
  177. %0:t1[#0{x}]K » %1:t2[#0{x}]K » %2:t3[#0{y}]K
  178. ArrangeBy keys=[[#0{x}]]
  179. Filter (#0{x}) IS NOT NULL
  180. ReadStorage materialize.public.t1
  181. ArrangeBy keys=[[#0{x}]]
  182. Filter (#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL
  183. ReadStorage materialize.public.t2
  184. ArrangeBy keys=[[#0{y}]]
  185. Project (#1{y})
  186. Filter (#1{y}) IS NOT NULL
  187. ReadStorage materialize.public.t3
  188. Source materialize.public.t1
  189. filter=((#0{x}) IS NOT NULL)
  190. Source materialize.public.t2
  191. filter=((#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL)
  192. Source materialize.public.t3
  193. filter=((#1{y}) IS NOT NULL)
  194. Target cluster: c1
  195. EOF
  196. # EXPLAIN CREATE in c1 with an explain-level feature override (should be
  197. # running with the feature flag turned off).
  198. query T multiline
  199. EXPLAIN OPTIMIZED PLAN WITH(JOIN IMPLEMENTATIONS, HUMANIZED EXPRESSIONS, ENABLE EAGER DELTA JOINS = FALSE) AS VERBOSE TEXT FOR
  200. CREATE MATERIALIZED VIEW mv1 IN CLUSTER c1 AS
  201. SELECT
  202. t1.y as f1,
  203. t2.y as f2,
  204. t3.y as f3
  205. FROM
  206. t1, t2, t3
  207. where
  208. t1.x = t2.x AND
  209. t2.y = t3.y;
  210. ----
  211. materialize.public.mv1:
  212. Project (#1{y}, #3{y}, #3{y})
  213. Join on=(#0{x} = #2{x} AND #3{y} = #4{y}) type=differential
  214. implementation
  215. %0:t1[#0{x}]K » %1:t2[#0{x}]K » %2:t3[#0{y}]K
  216. ArrangeBy keys=[[#0{x}]]
  217. Filter (#0{x}) IS NOT NULL
  218. ReadStorage materialize.public.t1
  219. ArrangeBy keys=[[#0{x}]]
  220. Filter (#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL
  221. ReadStorage materialize.public.t2
  222. ArrangeBy keys=[[#0{y}]]
  223. Project (#1{y})
  224. Filter (#1{y}) IS NOT NULL
  225. ReadStorage materialize.public.t3
  226. Source materialize.public.t1
  227. filter=((#0{x}) IS NOT NULL)
  228. Source materialize.public.t2
  229. filter=((#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL)
  230. Source materialize.public.t3
  231. filter=((#1{y}) IS NOT NULL)
  232. Target cluster: c1
  233. EOF
  234. # Test indexed views
  235. # ------------------
  236. # Same as the mv1 / mv2 definitions above.
  237. statement ok
  238. CREATE VIEW v AS
  239. SELECT
  240. t1.y as f1,
  241. t2.y as f2,
  242. t3.y as f3
  243. FROM
  244. t1, t2, t3
  245. where
  246. t1.x = t2.x AND
  247. t2.y = t3.y;
  248. statement ok
  249. CREATE INDEX v_idx_in_c1 IN CLUSTER c1 ON v(f1);
  250. statement ok
  251. CREATE INDEX v_idx_in_c2 IN CLUSTER c2 ON v(f1);
  252. # EXPLAIN v in c2 (should be running with the feature flag turned on).
  253. query T multiline
  254. EXPLAIN OPTIMIZED PLAN WITH(JOIN IMPLEMENTATIONS, HUMANIZED EXPRESSIONS) AS VERBOSE TEXT FOR
  255. INDEX v_idx_in_c1;
  256. ----
  257. materialize.public.v_idx_in_c1:
  258. ArrangeBy keys=[[#0{f1}]]
  259. ReadGlobalFromSameDataflow materialize.public.v
  260. materialize.public.v:
  261. Project (#1{y}, #3{y}, #3{y})
  262. Join on=(#0{x} = #2{x} AND #3{y} = #4{y}) type=delta
  263. implementation
  264. %0:t1 » %1:t2[#0{x}]K » %2:t3[#0{y}]K
  265. %1:t2 » %0:t1[#0{x}]K » %2:t3[#0{y}]K
  266. %2:t3 » %1:t2[#1{y}]K » %0:t1[#0{x}]K
  267. ArrangeBy keys=[[#0{x}]]
  268. Filter (#0{x}) IS NOT NULL
  269. ReadStorage materialize.public.t1
  270. ArrangeBy keys=[[#0{x}], [#1{y}]]
  271. Filter (#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL
  272. ReadStorage materialize.public.t2
  273. ArrangeBy keys=[[#0{y}]]
  274. Project (#1{y})
  275. Filter (#1{y}) IS NOT NULL
  276. ReadStorage materialize.public.t3
  277. Source materialize.public.t1
  278. filter=((#0{x}) IS NOT NULL)
  279. Source materialize.public.t2
  280. filter=((#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL)
  281. Source materialize.public.t3
  282. filter=((#1{y}) IS NOT NULL)
  283. Target cluster: c1
  284. EOF
  285. # EXPLAIN v in c2 (should be running with the feature flag turned off).
  286. query T multiline
  287. EXPLAIN OPTIMIZED PLAN WITH(JOIN IMPLEMENTATIONS, HUMANIZED EXPRESSIONS) AS VERBOSE TEXT FOR
  288. INDEX v_idx_in_c2;
  289. ----
  290. materialize.public.v_idx_in_c2:
  291. ArrangeBy keys=[[#0{f1}]]
  292. ReadGlobalFromSameDataflow materialize.public.v
  293. materialize.public.v:
  294. Project (#1{y}, #3{y}, #3{y})
  295. Join on=(#0{x} = #2{x} AND #3{y} = #4{y}) type=differential
  296. implementation
  297. %0:t1[#0{x}]K » %1:t2[#0{x}]K » %2:t3[#0{y}]K
  298. ArrangeBy keys=[[#0{x}]]
  299. Filter (#0{x}) IS NOT NULL
  300. ReadStorage materialize.public.t1
  301. ArrangeBy keys=[[#0{x}]]
  302. Filter (#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL
  303. ReadStorage materialize.public.t2
  304. ArrangeBy keys=[[#0{y}]]
  305. Project (#1{y})
  306. Filter (#1{y}) IS NOT NULL
  307. ReadStorage materialize.public.t3
  308. Source materialize.public.t1
  309. filter=((#0{x}) IS NOT NULL)
  310. Source materialize.public.t2
  311. filter=((#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL)
  312. Source materialize.public.t3
  313. filter=((#1{y}) IS NOT NULL)
  314. Target cluster: c2
  315. EOF
  316. # EXPLAIN REPLAN v in c1 (should be running with the feature flag turned on).
  317. query T multiline
  318. EXPLAIN OPTIMIZED PLAN WITH(JOIN IMPLEMENTATIONS, HUMANIZED EXPRESSIONS) AS VERBOSE TEXT FOR
  319. REPLAN INDEX v_idx_in_c1;
  320. ----
  321. materialize.public.v_idx_in_c1:
  322. ArrangeBy keys=[[#0{f1}]]
  323. ReadGlobalFromSameDataflow materialize.public.v
  324. materialize.public.v:
  325. Project (#1{y}, #3{y}, #3{y})
  326. Join on=(#0{x} = #2{x} AND #3{y} = #4{y}) type=delta
  327. implementation
  328. %0:t1 » %1:t2[#0{x}]K » %2:t3[#0{y}]K
  329. %1:t2 » %0:t1[#0{x}]K » %2:t3[#0{y}]K
  330. %2:t3 » %1:t2[#1{y}]K » %0:t1[#0{x}]K
  331. ArrangeBy keys=[[#0{x}]]
  332. Filter (#0{x}) IS NOT NULL
  333. ReadStorage materialize.public.t1
  334. ArrangeBy keys=[[#0{x}], [#1{y}]]
  335. Filter (#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL
  336. ReadStorage materialize.public.t2
  337. ArrangeBy keys=[[#0{y}]]
  338. Project (#1{y})
  339. Filter (#1{y}) IS NOT NULL
  340. ReadStorage materialize.public.t3
  341. Source materialize.public.t1
  342. filter=((#0{x}) IS NOT NULL)
  343. Source materialize.public.t2
  344. filter=((#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL)
  345. Source materialize.public.t3
  346. filter=((#1{y}) IS NOT NULL)
  347. Target cluster: c1
  348. EOF
  349. # EXPLAIN REPLAN v in c1 with an explain-level feature override (should be
  350. # running with the feature flag turned off).
  351. query T multiline
  352. EXPLAIN OPTIMIZED PLAN WITH(JOIN IMPLEMENTATIONS, HUMANIZED EXPRESSIONS, ENABLE EAGER DELTA JOINS = FALSE) AS VERBOSE TEXT FOR
  353. REPLAN INDEX v_idx_in_c1;
  354. ----
  355. materialize.public.v_idx_in_c1:
  356. ArrangeBy keys=[[#0{f1}]]
  357. ReadGlobalFromSameDataflow materialize.public.v
  358. materialize.public.v:
  359. Project (#1{y}, #3{y}, #3{y})
  360. Join on=(#0{x} = #2{x} AND #3{y} = #4{y}) type=differential
  361. implementation
  362. %0:t1[#0{x}]K » %1:t2[#0{x}]K » %2:t3[#0{y}]K
  363. ArrangeBy keys=[[#0{x}]]
  364. Filter (#0{x}) IS NOT NULL
  365. ReadStorage materialize.public.t1
  366. ArrangeBy keys=[[#0{x}]]
  367. Filter (#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL
  368. ReadStorage materialize.public.t2
  369. ArrangeBy keys=[[#0{y}]]
  370. Project (#1{y})
  371. Filter (#1{y}) IS NOT NULL
  372. ReadStorage materialize.public.t3
  373. Source materialize.public.t1
  374. filter=((#0{x}) IS NOT NULL)
  375. Source materialize.public.t2
  376. filter=((#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL)
  377. Source materialize.public.t3
  378. filter=((#1{y}) IS NOT NULL)
  379. Target cluster: c1
  380. EOF
  381. # Delete the existing index in order to get the expected output in the next
  382. # test.
  383. statement ok
  384. DROP INDEX v_idx_in_c1;
  385. # EXPLAIN CREATE in c1 with an explain-level feature override (should be
  386. # running with the feature flag turned off).
  387. query T multiline
  388. EXPLAIN OPTIMIZED PLAN WITH(JOIN IMPLEMENTATIONS, HUMANIZED EXPRESSIONS, ENABLE EAGER DELTA JOINS = FALSE) AS VERBOSE TEXT FOR
  389. CREATE INDEX v_idx_in_c1 IN CLUSTER c1 ON v(f1);
  390. ----
  391. materialize.public.v_idx_in_c1:
  392. ArrangeBy keys=[[#0{f1}]]
  393. ReadGlobalFromSameDataflow materialize.public.v
  394. materialize.public.v:
  395. Project (#1{y}, #3{y}, #3{y})
  396. Join on=(#0{x} = #2{x} AND #3{y} = #4{y}) type=differential
  397. implementation
  398. %0:t1[#0{x}]K » %1:t2[#0{x}]K » %2:t3[#0{y}]K
  399. ArrangeBy keys=[[#0{x}]]
  400. Filter (#0{x}) IS NOT NULL
  401. ReadStorage materialize.public.t1
  402. ArrangeBy keys=[[#0{x}]]
  403. Filter (#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL
  404. ReadStorage materialize.public.t2
  405. ArrangeBy keys=[[#0{y}]]
  406. Project (#1{y})
  407. Filter (#1{y}) IS NOT NULL
  408. ReadStorage materialize.public.t3
  409. Source materialize.public.t1
  410. filter=((#0{x}) IS NOT NULL)
  411. Source materialize.public.t2
  412. filter=((#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL)
  413. Source materialize.public.t3
  414. filter=((#1{y}) IS NOT NULL)
  415. Target cluster: c1
  416. EOF
  417. # Test peeks
  418. # ----------
  419. statement ok
  420. SET cluster = c1;
  421. # EXPLAIN in c1 (should be running with the feature flag turned on).
  422. query T multiline
  423. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR
  424. SELECT
  425. t1.y as f1,
  426. t2.y as f2,
  427. t3.y as f3
  428. FROM
  429. t1, t2, t3
  430. where
  431. t1.x = t2.x AND
  432. t2.y = t3.y;
  433. ----
  434. Explained Query:
  435. Project (#1{y}, #3{y}, #3{y})
  436. Join on=(#0{x} = #2{x} AND #3{y} = #4{y}) type=delta
  437. ArrangeBy keys=[[#0{x}]]
  438. Filter (#0{x}) IS NOT NULL
  439. ReadStorage materialize.public.t1
  440. ArrangeBy keys=[[#0{x}], [#1{y}]]
  441. Filter (#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL
  442. ReadStorage materialize.public.t2
  443. ArrangeBy keys=[[#0{y}]]
  444. Project (#1{y})
  445. Filter (#1{y}) IS NOT NULL
  446. ReadStorage materialize.public.t3
  447. Source materialize.public.t1
  448. filter=((#0{x}) IS NOT NULL)
  449. Source materialize.public.t2
  450. filter=((#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL)
  451. Source materialize.public.t3
  452. filter=((#1{y}) IS NOT NULL)
  453. Target cluster: c1
  454. EOF
  455. statement ok
  456. SET cluster = c2;
  457. # EXPLAIN in c2 (should be running with the feature flag turned off).
  458. query T multiline
  459. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR
  460. SELECT
  461. t1.y as f1,
  462. t2.y as f2,
  463. t3.y as f3
  464. FROM
  465. t1, t2, t3
  466. where
  467. t1.x = t2.x AND
  468. t2.y = t3.y;
  469. ----
  470. Explained Query:
  471. Project (#1{y}, #3{y}, #3{y})
  472. Join on=(#0{x} = #2{x} AND #3{y} = #4{y}) type=differential
  473. ArrangeBy keys=[[#0{x}]]
  474. Filter (#0{x}) IS NOT NULL
  475. ReadStorage materialize.public.t1
  476. ArrangeBy keys=[[#0{x}]]
  477. Filter (#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL
  478. ReadStorage materialize.public.t2
  479. ArrangeBy keys=[[#0{y}]]
  480. Project (#1{y})
  481. Filter (#1{y}) IS NOT NULL
  482. ReadStorage materialize.public.t3
  483. Source materialize.public.t1
  484. filter=((#0{x}) IS NOT NULL)
  485. Source materialize.public.t2
  486. filter=((#0{x}) IS NOT NULL AND (#1{y}) IS NOT NULL)
  487. Source materialize.public.t3
  488. filter=((#1{y}) IS NOT NULL)
  489. Target cluster: c2
  490. EOF