Support multi-shard JSON_TABLE

multi_shard_json_table
Onder Kalaci 2022-08-02 14:09:08 +02:00
parent 38df8eda55
commit ae3360e71f
2 changed files with 18 additions and 1 deletions

View File

@ -1154,7 +1154,8 @@ HasComplexRangeTableType(Query *queryTree)
if (rangeTableEntry->rtekind != RTE_RELATION &&
rangeTableEntry->rtekind != RTE_SUBQUERY &&
rangeTableEntry->rtekind != RTE_FUNCTION &&
rangeTableEntry->rtekind != RTE_VALUES)
rangeTableEntry->rtekind != RTE_VALUES &&
rangeTableEntry->rtekind != RTE_TABLEFUNC)
{
hasComplexRangeTableType = true;
}

View File

@ -349,6 +349,13 @@ IsFunctionOrValuesRTE(Node *node)
{
return true;
}
else if (rangeTblEntry->rtekind == RTE_TABLEFUNC)
{
TableFunc *tablefunc = rangeTblEntry->tablefunc;
return tablefunc->functype == TFT_JSON_TABLE;
}
}
return false;
@ -1836,6 +1843,15 @@ HasRecurringTuples(Node *node, RecurringTuplesType *recurType)
*recurType = RECURRING_TUPLES_VALUES;
return true;
}
else if (rangeTableEntry->rtekind == RTE_TABLEFUNC)
{
TableFunc *tablefunc = rangeTableEntry->tablefunc;
if (tablefunc->functype == TFT_JSON_TABLE)
{
*recurType = RECURRING_TUPLES_FUNCTION;
return true;
}
}
return false;
}