simple-right-join.svg 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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="742pt" height="619pt"
  8. viewBox="0.00 0.00 742.00 619.00" 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 615)">
  10. <title>G</title>
  11. <polygon fill="white" stroke="transparent" points="-4,4 -4,-615 738,-615 738,4 -4,4"/>
  12. <text text-anchor="middle" x="231" y="-7.8" font-family="Times,serif" font-size="14.00">select * from t1 right join t2 on t1.f1 = t2.f2; (before rewrites)</text>
  13. <g id="clust1" class="cluster">
  14. <title>cluster0</title>
  15. <polygon fill="none" stroke="black" points="472,-402 472,-603 726,-603 726,-402 472,-402"/>
  16. <text text-anchor="middle" x="522.5" y="-587.8" font-family="Times,serif" font-size="14.00">Box0:Select</text>
  17. </g>
  18. <g id="clust3" class="cluster">
  19. <title>cluster1</title>
  20. <polygon fill="none" stroke="black" points="16,-182 16,-383 598,-383 598,-182 16,-182"/>
  21. <text text-anchor="middle" x="78.5" y="-367.8" font-family="Times,serif" font-size="14.00">Box1:OuterJoin</text>
  22. </g>
  23. <g id="clust5" class="cluster">
  24. <title>cluster3</title>
  25. <polygon fill="none" stroke="black" points="280,-31 280,-163 442,-163 442,-31 280,-31"/>
  26. <text text-anchor="middle" x="356" y="-147.8" font-family="Times,serif" font-size="14.00">Box3:BaseTable T2</text>
  27. </g>
  28. <g id="clust7" class="cluster">
  29. <title>cluster2</title>
  30. <polygon fill="none" stroke="black" points="8,-31 8,-163 170,-163 170,-31 8,-31"/>
  31. <text text-anchor="middle" x="84" y="-147.8" font-family="Times,serif" font-size="14.00">Box2:BaseTable T1</text>
  32. </g>
  33. <!-- boxhead0 -->
  34. <g id="node1" class="node">
  35. <title>boxhead0</title>
  36. <polygon fill="none" stroke="black" points="572,-410.5 572,-571.5 718,-571.5 718,-410.5 572,-410.5"/>
  37. <text text-anchor="middle" x="645" y="-556.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  38. <polyline fill="none" stroke="black" points="572,-548.5 718,-548.5 "/>
  39. <text text-anchor="middle" x="645" y="-533.3" font-family="Times,serif" font-size="14.00">0: Q2.c0 as F1</text>
  40. <polyline fill="none" stroke="black" points="572,-525.5 718,-525.5 "/>
  41. <text text-anchor="middle" x="645" y="-510.3" font-family="Times,serif" font-size="14.00">1: Q2.c1 as F2</text>
  42. <polyline fill="none" stroke="black" points="572,-502.5 718,-502.5 "/>
  43. <text text-anchor="middle" x="645" y="-487.3" font-family="Times,serif" font-size="14.00">2: Q2.c2 as F3</text>
  44. <polyline fill="none" stroke="black" points="572,-479.5 718,-479.5 "/>
  45. <text text-anchor="middle" x="645" y="-464.3" font-family="Times,serif" font-size="14.00">3: Q2.c3 as F1</text>
  46. <polyline fill="none" stroke="black" points="572,-456.5 718,-456.5 "/>
  47. <text text-anchor="middle" x="645" y="-441.3" font-family="Times,serif" font-size="14.00">4: Q2.c4 as F2</text>
  48. <polyline fill="none" stroke="black" points="572,-433.5 718,-433.5 "/>
  49. <text text-anchor="middle" x="645" y="-418.3" font-family="Times,serif" font-size="14.00">5: Q2.c5 as F3</text>
  50. </g>
  51. <!-- Q2 -->
  52. <g id="node2" class="node">
  53. <title>Q2</title>
  54. <ellipse fill="none" stroke="black" cx="517" cy="-491" rx="37.09" ry="37.09"/>
  55. <text text-anchor="middle" x="517" y="-487.3" font-family="Times,serif" font-size="14.00">Q2(F)</text>
  56. </g>
  57. <!-- boxhead1 -->
  58. <g id="node3" class="node">
  59. <title>boxhead1</title>
  60. <polygon fill="none" stroke="black" points="444,-190.5 444,-351.5 590,-351.5 590,-190.5 444,-190.5"/>
  61. <text text-anchor="middle" x="517" y="-336.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  62. <polyline fill="none" stroke="black" points="444,-328.5 590,-328.5 "/>
  63. <text text-anchor="middle" x="517" y="-313.3" font-family="Times,serif" font-size="14.00">0: Q0.c0 as F1</text>
  64. <polyline fill="none" stroke="black" points="444,-305.5 590,-305.5 "/>
  65. <text text-anchor="middle" x="517" y="-290.3" font-family="Times,serif" font-size="14.00">1: Q0.c1 as F2</text>
  66. <polyline fill="none" stroke="black" points="444,-282.5 590,-282.5 "/>
  67. <text text-anchor="middle" x="517" y="-267.3" font-family="Times,serif" font-size="14.00">2: Q0.c2 as F3</text>
  68. <polyline fill="none" stroke="black" points="444,-259.5 590,-259.5 "/>
  69. <text text-anchor="middle" x="517" y="-244.3" font-family="Times,serif" font-size="14.00">3: Q1.c0 as F1</text>
  70. <polyline fill="none" stroke="black" points="444,-236.5 590,-236.5 "/>
  71. <text text-anchor="middle" x="517" y="-221.3" font-family="Times,serif" font-size="14.00">4: Q1.c1 as F2</text>
  72. <polyline fill="none" stroke="black" points="444,-213.5 590,-213.5 "/>
  73. <text text-anchor="middle" x="517" y="-198.3" font-family="Times,serif" font-size="14.00">5: Q1.c2 as F3</text>
  74. </g>
  75. <!-- Q2&#45;&gt;boxhead1 -->
  76. <g id="edge2" class="edge">
  77. <title>Q2&#45;&gt;boxhead1</title>
  78. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M517,-453.51C517,-433.88 517,-408.51 517,-383"/>
  79. </g>
  80. <!-- Q0 -->
  81. <g id="node4" class="node">
  82. <title>Q0</title>
  83. <ellipse fill="none" stroke="black" cx="89" cy="-271" rx="64.99" ry="64.99"/>
  84. <text text-anchor="middle" x="89" y="-267.3" font-family="Times,serif" font-size="14.00">Q0(F) as T1</text>
  85. </g>
  86. <!-- Q1 -->
  87. <g id="node5" class="node">
  88. <title>Q1</title>
  89. <ellipse fill="none" stroke="black" cx="361" cy="-271" rx="64.99" ry="64.99"/>
  90. <text text-anchor="middle" x="361" y="-267.3" font-family="Times,serif" font-size="14.00">Q1(P) as T2</text>
  91. </g>
  92. <!-- Q0&#45;&gt;Q1 -->
  93. <g id="edge1" class="edge">
  94. <title>Q0&#45;&gt;Q1</title>
  95. <path fill="none" stroke="black" d="M154.15,-271C197.06,-271 253.02,-271 295.91,-271"/>
  96. <text text-anchor="middle" x="225" y="-277.8" font-family="Times,serif" font-size="14.00">(Q0.c0) = (Q1.c1)</text>
  97. </g>
  98. <!-- boxhead2 -->
  99. <g id="node7" class="node">
  100. <title>boxhead2</title>
  101. <polygon fill="none" stroke="black" points="16,-39.5 16,-131.5 162,-131.5 162,-39.5 16,-39.5"/>
  102. <text text-anchor="middle" x="89" y="-116.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  103. <polyline fill="none" stroke="black" points="16,-108.5 162,-108.5 "/>
  104. <text text-anchor="middle" x="89" y="-93.3" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  105. <polyline fill="none" stroke="black" points="16,-85.5 162,-85.5 "/>
  106. <text text-anchor="middle" x="89" y="-70.3" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  107. <polyline fill="none" stroke="black" points="16,-62.5 162,-62.5 "/>
  108. <text text-anchor="middle" x="89" y="-47.3" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  109. </g>
  110. <!-- Q0&#45;&gt;boxhead2 -->
  111. <g id="edge3" class="edge">
  112. <title>Q0&#45;&gt;boxhead2</title>
  113. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M89,-205.82C89,-191.99 89,-177.24 89,-163"/>
  114. </g>
  115. <!-- boxhead3 -->
  116. <g id="node6" class="node">
  117. <title>boxhead3</title>
  118. <polygon fill="none" stroke="black" points="288,-39.5 288,-131.5 434,-131.5 434,-39.5 288,-39.5"/>
  119. <text text-anchor="middle" x="361" y="-116.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  120. <polyline fill="none" stroke="black" points="288,-108.5 434,-108.5 "/>
  121. <text text-anchor="middle" x="361" y="-93.3" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  122. <polyline fill="none" stroke="black" points="288,-85.5 434,-85.5 "/>
  123. <text text-anchor="middle" x="361" y="-70.3" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  124. <polyline fill="none" stroke="black" points="288,-62.5 434,-62.5 "/>
  125. <text text-anchor="middle" x="361" y="-47.3" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  126. </g>
  127. <!-- Q1&#45;&gt;boxhead3 -->
  128. <g id="edge4" class="edge">
  129. <title>Q1&#45;&gt;boxhead3</title>
  130. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M361,-205.82C361,-191.99 361,-177.24 361,-163"/>
  131. </g>
  132. </g>
  133. </svg>