@@ -27,6 +27,17 @@ class ColumnDate : public Column {
2727 void AppendRaw (uint16_t value);
2828 uint16_t RawAt (size_t n) const ;
2929
30+ // / Swap two Elements/rows in the column
31+ void SwapElements (size_t pos1, size_t pos2);
32+
33+ // / Test if the value at position 1 is greater than the value at position 2
34+ // / No range checking is performed for performance
35+ bool CompareElementsGT (size_t pos1, size_t pos2) const ;
36+
37+ // / Test if the value at position 1 is less than the value at position 2
38+ // / No range checking is performed for performance
39+ bool CompareElementsLT (size_t pos1, size_t pos2) const ;
40+
3041 // / Appends content of given column to the end of current one.
3142 void Append (ColumnRef column) override ;
3243
@@ -42,6 +53,12 @@ class ColumnDate : public Column {
4253 // / Returns count of rows in the column.
4354 size_t Size () const override ;
4455
56+ // / Increase the capacity of the column
57+ void Reserve (size_t new_cap) override ;
58+
59+ // / Returns the capacity of the column
60+ size_t Capacity () const override ;
61+
4562 // / Makes slice of the current column.
4663 ColumnRef Slice (size_t begin, size_t len) const override ;
4764 ColumnRef CloneEmpty () const override ;
@@ -77,6 +94,17 @@ class ColumnDate32 : public Column {
7794 void AppendRaw (int32_t value);
7895 int32_t RawAt (size_t n) const ;
7996
97+ // / Swap two Elements/rows in the column
98+ void SwapElements (size_t pos1, size_t pos2);
99+
100+ // / Test if the value at position 1 is greater than the value at position 2
101+ // / No range checking is performed for performance
102+ bool CompareElementsGT (size_t pos1, size_t pos2) const ;
103+
104+ // / Test if the value at position 1 is less than the value at position 2
105+ // / No range checking is performed for performance
106+ bool CompareElementsLT (size_t pos1, size_t pos2) const ;
107+
80108 // / Loads column data from input stream.
81109 bool LoadBody (InputStream* input, size_t rows) override ;
82110
@@ -89,6 +117,12 @@ class ColumnDate32 : public Column {
89117 // / Returns count of rows in the column.
90118 size_t Size () const override ;
91119
120+ // / Increase the capacity of the column
121+ void Reserve (size_t new_cap) override ;
122+
123+ // / Returns the capacity of the column
124+ size_t Capacity () const override ;
125+
92126 // / Makes slice of the current column.
93127 ColumnRef Slice (size_t begin, size_t len) const override ;
94128 ColumnRef CloneEmpty () const override ;
@@ -119,6 +153,17 @@ class ColumnDateTime : public Column {
119153 // / Timezone associated with a data column.
120154 std::string Timezone () const ;
121155
156+ // / Swap two Elements/rows in the column
157+ void SwapElements (size_t pos1, size_t pos2);
158+
159+ // / Test if the value at position 1 is greater than the value at position 2
160+ // / No range checking is performed for performance
161+ bool CompareElementsGT (size_t pos1, size_t pos2) const ;
162+
163+ // / Test if the value at position 1 is less than the value at position 2
164+ // / No range checking is performed for performance
165+ bool CompareElementsLT (size_t pos1, size_t pos2) const ;
166+
122167public:
123168 // / Appends content of given column to the end of current one.
124169 void Append (ColumnRef column) override ;
@@ -135,6 +180,12 @@ class ColumnDateTime : public Column {
135180 // / Returns count of rows in the column.
136181 size_t Size () const override ;
137182
183+ // / Increase the capacity of the column
184+ void Reserve (size_t new_cap) override ;
185+
186+ // / Returns the capacity of the column
187+ size_t Capacity () const override ;
188+
138189 // / Makes slice of the current column.
139190 ColumnRef Slice (size_t begin, size_t len) const override ;
140191 ColumnRef CloneEmpty () const override ;
@@ -169,6 +220,17 @@ class ColumnDateTime64 : public Column {
169220 // / Timezone associated with a data column.
170221 std::string Timezone () const ;
171222
223+ // / Swap two Elements/rows in the column
224+ void SwapElements (size_t pos1, size_t pos2);
225+
226+ // / Test if the value at position 1 is greater than the value at position 2
227+ // / No range checking is performed for performance
228+ bool CompareElementsGT (size_t pos1, size_t pos2) const ;
229+
230+ // / Test if the value at position 1 is less than the value at position 2
231+ // / No range checking is performed for performance
232+ bool CompareElementsLT (size_t pos1, size_t pos2) const ;
233+
172234public:
173235 // / Appends content of given column to the end of current one.
174236 void Append (ColumnRef column) override ;
@@ -185,6 +247,12 @@ class ColumnDateTime64 : public Column {
185247 // / Returns count of rows in the column.
186248 size_t Size () const override ;
187249
250+ // / Increase the capacity of the column
251+ void Reserve (size_t new_cap) override ;
252+
253+ // / Returns the capacity of the column
254+ size_t Capacity () const override ;
255+
188256 // / Makes slice of the current column.
189257 ColumnRef Slice (size_t begin, size_t len) const override ;
190258 ColumnRef CloneEmpty () const override ;
0 commit comments