simple-union.svg 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
  3. "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
  4. <!-- Generated by graphviz version 2.43.0 (0)
  5. -->
  6. <!-- Title: G Pages: 1 -->
  7. <svg width="875pt" height="636pt"
  8. viewBox="0.00 0.00 875.00 635.99" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  9. <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 631.99)">
  10. <title>G</title>
  11. <polygon fill="white" stroke="transparent" points="-4,4 -4,-631.99 871,-631.99 871,4 -4,4"/>
  12. <text text-anchor="middle" x="208.5" y="-7.8" font-family="Times,serif" font-size="14.00">select * from t1 union select * from t2; (before rewrites)</text>
  13. <g id="clust1" class="cluster">
  14. <title>cluster0</title>
  15. <polygon fill="none" stroke="black" points="605,-487.99 605,-619.99 859,-619.99 859,-487.99 605,-487.99"/>
  16. <text text-anchor="middle" x="655.5" y="-604.79" font-family="Times,serif" font-size="14.00">Box0:Select</text>
  17. </g>
  18. <g id="clust3" class="cluster">
  19. <title>cluster5</title>
  20. <polygon fill="none" stroke="black" points="313,-347.99 313,-479.99 802,-479.99 802,-347.99 313,-347.99"/>
  21. <text text-anchor="middle" x="363" y="-464.79" font-family="Times,serif" font-size="14.00">Box5:Union</text>
  22. </g>
  23. <g id="clust5" class="cluster">
  24. <title>cluster3</title>
  25. <polygon fill="none" stroke="black" points="334,-171 334,-339.99 644,-339.99 644,-171 334,-171"/>
  26. <text text-anchor="middle" x="384.5" y="-324.79" font-family="Times,serif" font-size="14.00">Box3:Select</text>
  27. </g>
  28. <g id="clust7" class="cluster">
  29. <title>cluster4</title>
  30. <polygon fill="none" stroke="black" points="326,-31 326,-163 488,-163 488,-31 326,-31"/>
  31. <text text-anchor="middle" x="402" y="-147.8" font-family="Times,serif" font-size="14.00">Box4:BaseTable T2</text>
  32. </g>
  33. <g id="clust9" class="cluster">
  34. <title>cluster1</title>
  35. <polygon fill="none" stroke="black" points="16,-171 16,-339.99 326,-339.99 326,-171 16,-171"/>
  36. <text text-anchor="middle" x="66.5" y="-324.79" font-family="Times,serif" font-size="14.00">Box1:Select</text>
  37. </g>
  38. <g id="clust11" class="cluster">
  39. <title>cluster2</title>
  40. <polygon fill="none" stroke="black" points="8,-31 8,-163 170,-163 170,-31 8,-31"/>
  41. <text text-anchor="middle" x="84" y="-147.8" font-family="Times,serif" font-size="14.00">Box2:BaseTable T1</text>
  42. </g>
  43. <!-- boxhead0 -->
  44. <g id="node1" class="node">
  45. <title>boxhead0</title>
  46. <polygon fill="none" stroke="black" points="705,-496.49 705,-588.49 851,-588.49 851,-496.49 705,-496.49"/>
  47. <text text-anchor="middle" x="778" y="-573.29" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  48. <polyline fill="none" stroke="black" points="705,-565.49 851,-565.49 "/>
  49. <text text-anchor="middle" x="778" y="-550.29" font-family="Times,serif" font-size="14.00">0: Q4.c0 as F1</text>
  50. <polyline fill="none" stroke="black" points="705,-542.49 851,-542.49 "/>
  51. <text text-anchor="middle" x="778" y="-527.29" font-family="Times,serif" font-size="14.00">1: Q4.c1 as F2</text>
  52. <polyline fill="none" stroke="black" points="705,-519.49 851,-519.49 "/>
  53. <text text-anchor="middle" x="778" y="-504.29" font-family="Times,serif" font-size="14.00">2: Q4.c2 as F3</text>
  54. </g>
  55. <!-- Q4 -->
  56. <g id="node2" class="node">
  57. <title>Q4</title>
  58. <ellipse fill="none" stroke="black" cx="650" cy="-542.49" rx="37.09" ry="37.09"/>
  59. <text text-anchor="middle" x="650" y="-538.79" font-family="Times,serif" font-size="14.00">Q4(F)</text>
  60. </g>
  61. <!-- boxhead5 -->
  62. <g id="node3" class="node">
  63. <title>boxhead5</title>
  64. <polygon fill="none" stroke="black" points="505.5,-356.49 505.5,-448.49 794.5,-448.49 794.5,-356.49 505.5,-356.49"/>
  65. <text text-anchor="middle" x="650" y="-433.29" font-family="Times,serif" font-size="14.00">Distinct: Enforce</text>
  66. <polyline fill="none" stroke="black" points="505.5,-425.49 794.5,-425.49 "/>
  67. <text text-anchor="middle" x="650" y="-410.29" font-family="Times,serif" font-size="14.00">0: Q2.c0 as F1</text>
  68. <polyline fill="none" stroke="black" points="505.5,-402.49 794.5,-402.49 "/>
  69. <text text-anchor="middle" x="650" y="-387.29" font-family="Times,serif" font-size="14.00">1: Q2.c1 as F2</text>
  70. <polyline fill="none" stroke="black" points="505.5,-379.49 794.5,-379.49 "/>
  71. <text text-anchor="middle" x="650" y="-364.29" font-family="Times,serif" font-size="14.00">2: Q2.c2 as F3</text>
  72. </g>
  73. <!-- Q4&#45;&gt;boxhead5 -->
  74. <g id="edge1" class="edge">
  75. <title>Q4&#45;&gt;boxhead5</title>
  76. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M650,-505.23C650,-497.36 650,-488.76 650,-479.99"/>
  77. </g>
  78. <!-- Q2 -->
  79. <g id="node4" class="node">
  80. <title>Q2</title>
  81. <ellipse fill="none" stroke="black" cx="358" cy="-402.49" rx="37.09" ry="37.09"/>
  82. <text text-anchor="middle" x="358" y="-398.79" font-family="Times,serif" font-size="14.00">Q2(F)</text>
  83. </g>
  84. <!-- boxhead1 -->
  85. <g id="node9" class="node">
  86. <title>boxhead1</title>
  87. <polygon fill="none" stroke="black" points="172,-197.99 172,-289.99 318,-289.99 318,-197.99 172,-197.99"/>
  88. <text text-anchor="middle" x="245" y="-274.79" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  89. <polyline fill="none" stroke="black" points="172,-266.99 318,-266.99 "/>
  90. <text text-anchor="middle" x="245" y="-251.79" font-family="Times,serif" font-size="14.00">0: Q0.c0 as F1</text>
  91. <polyline fill="none" stroke="black" points="172,-243.99 318,-243.99 "/>
  92. <text text-anchor="middle" x="245" y="-228.79" font-family="Times,serif" font-size="14.00">1: Q0.c1 as F2</text>
  93. <polyline fill="none" stroke="black" points="172,-220.99 318,-220.99 "/>
  94. <text text-anchor="middle" x="245" y="-205.79" font-family="Times,serif" font-size="14.00">2: Q0.c2 as F3</text>
  95. </g>
  96. <!-- Q2&#45;&gt;boxhead1 -->
  97. <g id="edge2" class="edge">
  98. <title>Q2&#45;&gt;boxhead1</title>
  99. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M336.75,-372.05C329.91,-362.59 321.94,-351.55 313.59,-339.99"/>
  100. </g>
  101. <!-- Q3 -->
  102. <g id="node5" class="node">
  103. <title>Q3</title>
  104. <ellipse fill="none" stroke="black" cx="450" cy="-402.49" rx="37.09" ry="37.09"/>
  105. <text text-anchor="middle" x="450" y="-398.79" font-family="Times,serif" font-size="14.00">Q3(F)</text>
  106. </g>
  107. <!-- boxhead3 -->
  108. <g id="node6" class="node">
  109. <title>boxhead3</title>
  110. <polygon fill="none" stroke="black" points="490,-197.99 490,-289.99 636,-289.99 636,-197.99 490,-197.99"/>
  111. <text text-anchor="middle" x="563" y="-274.79" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  112. <polyline fill="none" stroke="black" points="490,-266.99 636,-266.99 "/>
  113. <text text-anchor="middle" x="563" y="-251.79" font-family="Times,serif" font-size="14.00">0: Q1.c0 as F1</text>
  114. <polyline fill="none" stroke="black" points="490,-243.99 636,-243.99 "/>
  115. <text text-anchor="middle" x="563" y="-228.79" font-family="Times,serif" font-size="14.00">1: Q1.c1 as F2</text>
  116. <polyline fill="none" stroke="black" points="490,-220.99 636,-220.99 "/>
  117. <text text-anchor="middle" x="563" y="-205.79" font-family="Times,serif" font-size="14.00">2: Q1.c2 as F3</text>
  118. </g>
  119. <!-- Q3&#45;&gt;boxhead3 -->
  120. <g id="edge3" class="edge">
  121. <title>Q3&#45;&gt;boxhead3</title>
  122. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M471.25,-372.05C478.09,-362.59 486.06,-351.55 494.41,-339.99"/>
  123. </g>
  124. <!-- Q1 -->
  125. <g id="node7" class="node">
  126. <title>Q1</title>
  127. <ellipse fill="none" stroke="black" cx="407" cy="-243.99" rx="64.99" ry="64.99"/>
  128. <text text-anchor="middle" x="407" y="-240.29" font-family="Times,serif" font-size="14.00">Q1(F) as T2</text>
  129. </g>
  130. <!-- boxhead4 -->
  131. <g id="node8" class="node">
  132. <title>boxhead4</title>
  133. <polygon fill="none" stroke="black" points="334,-39.5 334,-131.5 480,-131.5 480,-39.5 334,-39.5"/>
  134. <text text-anchor="middle" x="407" y="-116.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  135. <polyline fill="none" stroke="black" points="334,-108.5 480,-108.5 "/>
  136. <text text-anchor="middle" x="407" y="-93.3" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  137. <polyline fill="none" stroke="black" points="334,-85.5 480,-85.5 "/>
  138. <text text-anchor="middle" x="407" y="-70.3" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  139. <polyline fill="none" stroke="black" points="334,-62.5 480,-62.5 "/>
  140. <text text-anchor="middle" x="407" y="-47.3" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  141. </g>
  142. <!-- Q1&#45;&gt;boxhead4 -->
  143. <g id="edge4" class="edge">
  144. <title>Q1&#45;&gt;boxhead4</title>
  145. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M407,-178.89C407,-173.65 407,-168.32 407,-163"/>
  146. </g>
  147. <!-- Q0 -->
  148. <g id="node10" class="node">
  149. <title>Q0</title>
  150. <ellipse fill="none" stroke="black" cx="89" cy="-243.99" rx="64.99" ry="64.99"/>
  151. <text text-anchor="middle" x="89" y="-240.29" font-family="Times,serif" font-size="14.00">Q0(F) as T1</text>
  152. </g>
  153. <!-- boxhead2 -->
  154. <g id="node11" class="node">
  155. <title>boxhead2</title>
  156. <polygon fill="none" stroke="black" points="16,-39.5 16,-131.5 162,-131.5 162,-39.5 16,-39.5"/>
  157. <text text-anchor="middle" x="89" y="-116.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  158. <polyline fill="none" stroke="black" points="16,-108.5 162,-108.5 "/>
  159. <text text-anchor="middle" x="89" y="-93.3" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  160. <polyline fill="none" stroke="black" points="16,-85.5 162,-85.5 "/>
  161. <text text-anchor="middle" x="89" y="-70.3" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  162. <polyline fill="none" stroke="black" points="16,-62.5 162,-62.5 "/>
  163. <text text-anchor="middle" x="89" y="-47.3" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  164. </g>
  165. <!-- Q0&#45;&gt;boxhead2 -->
  166. <g id="edge5" class="edge">
  167. <title>Q0&#45;&gt;boxhead2</title>
  168. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M89,-178.89C89,-173.65 89,-168.32 89,-163"/>
  169. </g>
  170. </g>
  171. </svg>