!3753 索引扫描算子优化

Merge pull request !3753 from yyl/7-11-index
This commit is contained in:
opengauss_bot
2023-07-29 06:24:48 +00:00
committed by Gitee
11 changed files with 102 additions and 93 deletions

View File

@ -196,7 +196,33 @@ extern TupleTableSlot* ExecStoreDataRowTuple(
#endif
extern TupleTableSlot* ExecClearTuple(TupleTableSlot* slot);
extern void ExecClearMutilTuple(List* slots);
extern TupleTableSlot* ExecStoreVirtualTuple(TupleTableSlot* slot);
/* --------------------------------
* ExecStoreVirtualTuple
* Mark a slot as containing a virtual tuple.
*
* The protocol for loading a slot with virtual tuple data is:
* * Call ExecClearTuple to mark the slot empty.
* * Store data into the Datum/isnull arrays.
* * Call ExecStoreVirtualTuple to mark the slot valid.
* This is a bit unclean but it avoids one round of data copying.
* --------------------------------
*/
inline TupleTableSlot* ExecStoreVirtualTuple(TupleTableSlot* slot)
{
/*
* sanity checks
*/
Assert(slot != NULL);
Assert(slot->tts_tupleDescriptor != NULL);
Assert(TTS_EMPTY(slot));
slot->tts_flags &= ~TTS_FLAG_EMPTY;
slot->tts_nvalid = slot->tts_tupleDescriptor->natts;
return slot;
}
extern TupleTableSlot* ExecStoreAllNullTuple(TupleTableSlot* slot);
extern HeapTuple ExecCopySlotTuple(TupleTableSlot* slot);
extern MinimalTuple ExecCopySlotMinimalTuple(TupleTableSlot* slot, bool need_transform_anyarray = false);