mirror of https://github.com/citusdata/citus.git
Run check_indent on COPY changes
parent
2a8121ca5f
commit
9bb579b1b1
|
@ -239,7 +239,8 @@ typedef struct ShardConnections
|
||||||
static HTAB * CreateShardConnectionHash(void);
|
static HTAB * CreateShardConnectionHash(void);
|
||||||
static bool IsUniformHashDistribution(ShardInterval **shardIntervalArray,
|
static bool IsUniformHashDistribution(ShardInterval **shardIntervalArray,
|
||||||
int shardCount);
|
int shardCount);
|
||||||
static FmgrInfo * ShardIntervalCompareFunction(Var *partitionColumn, char partitionMethod);
|
static FmgrInfo * ShardIntervalCompareFunction(Var *partitionColumn, char
|
||||||
|
partitionMethod);
|
||||||
static ShardInterval * FindShardInterval(Datum partitionColumnValue,
|
static ShardInterval * FindShardInterval(Datum partitionColumnValue,
|
||||||
ShardInterval **shardIntervalCache,
|
ShardInterval **shardIntervalCache,
|
||||||
int shardCount, char partitionMethod,
|
int shardCount, char partitionMethod,
|
||||||
|
@ -319,7 +320,8 @@ CitusCopyFrom(CopyStmt *copyStatement, char* completionTag)
|
||||||
if (partitionMethod != DISTRIBUTE_BY_RANGE && partitionMethod != DISTRIBUTE_BY_HASH)
|
if (partitionMethod != DISTRIBUTE_BY_RANGE && partitionMethod != DISTRIBUTE_BY_HASH)
|
||||||
{
|
{
|
||||||
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||||
errmsg("COPY is only supported for hash- and range-partitioned tables")));
|
errmsg(
|
||||||
|
"COPY is only supported for hash- and range-partitioned tables")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* resolve hash function for partition column */
|
/* resolve hash function for partition column */
|
||||||
|
@ -682,17 +684,18 @@ SearchCachedShardInterval(Datum partitionColumnValue, ShardInterval** shardInter
|
||||||
if (DatumGetInt32(FunctionCall2Coll(compareFunction,
|
if (DatumGetInt32(FunctionCall2Coll(compareFunction,
|
||||||
DEFAULT_COLLATION_OID,
|
DEFAULT_COLLATION_OID,
|
||||||
partitionColumnValue,
|
partitionColumnValue,
|
||||||
shardIntervalCache[middleIndex]->minValue)) < 0)
|
shardIntervalCache[middleIndex]->minValue)) <
|
||||||
|
0)
|
||||||
{
|
{
|
||||||
upperBoundIndex = middleIndex;
|
upperBoundIndex = middleIndex;
|
||||||
}
|
}
|
||||||
else if (DatumGetInt32(FunctionCall2Coll(compareFunction,
|
else if (DatumGetInt32(FunctionCall2Coll(compareFunction,
|
||||||
DEFAULT_COLLATION_OID,
|
DEFAULT_COLLATION_OID,
|
||||||
partitionColumnValue,
|
partitionColumnValue,
|
||||||
shardIntervalCache[middleIndex]->maxValue)) <= 0)
|
shardIntervalCache[middleIndex]->maxValue))
|
||||||
|
<= 0)
|
||||||
{
|
{
|
||||||
return shardIntervalCache[middleIndex];
|
return shardIntervalCache[middleIndex];
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -848,7 +851,8 @@ AppendCopyOptions(StringInfo command, List *copyOptionList)
|
||||||
{
|
{
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
errmsg("argument to option \"%s\" must be a list of column names",
|
errmsg(
|
||||||
|
"argument to option \"%s\" must be a list of column names",
|
||||||
option->defname)));
|
option->defname)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue