more simplification and removal of unused code

moonshot/custom-path
Nils Dijk 2021-01-21 13:59:47 +01:00
parent 4362502bb5
commit 1aa86f6b1c
No known key found for this signature in database
GPG Key ID: CA1177EF9434F241
2 changed files with 9 additions and 36 deletions

View File

@ -749,24 +749,6 @@ typedef struct GeoJoinPathMatch
} GeoJoinPathMatch; } GeoJoinPathMatch;
static Path *
SkipTransparentPaths(Path *path)
{
switch (path->type)
{
case T_MaterialPath:
{
return SkipTransparentPaths(castNode(MaterialPath, path)->subpath);
}
default:
{
return path;
}
}
}
#include "distributed/planner/pattern_match.h" #include "distributed/planner/pattern_match.h"
static List * static List *
GeoOverlapJoin(PlannerInfo *root, Path *originalPath) GeoOverlapJoin(PlannerInfo *root, Path *originalPath)
@ -791,7 +773,7 @@ GeoOverlapJoin(PlannerInfo *root, Path *originalPath)
MatchVar(NoCapture), MatchVar(NoCapture),
MatchConst( MatchConst(
&match.stdwithinDistanceConst, &match.stdwithinDistanceConst,
MatchConstFields(consttype == FLOAT8OID))))), MatchFields(consttype == FLOAT8OID))))),
/* match inner path in join */ /* match inner path in join */
SkipReadThrough( SkipReadThrough(
NoCapture, NoCapture,

View File

@ -301,17 +301,17 @@ if (matched)
} }
#define MatchVarValuesInternal(index, check) \ #define MatchFieldsInternal(index, check) \
{ \ { \
if (!(castNode(Var, clause)->check)) \ if (!(typedClause->check)) \
{ \ { \
MatchFailed; \ MatchFailed; \
} \ } \
} }
#define MatchVarFields(...) \ #define MatchFields(...) \
FOR_EACH(MatchVarValuesInternal, __VA_ARGS__); FOR_EACH(MatchFieldsInternal, __VA_ARGS__);
#define MatchVar(capture, ...) \ #define MatchVar(capture, ...) \
@ -320,30 +320,21 @@ if (matched)
{ \ { \
MatchFailed; \ MatchFailed; \
} \ } \
Var *typedClause = castNode(Var, clause); \
(void) typedClause; \
__VA_ARGS__; \ __VA_ARGS__; \
DoCapture(capture, Var *, clause); \ DoCapture(capture, Var *, clause); \
} }
#define MatchConstValuesInternal(index, check) \
{ \
if (!(castNode(Const, clause)->check)) \
{ \
MatchFailed; \
} \
}
#define MatchConstFields(...) \
FOR_EACH(MatchConstValuesInternal, __VA_ARGS__);
#define MatchConst(capture, ...) \ #define MatchConst(capture, ...) \
{ \ { \
if (!IsA(clause, Const)) \ if (!IsA(clause, Const)) \
{ \ { \
MatchFailed; \ MatchFailed; \
} \ } \
Const *typedClause = castNode(Const, clause); \
(void) typedClause; \
__VA_ARGS__; \ __VA_ARGS__; \
DoCapture(capture, Const *, clause); \ DoCapture(capture, Const *, clause); \
} }