From b6dce50e0087f127cdcb2130ba6da72226d94248 Mon Sep 17 00:00:00 2001 From: sundechao Date: Mon, 23 Sep 2024 21:51:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=9F=E5=BC=83tts=5FtupslotTableAm=E5=8F=82?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E6=9B=B4=E6=96=B0=E4=B8=BAtts=5Ftam=5Fops?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/runtime/executor/execExprInterp.cpp | 8 -------- src/gausskernel/runtime/executor/nodeModifyTable.cpp | 4 ++-- src/include/executor/tuptable.h | 1 - 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/gausskernel/runtime/executor/execExprInterp.cpp b/src/gausskernel/runtime/executor/execExprInterp.cpp index 0f30f0217..1db787eca 100644 --- a/src/gausskernel/runtime/executor/execExprInterp.cpp +++ b/src/gausskernel/runtime/executor/execExprInterp.cpp @@ -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]; diff --git a/src/gausskernel/runtime/executor/nodeModifyTable.cpp b/src/gausskernel/runtime/executor/nodeModifyTable.cpp index b3b1f65df..cb19d9989 100644 --- a/src/gausskernel/runtime/executor/nodeModifyTable.cpp +++ b/src/gausskernel/runtime/executor/nodeModifyTable.cpp @@ -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; diff --git a/src/include/executor/tuptable.h b/src/include/executor/tuptable.h index 0e005163a..fbb076f74 100644 --- a/src/include/executor/tuptable.h +++ b/src/include/executor/tuptable.h @@ -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;