Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
9a98dd49
Commit
9a98dd49
authored
Sep 19, 2009
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename new subroutine, per discussion with Robert Haas.
parent
f7e508a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/backend/optimizer/path/joinpath.c
src/backend/optimizer/path/joinpath.c
+8
-8
No files found.
src/backend/optimizer/path/joinpath.c
View file @
9a98dd49
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.12
5 2009/09/18 17:24:51
tgl Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.12
6 2009/09/19 17:48:09
tgl Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -155,18 +155,18 @@ add_paths_to_joinrel(PlannerInfo *root,
...
@@ -155,18 +155,18 @@ add_paths_to_joinrel(PlannerInfo *root,
}
}
/*
/*
* clause_
matches
_join
* clause_
sides_match
_join
* Determine whether a join clause is of the right form to use in this join.
* Determine whether a join clause is of the right form to use in this join.
*
*
* We already know that the clause is a binary opclause referencing only the
* We already know that the clause is a binary opclause referencing only the
* rels in the current join. The point here is to check whether it has the
* rels in the current join. The point here is to check whether it has the
* form "outerrel_expr op innerrel_expr" or "innerrel_expr op outerrel_expr",
* form "outerrel_expr op innerrel_expr" or "innerrel_expr op outerrel_expr",
* rather than mixing outer and inner vars on either side. If it
is usable
,
* rather than mixing outer and inner vars on either side. If it
matches
,
* we set the transient flag outer_is_left to identify which side is which.
* we set the transient flag outer_is_left to identify which side is which.
*/
*/
static
inline
bool
static
inline
bool
clause_
matches
_join
(
RestrictInfo
*
rinfo
,
RelOptInfo
*
outerrel
,
clause_
sides_match
_join
(
RestrictInfo
*
rinfo
,
RelOptInfo
*
outerrel
,
RelOptInfo
*
innerrel
)
RelOptInfo
*
innerrel
)
{
{
if
(
bms_is_subset
(
rinfo
->
left_relids
,
outerrel
->
relids
)
&&
if
(
bms_is_subset
(
rinfo
->
left_relids
,
outerrel
->
relids
)
&&
bms_is_subset
(
rinfo
->
right_relids
,
innerrel
->
relids
))
bms_is_subset
(
rinfo
->
right_relids
,
innerrel
->
relids
))
...
@@ -267,7 +267,7 @@ join_is_removable(PlannerInfo *root,
...
@@ -267,7 +267,7 @@ join_is_removable(PlannerInfo *root,
/*
/*
* Check if clause has the form "outer op inner" or "inner op outer".
* Check if clause has the form "outer op inner" or "inner op outer".
*/
*/
if
(
!
clause_
matches
_join
(
restrictinfo
,
outerrel
,
innerrel
))
if
(
!
clause_
sides_match
_join
(
restrictinfo
,
outerrel
,
innerrel
))
continue
;
/* no good for these input relations */
continue
;
/* no good for these input relations */
/* OK, add to list */
/* OK, add to list */
...
@@ -1009,7 +1009,7 @@ hash_inner_and_outer(PlannerInfo *root,
...
@@ -1009,7 +1009,7 @@ hash_inner_and_outer(PlannerInfo *root,
/*
/*
* Check if clause has the form "outer op inner" or "inner op outer".
* Check if clause has the form "outer op inner" or "inner op outer".
*/
*/
if
(
!
clause_
matches
_join
(
restrictinfo
,
outerrel
,
innerrel
))
if
(
!
clause_
sides_match
_join
(
restrictinfo
,
outerrel
,
innerrel
))
continue
;
/* no good for these input relations */
continue
;
/* no good for these input relations */
hashclauses
=
lappend
(
hashclauses
,
restrictinfo
);
hashclauses
=
lappend
(
hashclauses
,
restrictinfo
);
...
@@ -1186,7 +1186,7 @@ select_mergejoin_clauses(PlannerInfo *root,
...
@@ -1186,7 +1186,7 @@ select_mergejoin_clauses(PlannerInfo *root,
/*
/*
* Check if clause has the form "outer op inner" or "inner op outer".
* Check if clause has the form "outer op inner" or "inner op outer".
*/
*/
if
(
!
clause_
matches
_join
(
restrictinfo
,
outerrel
,
innerrel
))
if
(
!
clause_
sides_match
_join
(
restrictinfo
,
outerrel
,
innerrel
))
{
{
have_nonmergeable_joinclause
=
true
;
have_nonmergeable_joinclause
=
true
;
continue
;
/* no good for these input relations */
continue
;
/* no good for these input relations */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment