1#include "duckdb/common/constants.hpp"
2
3#include <limits>
4
5using namespace duckdb;
6using namespace std;
7
8namespace duckdb {
9
10const idx_t INVALID_INDEX = (idx_t)-1;
11const row_t MAX_ROW_ID = 4611686018427388000ULL; // 2^62
12const column_t COLUMN_IDENTIFIER_ROW_ID = (column_t)-1;
13const sel_t ZERO_VECTOR[STANDARD_VECTOR_SIZE] = {0};
14const double PI = 3.141592653589793;
15
16const transaction_t TRANSACTION_ID_START = 4611686018427388000ULL; // 2^62
17const transaction_t NOT_DELETED_ID = std::numeric_limits<transaction_t>::max() - 1; // 2^64 - 1
18const transaction_t MAXIMUM_QUERY_ID = std::numeric_limits<transaction_t>::max(); // 2^64
19
20uint64_t NextPowerOfTwo(uint64_t v) {
21 v--;
22 v |= v >> 1;
23 v |= v >> 2;
24 v |= v >> 4;
25 v |= v >> 8;
26 v |= v >> 16;
27 v |= v >> 32;
28 v++;
29 return v;
30}
31
32} // namespace duckdb
33