38 #define CHUNK_KEY_DB_IDX 0
39 #define CHUNK_KEY_TABLE_IDX 1
40 #define CHUNK_KEY_COLUMN_IDX 2
41 #define CHUNK_KEY_FRAGMENT_IDX 3
42 #define CHUNK_KEY_VARLEN_IDX 4
45 return key.size() == 2;
49 return key.size() >= 2;
68 return key.size() == 3;
72 return key.size() == 5;
76 return key.size() == 5 && key[4] == 1;
80 return key.size() == 5 && key[4] == 2;
91 CHECK(key.size() >= 4);
99 std::ostringstream tss;
100 for (
auto vecIt = key.begin(); vecIt != key.end(); ++vecIt) {
101 tss << *vecIt <<
",";
std::vector< int > ChunkKey
bool is_table_key(const ChunkKey &key)
bool is_varlen_data_key(const ChunkKey &key)
#define CHUNK_KEY_FRAGMENT_IDX
ChunkKey get_table_key(const ChunkKey &key)
std::string show_chunk(const ChunkKey &key)
bool is_varlen_index_key(const ChunkKey &key)
int get_fragment(const ChunkKey &key)
#define CHUNK_KEY_TABLE_IDX
bool has_table_prefix(const ChunkKey &key)
bool is_column_key(const ChunkKey &key)
std::pair< int, int > get_table_prefix(const ChunkKey &key)
#define CHUNK_KEY_COLUMN_IDX
bool in_same_table(const ChunkKey &left_key, const ChunkKey &right_key)
ChunkKey get_fragment_key(const ChunkKey &key)
bool is_varlen_key(const ChunkKey &key)