mirror of https://github.com/citusdata/citus.git
Make some intermediate results functions public
parent
36ee21c323
commit
66f9f1d6cd
|
@ -76,10 +76,6 @@ typedef struct RemoteFileDestReceiver
|
|||
} RemoteFileDestReceiver;
|
||||
|
||||
|
||||
static RemoteFileDestReceiver * CreateRemoteFileDestReceiver(char *resultId,
|
||||
EState *executorState,
|
||||
List *initialNodeList,
|
||||
bool writeLocalFile);
|
||||
static void RemoteFileDestReceiverStartup(DestReceiver *dest, int operation,
|
||||
TupleDesc inputTupleDescriptor);
|
||||
static StringInfo ConstructCopyResultStatement(const char *resultId);
|
||||
|
@ -123,8 +119,9 @@ broadcast_intermediate_result(PG_FUNCTION_ARGS)
|
|||
|
||||
nodeList = ActivePrimaryNodeList();
|
||||
estate = CreateExecutorState();
|
||||
resultDest = CreateRemoteFileDestReceiver(resultIdString, estate, nodeList,
|
||||
writeLocalFile);
|
||||
resultDest = (RemoteFileDestReceiver *) CreateRemoteFileDestReceiver(resultIdString,
|
||||
estate, nodeList,
|
||||
writeLocalFile);
|
||||
|
||||
ExecuteQueryStringIntoDestReceiver(queryString, paramListInfo,
|
||||
(DestReceiver *) resultDest);
|
||||
|
@ -155,8 +152,9 @@ create_intermediate_result(PG_FUNCTION_ARGS)
|
|||
CheckCitusVersion(ERROR);
|
||||
|
||||
estate = CreateExecutorState();
|
||||
resultDest = CreateRemoteFileDestReceiver(resultIdString, estate, nodeList,
|
||||
writeLocalFile);
|
||||
resultDest = (RemoteFileDestReceiver *) CreateRemoteFileDestReceiver(resultIdString,
|
||||
estate, nodeList,
|
||||
writeLocalFile);
|
||||
|
||||
ExecuteQueryStringIntoDestReceiver(queryString, paramListInfo,
|
||||
(DestReceiver *) resultDest);
|
||||
|
@ -171,7 +169,7 @@ create_intermediate_result(PG_FUNCTION_ARGS)
|
|||
* CreateRemoteFileDestReceiver creates a DestReceiver that streams results
|
||||
* to a set of worker nodes.
|
||||
*/
|
||||
static RemoteFileDestReceiver *
|
||||
DestReceiver *
|
||||
CreateRemoteFileDestReceiver(char *resultId, EState *executorState,
|
||||
List *initialNodeList, bool writeLocalFile)
|
||||
{
|
||||
|
@ -193,7 +191,7 @@ CreateRemoteFileDestReceiver(char *resultId, EState *executorState,
|
|||
resultDest->memoryContext = CurrentMemoryContext;
|
||||
resultDest->writeLocalFile = writeLocalFile;
|
||||
|
||||
return resultDest;
|
||||
return (DestReceiver *) resultDest;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -131,7 +131,6 @@ static bool RelationInfoContainsRecurringTuples(PlannerInfo *plannerInfo,
|
|||
RelOptInfo *relationInfo,
|
||||
RecurringTuplesType *recurType);
|
||||
static bool HasRecurringTuples(Node *node, RecurringTuplesType *recurType);
|
||||
static bool ContainsReadIntermediateResultFunction(Node *node);
|
||||
static bool IsReadIntermediateResultFunction(Node *node);
|
||||
static void ValidateClauseList(List *clauseList);
|
||||
static bool ExtractFromExpressionWalker(Node *node,
|
||||
|
@ -2237,7 +2236,7 @@ HasRecurringTuples(Node *node, RecurringTuplesType *recurType)
|
|||
* ContainsReadIntermediateResultFunction determines whether an expresion tree contains
|
||||
* a call to the read_intermediate_results function.
|
||||
*/
|
||||
static bool
|
||||
bool
|
||||
ContainsReadIntermediateResultFunction(Node *node)
|
||||
{
|
||||
return FindNodeCheck(node, IsReadIntermediateResultFunction);
|
||||
|
|
|
@ -16,12 +16,14 @@
|
|||
|
||||
#include "distributed/multi_copy.h"
|
||||
#include "nodes/execnodes.h"
|
||||
#include "nodes/execnodes.h"
|
||||
#include "nodes/pg_list.h"
|
||||
#include "tcop/dest.h"
|
||||
#include "utils/palloc.h"
|
||||
|
||||
|
||||
extern DestReceiver * CreateRemoteFileDestReceiver(char *resultId, EState *executorState,
|
||||
List *initialNodeList, bool
|
||||
writeLocalFile);
|
||||
extern void ReceiveQueryResultViaCopy(const char *resultId);
|
||||
extern void RemoveIntermediateResultsDirectory(void);
|
||||
|
||||
|
|
|
@ -192,6 +192,7 @@ extern PlannerRestrictionContext * FilterPlannerRestrictionForQuery(
|
|||
Query *query);
|
||||
extern bool SafeToPushdownWindowFunction(Query *query, StringInfo *errorDetail);
|
||||
extern bool TargetListOnPartitionColumn(Query *query, List *targetEntryList);
|
||||
extern bool ContainsReadIntermediateResultFunction(Node *node);
|
||||
extern MultiNode * ParentNode(MultiNode *multiNode);
|
||||
extern MultiNode * ChildNode(MultiUnaryNode *multiNode);
|
||||
extern MultiNode * GrandChildNode(MultiUnaryNode *multiNode);
|
||||
|
|
Loading…
Reference in New Issue