Skip to content

Commit

Permalink
plans
Browse files Browse the repository at this point in the history
  • Loading branch information
snuyanzin committed Feb 1, 2024
1 parent b8c075a commit 78075b5
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -683,4 +683,23 @@ HashJoin(joinType=[LeftOuterJoin], where=[(k = k0)], select=[k, v, k0, v0], isBr
]]>
</Resource>
</TestCase>
<TestCase name="testRightOuterJoinOnFalse">
<Resource name="sql">
<![CDATA[SELECT * FROM MyTable2 RIGHT OUTER JOIN MyTable1 ON false]]>
</Resource>
<Resource name="ast">
<![CDATA[
LogicalProject(d=[$0], e=[$1], f=[$2], g=[$3], h=[$4], a=[$5], b=[$6], c=[$7])
+- LogicalJoin(condition=[false], joinType=[right])
:- LogicalTableScan(table=[[default_catalog, default_database, MyTable2, source: [TestTableSource(d, e, f, g, h)]]])
+- LogicalTableScan(table=[[default_catalog, default_database, MyTable1, source: [TestTableSource(a, b, c)]]])
]]>
</Resource>
<Resource name="optimized exec plan">
<![CDATA[
Calc(select=[null:INTEGER AS d, null:BIGINT AS e, null:INTEGER AS f, null:VARCHAR(2147483647) AS g, null:BIGINT AS h, a, b, c])
+- LegacyTableSourceScan(table=[[default_catalog, default_database, MyTable1, source: [TestTableSource(a, b, c)]]], fields=[a, b, c])
]]>
</Resource>
</TestCase>
</Root>
Original file line number Diff line number Diff line change
Expand Up @@ -917,9 +917,7 @@ LogicalProject(d=[$0], e=[$1], f=[$2], g=[$3], h=[$4], a=[$5], b=[$6], c=[$7])
</Resource>
<Resource name="optimized exec plan">
<![CDATA[
NestedLoopJoin(joinType=[RightOuterJoin], where=[true], select=[d, e, f, g, h, a, b, c], build=[left])
:- Exchange(distribution=[broadcast])
: +- Values(tuples=[[]], values=[d, e, f, g, h])
Calc(select=[null:INTEGER AS d, null:BIGINT AS e, null:INTEGER AS f, null:VARCHAR(2147483647) AS g, null:BIGINT AS h, a, b, c])
+- LegacyTableSourceScan(table=[[default_catalog, default_database, MyTable1, source: [TestTableSource(a, b, c)]]], fields=[a, b, c])
]]>
</Resource>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -795,4 +795,23 @@ HashJoin(joinType=[LeftOuterJoin], where=[(k = k0)], select=[k, v, k0, v0], buil
]]>
</Resource>
</TestCase>
<TestCase name="testRightOuterJoinOnFalse">
<Resource name="sql">
<![CDATA[SELECT * FROM MyTable2 RIGHT OUTER JOIN MyTable1 ON false]]>
</Resource>
<Resource name="ast">
<![CDATA[
LogicalProject(d=[$0], e=[$1], f=[$2], g=[$3], h=[$4], a=[$5], b=[$6], c=[$7])
+- LogicalJoin(condition=[false], joinType=[right])
:- LogicalTableScan(table=[[default_catalog, default_database, MyTable2, source: [TestTableSource(d, e, f, g, h)]]])
+- LogicalTableScan(table=[[default_catalog, default_database, MyTable1, source: [TestTableSource(a, b, c)]]])
]]>
</Resource>
<Resource name="optimized exec plan">
<![CDATA[
Calc(select=[null:INTEGER AS d, null:BIGINT AS e, null:INTEGER AS f, null:VARCHAR(2147483647) AS g, null:BIGINT AS h, a, b, c])
+- LegacyTableSourceScan(table=[[default_catalog, default_database, MyTable1, source: [TestTableSource(a, b, c)]]], fields=[a, b, c])
]]>
</Resource>
</TestCase>
</Root>
Original file line number Diff line number Diff line change
Expand Up @@ -795,4 +795,23 @@ SortMergeJoin(joinType=[LeftOuterJoin], where=[(k = k0)], select=[k, v, k0, v0])
]]>
</Resource>
</TestCase>
<TestCase name="testRightOuterJoinOnFalse">
<Resource name="sql">
<![CDATA[SELECT * FROM MyTable2 RIGHT OUTER JOIN MyTable1 ON false]]>
</Resource>
<Resource name="ast">
<![CDATA[
LogicalProject(d=[$0], e=[$1], f=[$2], g=[$3], h=[$4], a=[$5], b=[$6], c=[$7])
+- LogicalJoin(condition=[false], joinType=[right])
:- LogicalTableScan(table=[[default_catalog, default_database, MyTable2, source: [TestTableSource(d, e, f, g, h)]]])
+- LogicalTableScan(table=[[default_catalog, default_database, MyTable1, source: [TestTableSource(a, b, c)]]])
]]>
</Resource>
<Resource name="optimized exec plan">
<![CDATA[
Calc(select=[null:INTEGER AS d, null:BIGINT AS e, null:INTEGER AS f, null:VARCHAR(2147483647) AS g, null:BIGINT AS h, a, b, c])
+- LegacyTableSourceScan(table=[[default_catalog, default_database, MyTable1, source: [TestTableSource(a, b, c)]]], fields=[a, b, c])
]]>
</Resource>
</TestCase>
</Root>
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@ class BroadcastHashJoinTest extends JoinTestBase {
.isInstanceOf[TableException]
}

@Test
override def testRightOuterJoinOnFalse(): Unit = {
assertThatThrownBy(() => super.testRightOuterJoinOnFalse())
.hasMessageContaining("Cannot generate a valid execution plan for the given query")
.isInstanceOf[TableException]
}

@Test
override def testRightOuterJoinWithNonEquiPred(): Unit = {
assertThatThrownBy(() => super.testRightOuterJoinWithNonEquiPred())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@ class ShuffledHashJoinTest extends JoinTestBase {
.isInstanceOf[TableException]
}

@Test
override def testRightOuterJoinOnFalse(): Unit = {
assertThatThrownBy(() => super.testRightOuterJoinOnFalse())
.hasMessageContaining("Cannot generate a valid execution plan for the given query")
.isInstanceOf[TableException]
}

@Test
override def testRightOuterJoinWithNonEquiPred(): Unit = {
assertThatThrownBy(() => super.testRightOuterJoinWithNonEquiPred())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,6 @@ class SortMergeJoinTest extends JoinTestBase {
.isInstanceOf[TableException]
}

@Test
override def testRightOuterJoinOnFalse(): Unit = {
assertThatThrownBy(() => super.testRightOuterJoinOnFalse())
.hasMessageContaining("Cannot generate a valid execution plan for the given query")
.isInstanceOf[TableException]
}

@Test
override def testRightOuterJoinWithNonEquiPred(): Unit = {
assertThatThrownBy(() => super.testRightOuterJoinWithNonEquiPred())
Expand Down

0 comments on commit 78075b5

Please sign in to comment.