mirror of https://github.com/citusdata/citus.git
Fix statical analysis findings (#5550)
parent
d5a969b055
commit
1af8ca8f7c
|
@ -1190,7 +1190,7 @@ CreateDistributedTableLike(TableConversionState *con)
|
||||||
* at this moment, but that's going to be the table in pg_dist_partition.
|
* at this moment, but that's going to be the table in pg_dist_partition.
|
||||||
*/
|
*/
|
||||||
Oid parentRelationId = PartitionParentOid(originalRelationId);
|
Oid parentRelationId = PartitionParentOid(originalRelationId);
|
||||||
Var *parentDistKey = DistPartitionKey(parentRelationId);
|
Var *parentDistKey = DistPartitionKeyOrError(parentRelationId);
|
||||||
char *parentDistKeyColumnName =
|
char *parentDistKeyColumnName =
|
||||||
ColumnToColumnName(parentRelationId, nodeToString(parentDistKey));
|
ColumnToColumnName(parentRelationId, nodeToString(parentDistKey));
|
||||||
|
|
||||||
|
|
|
@ -4353,6 +4353,13 @@ GetIntervalTypeInfo(char partitionMethod, Var *partitionColumn,
|
||||||
case DISTRIBUTE_BY_APPEND:
|
case DISTRIBUTE_BY_APPEND:
|
||||||
case DISTRIBUTE_BY_RANGE:
|
case DISTRIBUTE_BY_RANGE:
|
||||||
{
|
{
|
||||||
|
/* we need a valid partition column Var in this case */
|
||||||
|
if (partitionColumn == NULL)
|
||||||
|
{
|
||||||
|
ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR),
|
||||||
|
errmsg("unexpected partition column value: null"),
|
||||||
|
errdetail("Please report this to the Citus core team.")));
|
||||||
|
}
|
||||||
*intervalTypeId = partitionColumn->vartype;
|
*intervalTypeId = partitionColumn->vartype;
|
||||||
*intervalTypeMod = partitionColumn->vartypmod;
|
*intervalTypeMod = partitionColumn->vartypmod;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue