废弃tts_tupslotTableAm参数,更新为tts_tam_ops

This commit is contained in:
sundechao
2024-09-23 21:51:12 +08:00
parent c2c0275abe
commit b6dce50e00
3 changed files with 2 additions and 11 deletions

View File

@ -695,7 +695,6 @@ ExecInterpExpr(ExprState *state, ExprContext *econtext, bool *isnull, ExprDoneCo
* directly out of the slot's decomposed-data arrays. But let's
* have an Assert to check that that did happen.
*/
// Assert((innerslot->tts_tupslotTableAm == TAM_HEAP) ? (attnum >= 0 && attnum < innerslot->tts_nvalid) : (attnum >= 0));
*op->resvalue = innerslot->tts_values[attnum];
*op->resnull = innerslot->tts_isnull[attnum];
@ -707,8 +706,6 @@ ExecInterpExpr(ExprState *state, ExprContext *econtext, bool *isnull, ExprDoneCo
int attnum = op->d.var.attnum;
/* See EEOP_INNER_VAR comments */
// Assert((outerslot->tts_tupslotTableAm == TAM_HEAP) ? (attnum >= 0 && attnum < outerslot->tts_nvalid) : (attnum >= 0));
*op->resvalue = outerslot->tts_values[attnum];
*op->resnull = outerslot->tts_isnull[attnum];
@ -720,8 +717,6 @@ ExecInterpExpr(ExprState *state, ExprContext *econtext, bool *isnull, ExprDoneCo
int attnum = op->d.var.attnum;
/* See EEOP_INNER_VAR comments */
// Assert((scanslot->tts_tupslotTableAm == TAM_HEAP) ? (attnum >= 0 && attnum < scanslot->tts_nvalid) : (attnum >= 0));
*op->resvalue = scanslot->tts_values[attnum];
*op->resnull = scanslot->tts_isnull[attnum];
@ -822,7 +817,6 @@ ExecInterpExpr(ExprState *state, ExprContext *econtext, bool *isnull, ExprDoneCo
* We do not need CheckVarSlotCompatibility here; that was taken
* care of at compilation time. But see EEOP_INNER_VAR comments.
*/
// Assert((innerslot->tts_tupslotTableAm == TAM_HEAP) ? (attnum >= 0 && attnum < innerslot->tts_nvalid) : (attnum >= 0));
Assert(resultnum >= 0 && resultnum < resultslot->tts_tupleDescriptor->natts);
resultslot->tts_values[resultnum] = innerslot->tts_values[attnum];
resultslot->tts_isnull[resultnum] = innerslot->tts_isnull[attnum];
@ -839,7 +833,6 @@ ExecInterpExpr(ExprState *state, ExprContext *econtext, bool *isnull, ExprDoneCo
* We do not need CheckVarSlotCompatibility here; that was taken
* care of at compilation time. But see EEOP_INNER_VAR comments.
*/
// Assert((outerslot->tts_tupslotTableAm == TAM_HEAP) ? (attnum >= 0 && attnum < outerslot->tts_nvalid) : (attnum >= 0));
Assert(resultnum >= 0 && resultnum < resultslot->tts_tupleDescriptor->natts);
resultslot->tts_values[resultnum] = outerslot->tts_values[attnum];
resultslot->tts_isnull[resultnum] = outerslot->tts_isnull[attnum];
@ -856,7 +849,6 @@ ExecInterpExpr(ExprState *state, ExprContext *econtext, bool *isnull, ExprDoneCo
* We do not need CheckVarSlotCompatibility here; that was taken
* care of at compilation time. But see EEOP_INNER_VAR comments.
*/
// Assert((scanslot->tts_tupslotTableAm == TAM_HEAP) ? (attnum >= 0 && attnum < scanslot->tts_nvalid) : (attnum >= 0));
Assert(resultnum >= 0 && resultnum < resultslot->tts_tupleDescriptor->natts);
resultslot->tts_values[resultnum] = scanslot->tts_values[attnum];
resultslot->tts_isnull[resultnum] = scanslot->tts_isnull[attnum];

View File

@ -863,7 +863,7 @@ static void ConstraintsForExecUpsert(Relation resultRelationDesc)
static void UpdateSlotTupleInfo(TupleTableSlot* slot, Tuple tuple)
{
bool isUheapTuple = TUPLE_IS_UHEAP_TUPLE(tuple);
if (!isUheapTuple && slot->tts_tupslotTableAm == TAM_USTORE) {
if (!isUheapTuple && slot->tts_tam_ops == TableAmUstore) {
UHeapTuple tup = (UHeapTuple)slot->tts_tuple;
HeapTuple htup = (HeapTuple)tuple;
tup->ctid = htup->t_self;
@ -873,7 +873,7 @@ static void UpdateSlotTupleInfo(TupleTableSlot* slot, Tuple tuple)
tup->xmin = htup->xmin;
tup->xmax = htup->xmax;
} else {
Assert(isUheapTuple && slot->tts_tupslotTableAm == TAM_HEAP);
Assert(isUheapTuple && slot->tts_tam_ops == TableAmHeap);
HeapTuple tup = (HeapTuple)slot->tts_tuple;
UHeapTuple utup = (UHeapTuple)tuple;
tup->t_self = utup->ctid;

View File

@ -163,7 +163,6 @@ typedef struct TupleTableSlot {
Oid tts_xcnodeoid; /* Oid of node from where the datarow is fetched */
MemoryContext tts_per_tuple_mcxt;
#endif
TableAmType tts_tupslotTableAm; /* slots's tuple table type */
bool tts_ndpAggHandled; /* slot is from ndp backend, handled by aggregate */
} TupleTableSlot;