Improve the constants around row number mapping

pull/5052/head
Onur Tirtir 2021-05-03 19:19:01 +03:00
parent 181848cc80
commit 0f4c97e0d0
2 changed files with 4 additions and 4 deletions

View File

@ -24,8 +24,8 @@
#define COLUMNAR_FIRST_ROW_NUMBER ((uint64) 1)
#define COLUMNAR_MAX_ROW_NUMBER ((uint64) \
(COLUMNAR_FIRST_ROW_NUMBER + \
(uint64) VALID_ITEMPOINTER_OFFSETS * \
(uint64) VALID_BLOCKNUMBERS))
VALID_ITEMPOINTER_OFFSETS * \
VALID_BLOCKNUMBERS))
/*

View File

@ -29,7 +29,7 @@
* For this reason, we restrict itemPointer.offsetNumber
* to the following interval: [FirstOffsetNumber, MaxOffsetNumber).
*/
#define VALID_ITEMPOINTER_OFFSETS (MaxOffsetNumber - FirstOffsetNumber)
#define VALID_ITEMPOINTER_OFFSETS ((uint64) (MaxOffsetNumber - FirstOffsetNumber))
/*
* Number of valid ItemPointer BlockNumber's for "row number" <> "ItemPointer"
@ -43,7 +43,7 @@
* For this reason, we restrict itemPointer.blockNumber
* to the following interval: [0, MaxBlockNumber].
*/
#define VALID_BLOCKNUMBERS (MaxBlockNumber + 1)
#define VALID_BLOCKNUMBERS ((uint64) (MaxBlockNumber + 1))
const TableAmRoutine * GetColumnarTableAmRoutine(void);