Skip to content

Commit df6663d

Browse files
committed
refactoring of serializations
1 parent bc417cf commit df6663d

35 files changed

Lines changed: 40 additions & 565 deletions

programs/server/config.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
This setting could be used to switch replication to another network interface
118118
(the server may be connected to multiple networks via multiple addresses)
119119
-->
120-
121120
<!--
122121
<interserver_http_host>example.yandex.ru</interserver_http_host>
123122
-->
@@ -143,7 +142,6 @@
143142
-->
144143
<!-- <listen_host>::</listen_host> -->
145144

146-
147145
<!-- Same for hosts without support for IPv6: -->
148146
<!-- <listen_host>0.0.0.0</listen_host> -->
149147

src/Columns/ColumnArray.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,22 +1206,4 @@ void ColumnArray::gather(ColumnGathererStream & gatherer)
12061206
gatherer.gather(*this);
12071207
}
12081208

1209-
void ColumnArray::getIndicesOfNonDefaultValues(IColumn::Offsets & indices) const
1210-
{
1211-
const auto & offsets_data = getOffsets();
1212-
for (size_t i = 0; i < offsets_data.size(); ++i)
1213-
if (offsets_data[i] != offsets_data[i - 1])
1214-
indices.push_back(i);
1215-
}
1216-
1217-
size_t ColumnArray::getNumberOfNonDefaultValues() const
1218-
{
1219-
const auto & offsets_data = getOffsets();
1220-
size_t res = 0;
1221-
for (size_t i = 0; i < offsets_data.size(); ++i)
1222-
res += (offsets_data[i] != offsets_data[i - 1]);
1223-
1224-
return res;
1225-
}
1226-
12271209
}

src/Columns/ColumnArray.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,6 @@ class ColumnArray final : public COWHelper<IColumn, ColumnArray>
139139
return false;
140140
}
141141

142-
void getIndicesOfNonDefaultValues(IColumn::Offsets & indices) const override;
143-
144-
size_t getNumberOfNonDefaultValues() const override;
145-
146142
bool isCollationSupported() const override { return getData().isCollationSupported(); }
147143

148144
private:

src/Columns/ColumnString.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -530,22 +530,6 @@ void ColumnString::getExtremes(Field & min, Field & max) const
530530
get(max_idx, max);
531531
}
532532

533-
void ColumnString::getIndicesOfNonDefaultValues(Offsets & indices) const
534-
{
535-
for (size_t i = 0; i < offsets.size(); ++i)
536-
if (offsets[i] - offsets[i - 1] > 1)
537-
indices.push_back(i);
538-
}
539-
540-
size_t ColumnString::getNumberOfNonDefaultValues() const
541-
{
542-
size_t res = 0;
543-
for (size_t i = 0; i < offsets.size(); ++i)
544-
res += (offsets[i] - offsets[i - 1] > 1);
545-
546-
return res;
547-
}
548-
549533
ColumnPtr ColumnString::compress() const
550534
{
551535
size_t source_chars_size = chars.size();

src/Columns/ColumnString.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,6 @@ class ColumnString final : public COWHelper<IColumn, ColumnString>
277277
return typeid(rhs) == typeid(ColumnString);
278278
}
279279

280-
void getIndicesOfNonDefaultValues(Offsets & indices) const override;
281-
size_t getNumberOfNonDefaultValues() const override;
282-
283280
Chars & getChars() { return chars; }
284281
const Chars & getChars() const { return chars; }
285282

src/Columns/ColumnVector.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -303,23 +303,6 @@ class ColumnVector final : public COWHelper<ColumnVectorHelper, ColumnVector<T>>
303303
return typeid(rhs) == typeid(ColumnVector<T>);
304304
}
305305

306-
void getIndicesOfNonDefaultValues(IColumn::Offsets & offsets) const override
307-
{
308-
offsets.reserve(data.size());
309-
for (size_t i = 0; i < data.size(); ++i)
310-
if (data[i] != T{})
311-
offsets.push_back(i);
312-
}
313-
314-
size_t getNumberOfNonDefaultValues() const override
315-
{
316-
size_t res = 0;
317-
for (size_t i = 0; i < data.size(); ++i)
318-
res += (data[i] != T{});
319-
320-
return res;
321-
}
322-
323306
ColumnPtr compress() const override;
324307

325308
/// Replace elements that match the filter with zeroes. If inverted replaces not matched elements.

src/Columns/IColumn.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,6 @@ class IColumn : public COW<IColumn>
363363
throw Exception("Method structureEquals is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
364364
}
365365

366-
virtual void getIndicesOfNonDefaultValues(Offsets & /* offsets */) const {}
367-
virtual size_t getNumberOfNonDefaultValues() const { return 0; }
368-
369366
/// Compress column in memory to some representation that allows to decompress it back.
370367
/// Return itself if compression is not applicable for this column type.
371368
virtual Ptr compress() const

src/DataTypes/DataTypeCustomIPv4AndIPv6.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
namespace DB
66
{
77

8-
namespace ErrorCodes
9-
{
10-
extern const int ILLEGAL_COLUMN;
11-
extern const int CANNOT_PARSE_DOMAIN_VALUE_FROM_STRING;
12-
}
13-
148
void registerDataTypeDomainIPv4AndIPv6(DataTypeFactory & factory)
159
{
1610
factory.registerSimpleDataTypeCustom("IPv4", []

src/DataTypes/DataTypeCustom_fwd.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/DataTypes/DataTypeFixedString.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ namespace ErrorCodes
2525
{
2626
extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH;
2727
extern const int UNEXPECTED_AST_STRUCTURE;
28-
extern const int TOO_LARGE_STRING_SIZE;
2928
}
3029

3130

0 commit comments

Comments
 (0)