You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by rl...@apache.org on 2017/04/01 04:03:08 UTC
[1/3] incubator-hawq git commit: HAWQ-1421. PXF rpm updates to make
it oss friendly
Repository: incubator-hawq
Updated Branches:
refs/heads/2.2.0.0-incubating d70d7092f -> 18e928c91
HAWQ-1421. PXF rpm updates to make it oss friendly
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/18e928c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/18e928c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/18e928c9
Branch: refs/heads/2.2.0.0-incubating
Commit: 18e928c91e36ec0bf6af7f9760fc8a7445537816
Parents: 4e6624a
Author: shivzone <sh...@gmail.com>
Authored: Wed Mar 29 18:15:37 2017 -0700
Committer: rlei <rl...@pivotal.io>
Committed: Sat Apr 1 12:02:48 2017 +0800
----------------------------------------------------------------------
pxf/Makefile | 2 +-
pxf/build.gradle | 13 +++++++++----
2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/18e928c9/pxf/Makefile
----------------------------------------------------------------------
diff --git a/pxf/Makefile b/pxf/Makefile
index 2959f9c..7405878 100644
--- a/pxf/Makefile
+++ b/pxf/Makefile
@@ -47,7 +47,7 @@ help:
@echo "help it is then"
@echo "Possible targets"
@echo " - all (clean, build, unittest, jar, tar, rpm)"
- @echo " - - HD=<phd|hdp> - set classpath to match hadoop distribution. default phd"
+ @echo " - - HD=<hdp> - set classpath to match hadoop distribution. default will be apache hadoop compliant"
@echo " - - LICENSE=<license info> - add license info to created RPMs"
@echo " - - VENDOR=<vendor name> - add vendor name to created RPMs"
@echo " - - PLUGINS_EXCLUDE_RPM=plugin1, plugin2,... - do not build and RPM for given comma-separated list of plugins"
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/18e928c9/pxf/build.gradle
----------------------------------------------------------------------
diff --git a/pxf/build.gradle b/pxf/build.gradle
index e9d04af..802b1e4 100644
--- a/pxf/build.gradle
+++ b/pxf/build.gradle
@@ -41,17 +41,22 @@ buildscript {
}
}
-// Hadoop distribution (can be phd or hdp) - needed to set correct classpaths
+// Hadoop distribution (can be hdp or null which would default to apache) - needed to set correct classpaths
// can be set with -Dhd=<value>
-def hddist = System.properties['hd'] ?: 'hdp';
-if (hddist != 'phd' && hddist != 'hdp') {
+def hddist = System.properties['hd'] ?: '';
+if (hddist != 'hdp' && hddist != '') {
throw new GradleException("hadoop distribution parameter (hd) set to invalid value: $hddist")
}
// Some package names need to be renamed to include the version number
// as part of the package name to enable side by side install of two versions of the same package.
+
def versionedPackageName(packageName) {
- packageName + "_" + "${version}".replace(".", "_")
+ if (System.properties['hd'] == 'hdp') {
+ packageName + "_" + "${version}".replace(".", "_")
+ } else {
+ packageName
+ }
}
subprojects { subProject ->
[2/3] incubator-hawq git commit: HAWQ-1420. Enable build of Ranger
plugin open source RPM
Posted by rl...@apache.org.
HAWQ-1420. Enable build of Ranger plugin open source RPM
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/4e6624a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/4e6624a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/4e6624a4
Branch: refs/heads/2.2.0.0-incubating
Commit: 4e6624a49a43af5cffd65be944c06cc6f966ba22
Parents: 2045627
Author: ljainpivotalio <lj...@pivotal.io>
Authored: Tue Mar 28 17:31:02 2017 -0700
Committer: rlei <rl...@pivotal.io>
Committed: Sat Apr 1 12:02:48 2017 +0800
----------------------------------------------------------------------
contrib/hawq-package/make_rpm_tarball.sh | 2 +-
ranger-plugin/pom.xml | 34 ++++++++++++++------------
ranger-plugin/scripts/build_ranger_rpm.sh | 7 ++++--
3 files changed, 25 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4e6624a4/contrib/hawq-package/make_rpm_tarball.sh
----------------------------------------------------------------------
diff --git a/contrib/hawq-package/make_rpm_tarball.sh b/contrib/hawq-package/make_rpm_tarball.sh
index ba0c4f7..8501534 100755
--- a/contrib/hawq-package/make_rpm_tarball.sh
+++ b/contrib/hawq-package/make_rpm_tarball.sh
@@ -58,7 +58,7 @@ if [ $? != 0 ]; then
fi
# Copy HAWQ Ranger rpm package
-cp ${SRC_TOP_DIR}/ranger-plugin/target/rpm/hawq-ranger-plugin_*/RPMS/noarch/hawq-ranger-plugin*.rpm ${RPM_PKG_DIR}/
+cp ${SRC_TOP_DIR}/ranger-plugin/target/rpm/hawq-ranger-plugin*/RPMS/noarch/hawq-ranger-plugin*.rpm ${RPM_PKG_DIR}/
if [ $? != 0 ]; then
echo "Copy HAWQ Ranger plugin rpm package failed."
exit $?
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4e6624a4/ranger-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/ranger-plugin/pom.xml b/ranger-plugin/pom.xml
index 4b55443..ab3a475 100644
--- a/ranger-plugin/pom.xml
+++ b/ranger-plugin/pom.xml
@@ -38,6 +38,9 @@
<release.version>1</release.version>
<postgresql.version>9.1-901-1.jdbc4</postgresql.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <build.suffix>_${hawq.name.version}</build.suffix>
+ <hawq.dep.name>hawq_${hawq.name.version}</hawq.dep.name>
+ <destination.dir>/usr/local/hawq${build.suffix}/ranger</destination.dir>
</properties>
<build>
@@ -69,23 +72,24 @@
<configuration>
<copyright>ASL 2.0</copyright>
<group>org.apache.hawq.ranger</group>
- <name>hawq-ranger-plugin_${hawq.name.version}</name>
+ <name>hawq-ranger-plugin${build.suffix}</name>
<defaultUsername>gpadmin</defaultUsername>
<defaultGroupname>gpadmin</defaultGroupname>
+ <needarch>noarch</needarch>
<description>
HAWQ Ranger plugin.
</description>
<release>${release.version}%{?dist}</release>
<requires>
<require>bigtop-tomcat</require>
- <require>hawq_${hawq.name.version} >= ${project.version}</require>
+ <require>${hawq.dep.name} >= ${project.version}</require>
</requires>
<mappings>
<mapping>
- <directory>/usr/local/hawq_${hawq.name.version}/ranger</directory>
+ <directory>${destination.dir}</directory>
</mapping>
<mapping>
- <directory>/usr/local/hawq_${hawq.name.version}/ranger/bin</directory>
+ <directory>${destination.dir}/bin</directory>
<filemode>750</filemode>
<sources>
<source>
@@ -100,7 +104,7 @@
</sources>
</mapping>
<mapping>
- <directory>/usr/local/hawq_${hawq.name.version}/ranger/etc</directory>
+ <directory>${destination.dir}/etc</directory>
<sources>
<source>
<location>conf/ranger-servicedef-hawq.json</location>
@@ -121,7 +125,7 @@
</sources>
</mapping>
<mapping>
- <directory>/usr/local/hawq_${hawq.name.version}/ranger/lib</directory>
+ <directory>${destination.dir}/lib</directory>
<sources>
<source>
<location>admin-plugin/target/ranger-plugin-admin-${project.version}.jar</location>
@@ -132,10 +136,10 @@
</sources>
</mapping>
<mapping>
- <directory>/usr/local/hawq_${hawq.name.version}/ranger/plugin-service</directory>
+ <directory>${destination.dir}/plugin-service</directory>
</mapping>
<mapping>
- <directory>/usr/local/hawq_${hawq.name.version}/ranger/plugin-service/bin</directory>
+ <directory>${destination.dir}/plugin-service/bin</directory>
<sources>
<source>
<location>scripts/setenv.sh</location>
@@ -143,7 +147,7 @@
</sources>
</mapping>
<mapping>
- <directory>/usr/local/hawq_${hawq.name.version}/ranger/plugin-service/conf</directory>
+ <directory>${destination.dir}/plugin-service/conf</directory>
<sources>
<source>
<location>conf/server.xml</location>
@@ -154,7 +158,7 @@
</sources>
</mapping>
<mapping>
- <directory>/usr/local/hawq_${hawq.name.version}/ranger/plugin-service/lib</directory>
+ <directory>${destination.dir}/plugin-service/lib</directory>
<sources>
<source>
<location>service/target/ranger-plugin-service-${project.version}/WEB-INF/lib</location>
@@ -162,19 +166,19 @@
</sources>
</mapping>
<mapping>
- <directory>/usr/local/hawq_${hawq.name.version}/ranger/plugin-service/logs</directory>
+ <directory>${destination.dir}/plugin-service/logs</directory>
</mapping>
<mapping>
- <directory>/usr/local/hawq_${hawq.name.version}/ranger/plugin-service/temp</directory>
+ <directory>${destination.dir}/plugin-service/temp</directory>
</mapping>
<mapping>
- <directory>/usr/local/hawq_${hawq.name.version}/ranger/plugin-service/work</directory>
+ <directory>${destination.dir}/plugin-service/work</directory>
</mapping>
<mapping>
- <directory>/usr/local/hawq_${hawq.name.version}/ranger/plugin-service/work/policycache</directory>
+ <directory>${destination.dir}/plugin-service/work/policycache</directory>
</mapping>
<mapping>
- <directory>/usr/local/hawq_${hawq.name.version}/ranger/plugin-service/webapps</directory>
+ <directory>${destination.dir}/plugin-service/webapps</directory>
<sources>
<source>
<location>service/target/ranger-plugin-service-${project.version}.war</location>
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4e6624a4/ranger-plugin/scripts/build_ranger_rpm.sh
----------------------------------------------------------------------
diff --git a/ranger-plugin/scripts/build_ranger_rpm.sh b/ranger-plugin/scripts/build_ranger_rpm.sh
index 2bdcea8..32f6fa1 100755
--- a/ranger-plugin/scripts/build_ranger_rpm.sh
+++ b/ranger-plugin/scripts/build_ranger_rpm.sh
@@ -20,9 +20,12 @@ MVN_OPTS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenT
# Set HAWQ ranger-plugin rpm build number to 1 as default
BUILD_NUMBER=1
+BUILD_OPTS="-Drelease.version=${BUILD_NUMBER}"
+BUILD_OPTS="${BUILD_OPTS} -Dbuild.suffix= -Dhawq.dep.name=apache-hawq"
+BUILD_OPTS="${BUILD_OPTS} -Ddestination.dir=/usr/local/apache-hawq/ranger"
# Get current HAWQ releave version number.
-if [ -z "${HAWQ_RELEASE_VERSION}" ]; then
+if [ -z "${HAWQ_RELEASE_VERSION}" ]; then
HAWQ_RELEASE_VERSION=$(cat ../getversion| grep ^GP_VERSION | cut -d '=' -f2 | sed 's|"||g' | cut -d '-' -f1)
fi
@@ -41,7 +44,7 @@ if [ $? != 0 ]; then
fi
# build rpm
-mvn ${MVN_OPTS} -N -Drelease.version=${BUILD_NUMBER} install
+mvn ${MVN_OPTS} -N ${BUILD_OPTS} install
if [ $? != 0 ]; then
echo "Build HAWQ ranger-plugin rpm package failed."
exit $?
[3/3] incubator-hawq git commit: HAWQ-1409. Send AGG-TYPE header to
PXF
Posted by rl...@apache.org.
HAWQ-1409. Send AGG-TYPE header to PXF
This change is mean to be a proof of concept that pushing down
aggregate function information from HAWQ to the underlying external
storage layer does indeed improve performance
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/20456278
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/20456278
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/20456278
Branch: refs/heads/2.2.0.0-incubating
Commit: 20456278f93b8b9a425f606be440c79e19f30436
Parents: d70d709
Author: Kavinder Dhaliwal <ka...@gmail.com>
Authored: Fri Mar 3 15:27:05 2017 -0800
Committer: rlei <rl...@pivotal.io>
Committed: Sat Apr 1 12:02:48 2017 +0800
----------------------------------------------------------------------
src/backend/access/external/fileam.c | 10 +++++++++-
src/backend/access/external/pxfheaders.c | 12 ++++++++++++
src/backend/executor/nodeAgg.c | 13 +++++++++++++
src/backend/executor/nodeExternalscan.c | 7 ++++++-
src/bin/gpfusion/gpbridgeapi.c | 7 ++++++-
src/include/access/extprotocol.h | 2 +-
src/include/access/fileam.h | 4 +++-
src/include/access/pxfheaders.h | 2 ++
src/include/executor/executor.h | 2 ++
src/include/nodes/execnodes.h | 1 +
10 files changed, 55 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/20456278/src/backend/access/external/fileam.c
----------------------------------------------------------------------
diff --git a/src/backend/access/external/fileam.c b/src/backend/access/external/fileam.c
index d16d516..f77b29e 100644
--- a/src/backend/access/external/fileam.c
+++ b/src/backend/access/external/fileam.c
@@ -459,12 +459,20 @@ external_stopscan(FileScanDesc scan)
* ----------------
*/
ExternalSelectDesc
-external_getnext_init(PlanState *state) {
+external_getnext_init(PlanState *state, ExternalScanState *es_state) {
ExternalSelectDesc desc = (ExternalSelectDesc) palloc0(sizeof(ExternalSelectDescData));
+ Plan *rootPlan;
if (state != NULL)
{
desc->projInfo = state->ps_ProjInfo;
+ /*
+ * If we have an agg type then our parent is an Agg node
+ */
+ rootPlan = state->state->es_plannedstmt->planTree;
+ if (IsA(rootPlan, Agg) && es_state->parent_agg_type) {
+ desc->agg_type = es_state->parent_agg_type;
+ }
}
return desc;
}
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/20456278/src/backend/access/external/pxfheaders.c
----------------------------------------------------------------------
diff --git a/src/backend/access/external/pxfheaders.c b/src/backend/access/external/pxfheaders.c
index 8e91644..d8904b4 100644
--- a/src/backend/access/external/pxfheaders.c
+++ b/src/backend/access/external/pxfheaders.c
@@ -110,6 +110,18 @@ void build_http_header(PxfInputData *input)
else
churl_headers_append(headers, "X-GP-HAS-FILTER", "0");
+ /* Aggregate information */
+ if (input->agg_type) {
+ switch(input->agg_type) {
+ case EXEC_FLAG_EXTERNAL_AGG_COUNT:
+ churl_headers_append(headers, "X-GP-AGG-TYPE", "count");
+ break;
+ default:
+ churl_headers_append(headers, "X-GP-AGG-TYPE", "unknown");
+ break;
+ }
+ }
+
add_delegation_token_headers(headers, input);
add_remote_credentials(headers);
}
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/20456278/src/backend/executor/nodeAgg.c
----------------------------------------------------------------------
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index e4eb791..574dcc6 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -1950,6 +1950,19 @@ ExecInitAgg(Agg *node, EState *estate, int eflags)
* initialize child nodes
*/
outerPlan = outerPlan(node);
+ if (IsA(outerPlan, ExternalScan)) {
+ /*
+ * Hack to indicate to PXF when there is an external scan
+ */
+ if (list_length(aggstate->aggs) == 1) {
+ AggrefExprState *aggrefstate = (AggrefExprState *) linitial(aggstate->aggs);
+ Aggref *aggref = (Aggref *) aggrefstate->xprstate.expr;
+ //Only dealing with one agg
+ if (aggref->aggfnoid == COUNT_ANY_OID || aggref->aggfnoid == COUNT_STAR_OID) {
+ eflags |= EXEC_FLAG_EXTERNAL_AGG_COUNT;
+ }
+ }
+ }
outerPlanState(aggstate) = ExecInitNode(outerPlan, estate, eflags);
/*
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/20456278/src/backend/executor/nodeExternalscan.c
----------------------------------------------------------------------
diff --git a/src/backend/executor/nodeExternalscan.c b/src/backend/executor/nodeExternalscan.c
index 2831faa..8f2ba88 100644
--- a/src/backend/executor/nodeExternalscan.c
+++ b/src/backend/executor/nodeExternalscan.c
@@ -80,7 +80,7 @@ ExternalNext(ExternalScanState *node)
/*
* get the next tuple from the file access methods
*/
- externalSelectDesc = external_getnext_init(&(node->ss.ps));
+ externalSelectDesc = external_getnext_init(&(node->ss.ps), node);
tuple = external_getnext(scandesc, direction, externalSelectDesc);
/*
@@ -237,6 +237,11 @@ ExecInitExternalScan(ExternalScan *node, EState *estate, int eflags)
externalstate->ss.ps.delayEagerFree =
((eflags & (EXEC_FLAG_REWIND | EXEC_FLAG_BACKWARD | EXEC_FLAG_MARK)) != 0);
+ /*
+ * If eflag contains EXEC_FLAG_EXTERNAL_AGG_COUNT then notify the underlying storage level
+ */
+ externalstate->parent_agg_type = (eflags & EXEC_FLAG_EXTERNAL_AGG_COUNT);
+
initGpmonPktForExternalScan((Plan *)node, &externalstate->ss.ps.gpmon_pkt, estate);
return externalstate;
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/20456278/src/bin/gpfusion/gpbridgeapi.c
----------------------------------------------------------------------
diff --git a/src/bin/gpfusion/gpbridgeapi.c b/src/bin/gpfusion/gpbridgeapi.c
index cf4dd84..f176586 100644
--- a/src/bin/gpfusion/gpbridgeapi.c
+++ b/src/bin/gpfusion/gpbridgeapi.c
@@ -182,8 +182,13 @@ void add_querydata_to_http_header(gphadoop_context* context, PG_FUNCTION_ARGS)
inputData.rel = EXTPROTOCOL_GET_RELATION(fcinfo);
inputData.quals = EXTPROTOCOL_GET_SCANQUALS(fcinfo);
inputData.filterstr = serializePxfFilterQuals(EXTPROTOCOL_GET_SCANQUALS(fcinfo));
- if (EXTPROTOCOL_GET_SELECTDESC(fcinfo))
+ if (EXTPROTOCOL_GET_SELECTDESC(fcinfo)) {
inputData.proj_info = EXTPROTOCOL_GET_PROJINFO(fcinfo);
+ int agg_type = EXTPROTOCOL_GET_AGG_TYPE(fcinfo);
+ if (agg_type) {
+ inputData.agg_type = agg_type;
+ }
+ }
add_delegation_token(&inputData);
build_http_header(&inputData);
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/20456278/src/include/access/extprotocol.h
----------------------------------------------------------------------
diff --git a/src/include/access/extprotocol.h b/src/include/access/extprotocol.h
index 4b69bb7..c1aa724 100644
--- a/src/include/access/extprotocol.h
+++ b/src/include/access/extprotocol.h
@@ -66,8 +66,8 @@ typedef ExtProtocolData *ExtProtocol;
#define EXTPROTOCOL_GET_USER_CTX(fcinfo) (((ExtProtocolData*) fcinfo->context)->prot_user_ctx)
#define EXTPROTOCOL_GET_SELECTDESC(fcinfo) (((ExtProtocolData*) fcinfo->context)->desc)
#define EXTPROTOCOL_GET_PROJINFO(fcinfo) (((ExtProtocolData*) fcinfo->context)->desc->projInfo)
+#define EXTPROTOCOL_GET_AGG_TYPE(fcinfo) (((ExtProtocolData*) fcinfo->context)->desc->agg_type)
#define EXTPROTOCOL_IS_LAST_CALL(fcinfo) (((ExtProtocolData*) fcinfo->context)->prot_last_call)
-
#define EXTPROTOCOL_SET_LAST_CALL(fcinfo) (((ExtProtocolData*) fcinfo->context)->prot_last_call = true)
#define EXTPROTOCOL_SET_USER_CTX(fcinfo, p) \
(((ExtProtocolData*) fcinfo->context)->prot_user_ctx = p)
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/20456278/src/include/access/fileam.h
----------------------------------------------------------------------
diff --git a/src/include/access/fileam.h b/src/include/access/fileam.h
index 1e926d5..713c185 100644
--- a/src/include/access/fileam.h
+++ b/src/include/access/fileam.h
@@ -70,6 +70,8 @@ typedef ExternalInsertDescData *ExternalInsertDesc;
typedef struct ExternalSelectDescData
{
ProjectionInfo *projInfo;
+ // Information needed for aggregate pushdown
+ int agg_type;
} ExternalSelectDescData;
typedef enum DataLineStatus
@@ -89,7 +91,7 @@ extern FileScanDesc external_beginscan(Relation relation, Index scanrelid,
extern void external_rescan(FileScanDesc scan);
extern void external_endscan(FileScanDesc scan);
extern void external_stopscan(FileScanDesc scan);
-extern ExternalSelectDesc external_getnext_init(PlanState *state);
+extern ExternalSelectDesc external_getnext_init(PlanState *state, ExternalScanState *es_state);
extern HeapTuple external_getnext(FileScanDesc scan, ScanDirection direction, ExternalSelectDesc desc);
extern ExternalInsertDesc external_insert_init(Relation rel, int errAosegno);
extern Oid external_insert(ExternalInsertDesc extInsertDesc, HeapTuple instup);
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/20456278/src/include/access/pxfheaders.h
----------------------------------------------------------------------
diff --git a/src/include/access/pxfheaders.h b/src/include/access/pxfheaders.h
index f4adc6c..1c92da8 100644
--- a/src/include/access/pxfheaders.h
+++ b/src/include/access/pxfheaders.h
@@ -46,6 +46,8 @@ typedef struct sPxfInputData
PxfHdfsToken token;
ProjectionInfo *proj_info;
List *quals;
+ int agg_type;
+ int agg_groups;
} PxfInputData;
void build_http_header(PxfInputData *input);
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/20456278/src/include/executor/executor.h
----------------------------------------------------------------------
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index a6ff148..ea1dad2 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -72,6 +72,8 @@ struct ChunkTransportState; /* #include "cdb/cdbinterconnect.h" */
#define EXEC_FLAG_BACKWARD 0x0004 /* need backward scan */
#define EXEC_FLAG_MARK 0x0008 /* need mark/restore */
+#define EXEC_FLAG_EXTERNAL_AGG_COUNT 0x0010 /* can support external agg */
+
/*
* ExecEvalExpr was formerly a function containing a switch statement;
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/20456278/src/include/nodes/execnodes.h
----------------------------------------------------------------------
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 7a2e733..c6719a7 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -1846,6 +1846,7 @@ typedef struct ExternalScanState
struct FileScanDescData *ess_ScanDesc;
bool cdb_want_ctid;
ItemPointerData cdb_fake_ctid;
+ int parent_agg_type;
} ExternalScanState;
/* ----------------