Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/backend/executor/nodeNestloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,13 +645,14 @@ splitJoinQualExpr(NestLoopState *nlstate)
break;
}
case T_ExprState:
/* For constant expression we don't need to split */
if (exprstate->xprstate.expr->type == T_Const)
/* For constant and distinct expression we don't need to split */
if ((exprstate->xprstate.expr->type == T_Const) ||
(exprstate->xprstate.expr->type == T_DistinctExpr))
{
/*
* Constant expressions do not need to be splitted into left and
* right as they don't need to be considered for NULL value special
* cases
* Distinct and constant expressions do not need to be
* splitted into left and right as they don't need to be
* considered for NULL value special cases
*/
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
</dxl:ProjList>
<dxl:Filter/>
<dxl:SortingColumnList/>
<dxl:NestedLoopJoin JoinType="LeftAntiSemiJoinNotIn" IndexNestedLoopJoin="false">
<dxl:NestedLoopJoin JoinType="LeftAntiSemiJoinNotIn" IndexNestedLoopJoin="false" OuterRefAsParam="false">
<dxl:Properties>
<dxl:Cost StartupCost="0" TotalCost="2155.000479" Rows="1.000000" Width="4"/>
</dxl:Properties>
Expand Down Expand Up @@ -400,17 +400,20 @@
<dxl:ProjList/>
<dxl:Filter/>
<dxl:SortingColumnList/>
<dxl:NestedLoopJoin JoinType="Inner" IndexNestedLoopJoin="false">
<dxl:NestedLoopJoin JoinType="Inner" IndexNestedLoopJoin="false" OuterRefAsParam="false">
<dxl:Properties>
<dxl:Cost StartupCost="0" TotalCost="1293.000409" Rows="1.000000" Width="1"/>
</dxl:Properties>
<dxl:ProjList/>
<dxl:Filter/>
<dxl:JoinFilter>
<dxl:Comparison ComparisonOperator="&lt;&gt;" OperatorMdid="0.518.1.0">
<dxl:Ident ColId="16" ColName="a" TypeMdid="0.23.1.0"/>
<dxl:Ident ColId="8" ColName="b" TypeMdid="0.23.1.0"/>
</dxl:Comparison>
<dxl:IsDistinctFrom OperatorMdid="0.91.1.0">
<dxl:Comparison ComparisonOperator="&lt;&gt;" OperatorMdid="0.518.1.0">
<dxl:Ident ColId="16" ColName="a" TypeMdid="0.23.1.0"/>
<dxl:Ident ColId="8" ColName="b" TypeMdid="0.23.1.0"/>
</dxl:Comparison>
<dxl:ConstValue TypeMdid="0.16.1.0" Value="false"/>
</dxl:IsDistinctFrom>
</dxl:JoinFilter>
<dxl:Assert ErrorCode="P0003">
<dxl:Properties>
Expand Down
11 changes: 7 additions & 4 deletions src/backend/gporca/data/dxl/minidump/AntiSemiJoin2Select-1.mdp
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,13 @@
</dxl:ProjList>
<dxl:Filter>
<dxl:Not>
<dxl:Comparison ComparisonOperator="=" OperatorMdid="0.96.1.0">
<dxl:Ident ColId="0" ColName="i" TypeMdid="0.23.1.0"/>
<dxl:Ident ColId="1" ColName="j" TypeMdid="0.23.1.0"/>
</dxl:Comparison>
<dxl:IsDistinctFrom OperatorMdid="0.91.1.0">
<dxl:Comparison ComparisonOperator="=" OperatorMdid="0.96.1.0">
<dxl:Ident ColId="0" ColName="i" TypeMdid="0.23.1.0"/>
<dxl:Ident ColId="1" ColName="j" TypeMdid="0.23.1.0"/>
</dxl:Comparison>
<dxl:ConstValue TypeMdid="0.16.1.0" Value="false"/>
</dxl:IsDistinctFrom>
</dxl:Not>
</dxl:Filter>
<dxl:TableDescriptor Mdid="0.32780.1.1" TableName="x">
Expand Down
11 changes: 7 additions & 4 deletions src/backend/gporca/data/dxl/minidump/AntiSemiJoin2Select-2.mdp
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,13 @@
</dxl:ProjList>
<dxl:Filter>
<dxl:Not>
<dxl:Comparison ComparisonOperator="=" OperatorMdid="0.96.1.0">
<dxl:Ident ColId="0" ColName="i" TypeMdid="0.23.1.0"/>
<dxl:Ident ColId="0" ColName="i" TypeMdid="0.23.1.0"/>
</dxl:Comparison>
<dxl:IsDistinctFrom OperatorMdid="0.91.1.0">
<dxl:Comparison ComparisonOperator="=" OperatorMdid="0.96.1.0">
<dxl:Ident ColId="0" ColName="i" TypeMdid="0.23.1.0"/>
<dxl:Ident ColId="0" ColName="i" TypeMdid="0.23.1.0"/>
</dxl:Comparison>
<dxl:ConstValue TypeMdid="0.16.1.0" Value="false"/>
</dxl:IsDistinctFrom>
</dxl:Not>
</dxl:Filter>
<dxl:TableDescriptor Mdid="0.32780.1.1" TableName="x">
Expand Down
Loading