Skip to content

Commit

Permalink
change names
Browse files Browse the repository at this point in the history
Signed-off-by: guo-shaoge <[email protected]>
  • Loading branch information
guo-shaoge committed Jan 6, 2025
1 parent db8d490 commit e19c851
Show file tree
Hide file tree
Showing 18 changed files with 119 additions and 114 deletions.
16 changes: 8 additions & 8 deletions dbms/src/Columns/ColumnAggregateFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,25 +194,25 @@ class ColumnAggregateFunction final : public COWPtrHelper<IColumn, ColumnAggrega
ErrorCodes::NOT_IMPLEMENTED);
}

void batchSerialize(
void serializeToPosUnique(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
bool /* has_null */,
const TiDB::TiDBCollatorPtr & /* collator */,
String * /* sort_key_container */) const override
{
throw Exception("Method batchSerialize is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
throw Exception("Method serializeToPosUnique is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
}
void batchSerializeFast(
void serializeToPos(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
bool /* has_null */) const override
{
throw Exception("Method batchSerializeFast is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
throw Exception("Method serializeToPos is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
}
void batchSerializeForColumnArray(
void serializeToPosUniqueForColumnArray(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
Expand All @@ -222,18 +222,18 @@ class ColumnAggregateFunction final : public COWPtrHelper<IColumn, ColumnAggrega
String * /* sort_key_container */) const override
{
throw Exception(
"Method batchSerializeForColumnArray is not supported for " + getName(),
"Method serializeToPosUniqueForColumnArray is not supported for " + getName(),
ErrorCodes::NOT_IMPLEMENTED);
}
void batchSerializeForColumnArrayFast(
void serializeToPosForColumnArray(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
bool /* has_null */,
const IColumn::Offsets & /* offsets */) const override
{
throw Exception(
"Method batchSerializeForColumnArrayFast is not supported for " + getName(),
"Method serializeToPosForColumnArray is not supported for " + getName(),
ErrorCodes::NOT_IMPLEMENTED);
}

Expand Down
16 changes: 11 additions & 5 deletions dbms/src/Columns/ColumnArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ void ColumnArray::countSerializeByteSizeImpl(PaddedPODArray<size_t> & byte_size,
getData().countSerializeByteSizeForColumnArray(byte_size, getOffsets(), collator);
}

void ColumnArray::batchSerialize(
void ColumnArray::serializeToPosUnique(
PaddedPODArray<char *> & pos,
size_t start,
size_t length,
Expand All @@ -270,7 +270,7 @@ void ColumnArray::batchSerialize(
batchSerializeImpl<false, false>(pos, start, length, collator, sort_key_container);
}

void ColumnArray::batchSerializeFast(PaddedPODArray<char *> & pos, size_t start, size_t length, bool has_null) const
void ColumnArray::serializeToPos(PaddedPODArray<char *> & pos, size_t start, size_t length, bool has_null) const
{
if (has_null)
batchSerializeImpl<true, true>(pos, start, length, nullptr, nullptr);
Expand Down Expand Up @@ -303,10 +303,16 @@ void ColumnArray::batchSerializeImpl(
}

if constexpr (is_fast)
getData().batchSerializeForColumnArrayFast(pos, start, length, has_null, getOffsets());
getData().serializeToPosForColumnArray(pos, start, length, has_null, getOffsets());
else
getData()
.batchSerializeForColumnArray(pos, start, length, has_null, getOffsets(), collator, sort_key_container);
getData().serializeToPosUniqueForColumnArray(
pos,
start,
length,
has_null,
getOffsets(),
collator,
sort_key_container);
}

void ColumnArray::batchDeserialize(
Expand Down
12 changes: 6 additions & 6 deletions dbms/src/Columns/ColumnArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,16 @@ class ColumnArray final : public COWPtrHelper<IColumn, ColumnArray>
ErrorCodes::NOT_IMPLEMENTED);
}

void batchSerialize(
void serializeToPosUnique(
PaddedPODArray<char *> & pos,
size_t start,
size_t length,
bool has_null,
const TiDB::TiDBCollatorPtr & collator,
String * sort_key_container) const override;
void batchSerializeFast(PaddedPODArray<char *> & pos, size_t start, size_t length, bool has_null) const override;
void serializeToPos(PaddedPODArray<char *> & pos, size_t start, size_t length, bool has_null) const override;

void batchSerializeForColumnArray(
void serializeToPosUniqueForColumnArray(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
Expand All @@ -140,18 +140,18 @@ class ColumnArray final : public COWPtrHelper<IColumn, ColumnArray>
String * /* sort_key_container */) const override
{
throw Exception(
"Method batchSerializeForColumnArray is not supported for " + getName(),
"Method serializeToPosUniqueForColumnArray is not supported for " + getName(),
ErrorCodes::NOT_IMPLEMENTED);
}
void batchSerializeForColumnArrayFast(
void serializeToPosForColumnArray(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
bool /* has_null */,
const IColumn::Offsets & /* array_offsets */) const override
{
throw Exception(
"Method batchSerializeForColumnArrayFast is not supported for " + getName(),
"Method serializeToPosForColumnArray is not supported for " + getName(),
ErrorCodes::NOT_IMPLEMENTED);
}

Expand Down
16 changes: 8 additions & 8 deletions dbms/src/Columns/ColumnConst.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,26 +142,26 @@ class ColumnConst final : public COWPtrHelper<IColumn, ColumnConst>
ErrorCodes::NOT_IMPLEMENTED);
}

void batchSerialize(
void serializeToPosUnique(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
bool /* has_null */,
const TiDB::TiDBCollatorPtr & /* collator */,
String * /* sort_key_container */) const override
{
throw Exception("Method batchSerialize is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
throw Exception("Method serializeToPosUnique is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
}
void batchSerializeFast(
void serializeToPos(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
bool /* has_null */) const override
{
throw Exception("Method batchSerializeFast is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
throw Exception("Method serializeToPos is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
}

void batchSerializeForColumnArray(
void serializeToPosUniqueForColumnArray(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
Expand All @@ -171,18 +171,18 @@ class ColumnConst final : public COWPtrHelper<IColumn, ColumnConst>
String * /* sort_key_container */) const override
{
throw Exception(
"Method batchSerializeForColumnArray is not supported for " + getName(),
"Method serializeToPosUniqueForColumnArray is not supported for " + getName(),
ErrorCodes::NOT_IMPLEMENTED);
}
void batchSerializeForColumnArrayFast(
void serializeToPosForColumnArray(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
bool /* has_null */,
const IColumn::Offsets & /* array_offsets */) const override
{
throw Exception(
"Method batchSerializeForColumnArrayFast is not supported for " + getName(),
"Method serializeToPosForColumnArray is not supported for " + getName(),
ErrorCodes::NOT_IMPLEMENTED);
}

Expand Down
8 changes: 4 additions & 4 deletions dbms/src/Columns/ColumnDecimal.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class ColumnDecimal final : public COWPtrHelper<ColumnVectorHelper, ColumnDecima
countSerializeByteSizeForColumnArrayImpl<true>(byte_size, array_offsets);
}

void batchSerialize(
void serializeToPosUnique(
PaddedPODArray<char *> & pos,
size_t start,
size_t length,
Expand All @@ -208,15 +208,15 @@ class ColumnDecimal final : public COWPtrHelper<ColumnVectorHelper, ColumnDecima
else
batchSerializeImpl</*has_null=*/false, /*is_fast=*/false>(pos, start, length);
}
void batchSerializeFast(PaddedPODArray<char *> & pos, size_t start, size_t length, bool has_null) const override
void serializeToPos(PaddedPODArray<char *> & pos, size_t start, size_t length, bool has_null) const override
{
if (has_null)
batchSerializeImpl</*has_null=*/true, /*is_fast=*/true>(pos, start, length);
else
batchSerializeImpl</*has_null=*/false, /*is_fast=*/true>(pos, start, length);
}

void batchSerializeForColumnArray(
void serializeToPosUniqueForColumnArray(
PaddedPODArray<char *> & pos,
size_t start,
size_t length,
Expand All @@ -230,7 +230,7 @@ class ColumnDecimal final : public COWPtrHelper<ColumnVectorHelper, ColumnDecima
else
batchSerializeForColumnArrayImpl</*has_null=*/false, /*is_fast=*/false>(pos, start, length, array_offsets);
}
void batchSerializeForColumnArrayFast(
void serializeToPosForColumnArray(
PaddedPODArray<char *> & pos,
size_t start,
size_t length,
Expand Down
5 changes: 2 additions & 3 deletions dbms/src/Columns/ColumnFixedString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ void ColumnFixedString::countSerializeByteSizeForColumnArrayFast(
byte_size[i] += n * (array_offsets[i] - array_offsets[i - 1]);
}

void ColumnFixedString::batchSerializeFast(PaddedPODArray<char *> & pos, size_t start, size_t length, bool has_null)
const
void ColumnFixedString::serializeToPos(PaddedPODArray<char *> & pos, size_t start, size_t length, bool has_null) const
{
if (has_null)
batchSerializeImpl<true>(pos, start, length);
Expand All @@ -184,7 +183,7 @@ void ColumnFixedString::batchSerializeImpl(PaddedPODArray<char *> & pos, size_t
}
}

void ColumnFixedString::batchSerializeForColumnArrayFast(
void ColumnFixedString::serializeToPosForColumnArray(
PaddedPODArray<char *> & pos,
size_t start,
size_t length,
Expand Down
16 changes: 8 additions & 8 deletions dbms/src/Columns/ColumnFixedString.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,20 +139,20 @@ class ColumnFixedString final : public COWPtrHelper<IColumn, ColumnFixedString>
PaddedPODArray<size_t> & byte_size,
const IColumn::Offsets & array_offsets) const override;

void batchSerialize(
void serializeToPosUnique(
PaddedPODArray<char *> & pos,
size_t start,
size_t length,
bool has_null,
const TiDB::TiDBCollatorPtr & collator,
String *) const override
{
RUNTIME_CHECK_MSG(!collator, "{} doesn't support batchSerialize when collator is not null", getName());
batchSerializeFast(pos, start, length, has_null);
RUNTIME_CHECK_MSG(!collator, "{} doesn't support serializeToPosUnique when collator is not null", getName());
serializeToPos(pos, start, length, has_null);
}
void batchSerializeFast(PaddedPODArray<char *> & pos, size_t start, size_t length, bool has_null) const override;
void serializeToPos(PaddedPODArray<char *> & pos, size_t start, size_t length, bool has_null) const override;

void batchSerializeForColumnArray(
void serializeToPosUniqueForColumnArray(
PaddedPODArray<char *> & pos,
size_t start,
size_t length,
Expand All @@ -163,11 +163,11 @@ class ColumnFixedString final : public COWPtrHelper<IColumn, ColumnFixedString>
{
RUNTIME_CHECK_MSG(
!collator,
"{} doesn't support batchSerializeForColumnArray when collator is not null",
"{} doesn't support serializeToPosUniqueForColumnArray when collator is not null",
getName());
batchSerializeForColumnArrayFast(pos, start, length, has_null, array_offsets);
serializeToPosForColumnArray(pos, start, length, has_null, array_offsets);
}
void batchSerializeForColumnArrayFast(
void serializeToPosForColumnArray(
PaddedPODArray<char *> & pos,
size_t start,
size_t length,
Expand Down
16 changes: 8 additions & 8 deletions dbms/src/Columns/ColumnFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,26 +150,26 @@ class ColumnFunction final : public COWPtrHelper<IColumn, ColumnFunction>
ErrorCodes::NOT_IMPLEMENTED);
}

void batchSerialize(
void serializeToPosUnique(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
bool /* has_null */,
const TiDB::TiDBCollatorPtr & /* collator */,
String * /*sort_key_container */) const override
{
throw Exception("Method batchSerialize is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
throw Exception("Method serializeToPosUnique is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
}
void batchSerializeFast(
void serializeToPos(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
bool /* has_null */) const override
{
throw Exception("Method batchSerializeFast is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
throw Exception("Method serializeToPos is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
}

void batchSerializeForColumnArray(
void serializeToPosUniqueForColumnArray(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
Expand All @@ -179,18 +179,18 @@ class ColumnFunction final : public COWPtrHelper<IColumn, ColumnFunction>
String * /* sort_key_container */) const override
{
throw Exception(
"Method batchSerializeForColumnArray is not supported for " + getName(),
"Method serializeToPosUniqueForColumnArray is not supported for " + getName(),
ErrorCodes::NOT_IMPLEMENTED);
}
void batchSerializeForColumnArrayFast(
void serializeToPosForColumnArray(
PaddedPODArray<char *> & /* pos */,
size_t /* start */,
size_t /* length */,
bool /* has_null */,
const IColumn::Offsets & /* array_offsets */) const override
{
throw Exception(
"Method batchSerializeForColumnArrayFast is not supported for " + getName(),
"Method serializeToPosForColumnArray is not supported for " + getName(),
ErrorCodes::NOT_IMPLEMENTED);
}

Expand Down
24 changes: 12 additions & 12 deletions dbms/src/Columns/ColumnNullable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,24 +310,24 @@ void ColumnNullable::countSerializeByteSizeForColumnArrayFast(
getNestedColumn().countSerializeByteSizeForColumnArrayFast(byte_size, array_offsets);
}

void ColumnNullable::batchSerialize(
void ColumnNullable::serializeToPosUnique(
PaddedPODArray<char *> & pos,
size_t start,
size_t length,
bool has_null,
const TiDB::TiDBCollatorPtr & collator,
String * sort_key_container) const
{
getNullMapColumn().batchSerialize(pos, start, length, has_null, collator, sort_key_container);
getNestedColumn().batchSerialize(pos, start, length, has_null, collator, sort_key_container);
getNullMapColumn().serializeToPosUnique(pos, start, length, has_null, collator, sort_key_container);
getNestedColumn().serializeToPosUnique(pos, start, length, has_null, collator, sort_key_container);
}
void ColumnNullable::batchSerializeFast(PaddedPODArray<char *> & pos, size_t start, size_t length, bool has_null) const
void ColumnNullable::serializeToPos(PaddedPODArray<char *> & pos, size_t start, size_t length, bool has_null) const
{
getNullMapColumn().batchSerializeFast(pos, start, length, has_null);
getNestedColumn().batchSerializeFast(pos, start, length, has_null);
getNullMapColumn().serializeToPos(pos, start, length, has_null);
getNestedColumn().serializeToPos(pos, start, length, has_null);
}

void ColumnNullable::batchSerializeForColumnArray(
void ColumnNullable::serializeToPosUniqueForColumnArray(
PaddedPODArray<char *> & pos,
size_t start,
size_t length,
Expand All @@ -337,19 +337,19 @@ void ColumnNullable::batchSerializeForColumnArray(
String * sort_key_container) const
{
getNullMapColumn()
.batchSerializeForColumnArray(pos, start, length, has_null, array_offsets, collator, sort_key_container);
.serializeToPosUniqueForColumnArray(pos, start, length, has_null, array_offsets, collator, sort_key_container);
getNestedColumn()
.batchSerializeForColumnArray(pos, start, length, has_null, array_offsets, collator, sort_key_container);
.serializeToPosUniqueForColumnArray(pos, start, length, has_null, array_offsets, collator, sort_key_container);
}
void ColumnNullable::batchSerializeForColumnArrayFast(
void ColumnNullable::serializeToPosForColumnArray(
PaddedPODArray<char *> & pos,
size_t start,
size_t length,
bool has_null,
const IColumn::Offsets & array_offsets) const
{
getNullMapColumn().batchSerializeForColumnArrayFast(pos, start, length, has_null, array_offsets);
getNestedColumn().batchSerializeForColumnArrayFast(pos, start, length, has_null, array_offsets);
getNullMapColumn().serializeToPosForColumnArray(pos, start, length, has_null, array_offsets);
getNestedColumn().serializeToPosForColumnArray(pos, start, length, has_null, array_offsets);
}

void ColumnNullable::batchDeserialize(
Expand Down
Loading

0 comments on commit e19c851

Please sign in to comment.