mirror of https://github.com/citusdata/citus.git
more simplification and removal of unused code
parent
4362502bb5
commit
1aa86f6b1c
|
@ -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,
|
||||
|
|
|
@ -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); \
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue