@@ -76,8 +76,7 @@ std::string get_bad_data_dir();
7676std::string get_data_file (const std::string& filename, bool is_good = true );
7777
7878template <typename T>
79- static inline void assert_vector_equal (const std::vector<T>& left,
80- const std::vector<T>& right) {
79+ inline void assert_vector_equal (const std::vector<T>& left, const std::vector<T>& right) {
8180 ASSERT_EQ (left.size (), right.size ());
8281
8382 for (size_t i = 0 ; i < left.size (); ++i) {
@@ -86,7 +85,7 @@ static inline void assert_vector_equal(const std::vector<T>& left,
8685}
8786
8887template <typename T>
89- static inline bool vector_equal (const std::vector<T>& left, const std::vector<T>& right) {
88+ inline bool vector_equal (const std::vector<T>& left, const std::vector<T>& right) {
9089 if (left.size () != right.size ()) {
9190 return false ;
9291 }
@@ -103,7 +102,7 @@ static inline bool vector_equal(const std::vector<T>& left, const std::vector<T>
103102}
104103
105104template <typename T>
106- static std::vector<T> slice (const std::vector<T>& values, int start, int end) {
105+ std::vector<T> slice (const std::vector<T>& values, int start, int end) {
107106 if (end < start) {
108107 return std::vector<T>(0 );
109108 }
@@ -176,21 +175,20 @@ std::shared_ptr<Buffer> EncodeValues(Encoding::type encoding, bool use_dictionar
176175}
177176
178177template <typename T>
179- static void InitValues (int num_values, uint32_t seed, std::vector<T>& values,
180- std::vector<uint8_t >& buffer) {
178+ void InitValues (int num_values, uint32_t seed, std::vector<T>& values,
179+ std::vector<uint8_t >& buffer) {
181180 random_numbers (num_values, seed, std::numeric_limits<T>::min (),
182181 std::numeric_limits<T>::max (), values.data ());
183182}
184183
185184template <typename T>
186- static void InitValues (int num_values, std::vector<T>& values,
187- std::vector<uint8_t >& buffer) {
185+ void InitValues (int num_values, std::vector<T>& values, std::vector<uint8_t >& buffer) {
188186 InitValues (num_values, 0 , values, buffer);
189187}
190188
191189template <typename T>
192- static void InitDictValues (int num_values, int num_dicts, std::vector<T>& values,
193- std::vector<uint8_t >& buffer) {
190+ void InitDictValues (int num_values, int num_dicts, std::vector<T>& values,
191+ std::vector<uint8_t >& buffer) {
194192 int repeat_factor = num_values / num_dicts;
195193 InitValues<T>(num_dicts, values, buffer);
196194 // add some repeated values
@@ -347,7 +345,7 @@ inline void DataPageBuilder<BooleanType>::AppendValues(const ColumnDescriptor* d
347345}
348346
349347template <typename Type>
350- static std::shared_ptr<DataPageV1> MakeDataPage (
348+ std::shared_ptr<DataPageV1> MakeDataPage (
351349 const ColumnDescriptor* d, const std::vector<typename Type::c_type>& values,
352350 int num_vals, Encoding::type encoding, const uint8_t * indices, int indices_size,
353351 const std::vector<int16_t >& def_levels, int16_t max_def_level,
@@ -441,7 +439,7 @@ inline std::shared_ptr<Buffer> DictionaryPageBuilder<BooleanType>::AppendValues(
441439}
442440
443441template <typename Type>
444- inline static std::shared_ptr<DictionaryPage> MakeDictPage (
442+ inline std::shared_ptr<DictionaryPage> MakeDictPage (
445443 const ColumnDescriptor* d, const std::vector<typename Type::c_type>& values,
446444 const std::vector<int >& values_per_page, Encoding::type encoding,
447445 std::vector<std::shared_ptr<Buffer>>& rle_indices) {
@@ -463,15 +461,13 @@ inline static std::shared_ptr<DictionaryPage> MakeDictPage(
463461
464462// Given def/rep levels and values create multiple dict pages
465463template <typename Type>
466- inline static void PaginateDict (const ColumnDescriptor* d,
467- const std::vector<typename Type::c_type>& values,
468- const std::vector<int16_t >& def_levels,
469- int16_t max_def_level,
470- const std::vector<int16_t >& rep_levels,
471- int16_t max_rep_level, int num_levels_per_page,
472- const std::vector<int >& values_per_page,
473- std::vector<std::shared_ptr<Page>>& pages,
474- Encoding::type encoding = Encoding::RLE_DICTIONARY ) {
464+ inline void PaginateDict (const ColumnDescriptor* d,
465+ const std::vector<typename Type::c_type>& values,
466+ const std::vector<int16_t >& def_levels, int16_t max_def_level,
467+ const std::vector<int16_t >& rep_levels, int16_t max_rep_level,
468+ int num_levels_per_page, const std::vector<int >& values_per_page,
469+ std::vector<std::shared_ptr<Page>>& pages,
470+ Encoding::type encoding = Encoding::RLE_DICTIONARY ) {
475471 int num_pages = static_cast <int >(values_per_page.size ());
476472 std::vector<std::shared_ptr<Buffer>> rle_indices;
477473 std::shared_ptr<DictionaryPage> dict_page =
@@ -501,15 +497,14 @@ inline static void PaginateDict(const ColumnDescriptor* d,
501497
502498// Given def/rep levels and values create multiple plain pages
503499template <typename Type>
504- static inline void PaginatePlain (const ColumnDescriptor* d,
505- const std::vector<typename Type::c_type>& values,
506- const std::vector<int16_t >& def_levels,
507- int16_t max_def_level,
508- const std::vector<int16_t >& rep_levels,
509- int16_t max_rep_level, int num_levels_per_page,
510- const std::vector<int >& values_per_page,
511- std::vector<std::shared_ptr<Page>>& pages,
512- Encoding::type encoding = Encoding::PLAIN ) {
500+ inline void PaginatePlain (const ColumnDescriptor* d,
501+ const std::vector<typename Type::c_type>& values,
502+ const std::vector<int16_t >& def_levels, int16_t max_def_level,
503+ const std::vector<int16_t >& rep_levels, int16_t max_rep_level,
504+ int num_levels_per_page,
505+ const std::vector<int >& values_per_page,
506+ std::vector<std::shared_ptr<Page>>& pages,
507+ Encoding::type encoding = Encoding::PLAIN ) {
513508 int num_pages = static_cast <int >(values_per_page.size ());
514509 int def_level_start = 0 ;
515510 int def_level_end = 0 ;
@@ -537,14 +532,12 @@ static inline void PaginatePlain(const ColumnDescriptor* d,
537532
538533// Generates pages from randomly generated data
539534template <typename Type>
540- static inline int MakePages (const ColumnDescriptor* d, int num_pages, int levels_per_page,
541- std::vector<int16_t >& def_levels,
542- std::vector<int16_t >& rep_levels,
543- std::vector<typename Type::c_type>& values,
544- std::vector<uint8_t >& buffer,
545- std::vector<std::shared_ptr<Page>>& pages,
546- Encoding::type encoding = Encoding::PLAIN ,
547- uint32_t seed = 0 ) {
535+ inline int MakePages (const ColumnDescriptor* d, int num_pages, int levels_per_page,
536+ std::vector<int16_t >& def_levels, std::vector<int16_t >& rep_levels,
537+ std::vector<typename Type::c_type>& values,
538+ std::vector<uint8_t >& buffer,
539+ std::vector<std::shared_ptr<Page>>& pages,
540+ Encoding::type encoding = Encoding::PLAIN , uint32_t seed = 0 ) {
548541 int num_levels = levels_per_page * num_pages;
549542 int num_values = 0 ;
550543 int16_t zero = 0 ;
0 commit comments