mirror of https://github.com/citusdata/citus.git
Fix style
parent
42e41900b3
commit
23131a52cd
|
@ -233,6 +233,7 @@ AppendStatTypes(StringInfo buf, CreateStatsStmt *stmt)
|
|||
appendStringInfoString(buf, ")");
|
||||
}
|
||||
|
||||
|
||||
#if PG_VERSION_NUM >= PG_VERSION_14
|
||||
static void
|
||||
AppendColumnNames(StringInfo buf, CreateStatsStmt *stmt)
|
||||
|
@ -251,6 +252,8 @@ AppendColumnNames(StringInfo buf, CreateStatsStmt *stmt)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
static void
|
||||
AppendColumnNames(StringInfo buf, CreateStatsStmt *stmt)
|
||||
|
@ -277,6 +280,8 @@ AppendColumnNames(StringInfo buf, CreateStatsStmt *stmt)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
|
|
|
@ -286,6 +286,7 @@ ExplainSubPlans(DistributedPlan *distributedPlan, ExplainState *es)
|
|||
PlannedStmt *plan = subPlan->plan;
|
||||
IntoClause *into = NULL;
|
||||
ParamListInfo params = NULL;
|
||||
|
||||
/*
|
||||
* With PG14, we need to provide a string here,
|
||||
* for now we put an empty string, which is valid according to postgres.
|
||||
|
|
|
@ -643,22 +643,27 @@ ModifyPartialQuerySupported(Query *queryTree, bool multiShardQuery,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (commandType == CMD_UPDATE) {
|
||||
if (commandType == CMD_UPDATE)
|
||||
{
|
||||
/*
|
||||
* For
|
||||
*/
|
||||
RangeTblEntry* resultRTE = ExtractResultRelationRTE(queryTree);
|
||||
RangeTblEntry *resultRTE = ExtractResultRelationRTE(queryTree);
|
||||
|
||||
/*
|
||||
* FirstLowInvalidHeapAttributeNumber is added as an offset to rte->updatedCols.
|
||||
* So we substract that to get the column no for an updated column that matches
|
||||
* resultRTE->updatedcols.
|
||||
*/
|
||||
int updatedColNoWithOffset = partitionColumn->varattno - FirstLowInvalidHeapAttributeNumber;
|
||||
if (bms_is_member(updatedColNoWithOffset, resultRTE->updatedCols)) {
|
||||
int updatedColNoWithOffset = partitionColumn->varattno -
|
||||
FirstLowInvalidHeapAttributeNumber;
|
||||
if (bms_is_member(updatedColNoWithOffset, resultRTE->updatedCols))
|
||||
{
|
||||
targetEntryPartitionColumn = true;
|
||||
}
|
||||
|
||||
}else if (targetEntry->resno == partitionColumn->varattno) {
|
||||
}
|
||||
else if (targetEntry->resno == partitionColumn->varattno)
|
||||
{
|
||||
targetEntryPartitionColumn = true;
|
||||
}
|
||||
}
|
||||
|
@ -679,8 +684,8 @@ ModifyPartialQuerySupported(Query *queryTree, bool multiShardQuery,
|
|||
NULL, NULL);
|
||||
}
|
||||
|
||||
//TODO:: targetEntry->resno is wrong here, we SHOULD think about
|
||||
//TargetEntryChangesValue for update case based on 86dc90056dfdbd9d1b891718d2e5614e3e432f35.
|
||||
/*TODO:: targetEntry->resno is wrong here, we SHOULD think about */
|
||||
/*TargetEntryChangesValue for update case based on 86dc90056dfdbd9d1b891718d2e5614e3e432f35. */
|
||||
if (commandType == CMD_UPDATE && targetEntryPartitionColumn &&
|
||||
TargetEntryChangesValue(targetEntry, partitionColumn,
|
||||
queryTree->jointree))
|
||||
|
@ -1137,15 +1142,19 @@ ErrorIfOnConflictNotSupported(Query *queryTree)
|
|||
|
||||
bool setTargetEntryPartitionColumn = false;
|
||||
|
||||
if (partitionColumn) {
|
||||
RangeTblEntry* resultRTE = ExtractResultRelationRTE(queryTree);
|
||||
if (partitionColumn)
|
||||
{
|
||||
RangeTblEntry *resultRTE = ExtractResultRelationRTE(queryTree);
|
||||
|
||||
/*
|
||||
* FirstLowInvalidHeapAttributeNumber is added as an offset to rte->updatedCols.
|
||||
* So we substract that to get the column no for an updated column that matches
|
||||
* resultRTE->updatedcols.
|
||||
*/
|
||||
int updatedColNoWithOffset = partitionColumn->varattno - FirstLowInvalidHeapAttributeNumber;
|
||||
if (bms_is_member(updatedColNoWithOffset, resultRTE->updatedCols)) {
|
||||
int updatedColNoWithOffset = partitionColumn->varattno -
|
||||
FirstLowInvalidHeapAttributeNumber;
|
||||
if (bms_is_member(updatedColNoWithOffset, resultRTE->updatedCols))
|
||||
{
|
||||
setTargetEntryPartitionColumn = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,7 +140,8 @@ ListToHashSet(List *itemList, Size keySize, bool isStringList)
|
|||
flags |= HASH_BLOBS;
|
||||
}
|
||||
#if PG_VERSION_NUM >= PG_VERSION_14
|
||||
else {
|
||||
else
|
||||
{
|
||||
flags |= HASH_STRINGS;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -63,7 +63,7 @@ typedef struct DDLJob
|
|||
} DDLJob;
|
||||
|
||||
|
||||
extern void multi_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
|
||||
extern void multi_ProcessUtility(PlannedStmt * pstmt, const char *queryString,
|
||||
#if PG_VERSION_NUM >= PG_VERSION_14
|
||||
bool readOnlyTree,
|
||||
#endif
|
||||
|
|
|
@ -139,7 +139,7 @@ SELECT * FROM multi_extension.print_extension_changes();
|
|||
| function alter_role_if_exists(text,text) boolean
|
||||
| function any_value(anyelement) anyelement
|
||||
| function any_value_agg(anyelement,anyelement) anyelement
|
||||
| function array_cat_agg(anycompatiblearray) anycompatiblearray
|
||||
| function array_cat_agg(anyarray) anycompatiblearray
|
||||
| function assign_distributed_transaction_id(integer,bigint,timestamp with time zone) void
|
||||
| function authinfo_valid(text) boolean
|
||||
| function broadcast_intermediate_result(text,text) bigint
|
||||
|
|
|
@ -26,7 +26,7 @@ ORDER BY 1;
|
|||
function alter_table_set_access_method(regclass,text)
|
||||
function any_value(anyelement)
|
||||
function any_value_agg(anyelement,anyelement)
|
||||
function array_cat_agg(anycompatiblearray)
|
||||
function array_cat_agg(anyarray)
|
||||
function assign_distributed_transaction_id(integer,bigint,timestamp with time zone)
|
||||
function authinfo_valid(text)
|
||||
function broadcast_intermediate_result(text,text)
|
||||
|
|
|
@ -23,7 +23,7 @@ ORDER BY 1;
|
|||
function alter_table_set_access_method(regclass,text)
|
||||
function any_value(anyelement)
|
||||
function any_value_agg(anyelement,anyelement)
|
||||
function array_cat_agg(anycompatiblearray)
|
||||
function array_cat_agg(anyarray)
|
||||
function assign_distributed_transaction_id(integer,bigint,timestamp with time zone)
|
||||
function authinfo_valid(text)
|
||||
function broadcast_intermediate_result(text,text)
|
||||
|
|
Loading…
Reference in New Issue