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;
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"
static List *
GeoOverlapJoin(PlannerInfo *root, Path *originalPath)
@ -791,7 +773,7 @@ GeoOverlapJoin(PlannerInfo *root, Path *originalPath)
MatchVar(NoCapture),
MatchConst(
&match.stdwithinDistanceConst,
MatchConstFields(consttype == FLOAT8OID))))),
MatchFields(consttype == FLOAT8OID))))),
/* match inner path in join */
SkipReadThrough(
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; \
} \
}
#define MatchVarFields(...) \
FOR_EACH(MatchVarValuesInternal, __VA_ARGS__);
#define MatchFields(...) \
FOR_EACH(MatchFieldsInternal, __VA_ARGS__);
#define MatchVar(capture, ...) \
@ -320,30 +320,21 @@ if (matched)
{ \
MatchFailed; \
} \
Var *typedClause = castNode(Var, clause); \
(void) typedClause; \
__VA_ARGS__; \
DoCapture(capture, Var *, clause); \
}
#define MatchConstValuesInternal(index, check) \
{ \
if (!(castNode(Const, clause)->check)) \
{ \
MatchFailed; \
} \
}
#define MatchConstFields(...) \
FOR_EACH(MatchConstValuesInternal, __VA_ARGS__);
#define MatchConst(capture, ...) \
{ \
if (!IsA(clause, Const)) \
{ \
MatchFailed; \
} \
Const *typedClause = castNode(Const, clause); \
(void) typedClause; \
__VA_ARGS__; \
DoCapture(capture, Const *, clause); \
}