Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto pass through hashagg #9167

Merged
merged 130 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
cd6cbea
selective: updateWeakHash32 done
guo-shaoge Jun 3, 2024
bf2af85
selective: scatterTo
guo-shaoge Jun 3, 2024
2e3662d
selective: scatter
guo-shaoge Jun 3, 2024
dab162f
mpp writer
guo-shaoge Jun 3, 2024
fd21bf1
1. Aggregator: support collect_hit_rate and only_lookup
guo-shaoge Jun 3, 2024
5e803e2
execution: support auto pass operator/stream
guo-shaoge Jun 3, 2024
957c8e1
fix wrong check
guo-shaoge Jun 4, 2024
82883fe
interpter support auto pass through
guo-shaoge Jun 4, 2024
7b5320e
unit test
guo-shaoge Jun 5, 2024
f9105ec
Merge branch 'master' of github.com:pingcap/tiflash into auto_passthr…
guo-shaoge Jun 20, 2024
b469fa2
unit test for auto pass context
guo-shaoge Jun 20, 2024
59422ca
unit test for executor
guo-shaoge Jun 24, 2024
0db738e
fmt
guo-shaoge Jun 24, 2024
a7e8036
getPassThroughBlock && integration unit test
guo-shaoge Jun 26, 2024
3b588c2
fix AutoPassThroughHashAggContext/ColumnString todo
guo-shaoge Jun 26, 2024
6d646d9
updateWeakHash32 declaration
guo-shaoge Jun 26, 2024
4df0268
fix lookupImpl && fix getNotFoundRows && getPassThroughBlock()
guo-shaoge Jun 27, 2024
605c4ba
use findKey for only_lookup;
guo-shaoge Jun 27, 2024
3aa40cc
row_limit_unit
guo-shaoge Jun 27, 2024
1db168a
fix some todo
guo-shaoge Jun 27, 2024
c30b4bf
fmt
guo-shaoge Jun 27, 2024
047f4ed
tipb
guo-shaoge Jun 28, 2024
c0018b7
del setHitBit
guo-shaoge Jun 28, 2024
a7d444b
statistics
guo-shaoge Jun 28, 2024
9fb0cb1
fmt
guo-shaoge Jun 28, 2024
0f4cc76
fmt
guo-shaoge Jun 30, 2024
d43a8de
Merge branch 'master' of ssh://github.com/pingcap/tiflash into auto_p…
guo-shaoge Jun 30, 2024
7125e5a
fmt
guo-shaoge Jun 30, 2024
f28933a
fix some todo
guo-shaoge Jun 30, 2024
285dd6f
fix some todo
guo-shaoge Jun 30, 2024
a5d6382
try fix unit-test
guo-shaoge Jul 1, 2024
313d822
try fix unit-test
guo-shaoge Jul 1, 2024
31aab83
add check_block_selective for expression stream
guo-shaoge Jul 1, 2024
e1a5718
fix some todo
guo-shaoge Jul 2, 2024
2d3f579
fix case
guo-shaoge Jul 2, 2024
75cf66f
handle empty data without group by key
guo-shaoge Jul 2, 2024
978207e
empty tbl test
guo-shaoge Jul 2, 2024
496cd20
fix fill def agg func bug
guo-shaoge Jul 2, 2024
c02cc8f
fix empty tbl case
guo-shaoge Jul 2, 2024
45e77bb
3-value tiflash_pre_agg_mode
guo-shaoge Jul 3, 2024
8db40e7
update tipb
guo-shaoge Jul 3, 2024
877e833
remove switcher
guo-shaoge Jul 4, 2024
d8737b4
fix
guo-shaoge Jul 4, 2024
f41bb30
tipb
guo-shaoge Jul 4, 2024
98e90e6
fix
guo-shaoge Jul 5, 2024
db539b3
refine
guo-shaoge Jul 8, 2024
4022883
fix
guo-shaoge Jul 8, 2024
8e9fdc3
Merge branch 'master' of github.com:pingcap/tiflash into auto_passthr…
guo-shaoge Jul 8, 2024
4ad1654
support selective block for MPPExchangeWriter
guo-shaoge Jul 8, 2024
162bd6e
unit-test
guo-shaoge Jul 8, 2024
0c4592c
scatter unit-test
guo-shaoge Jul 9, 2024
2d44281
fix
guo-shaoge Jul 9, 2024
bc6d280
fix
guo-shaoge Jul 9, 2024
29f6ea2
scatterTo unittest
guo-shaoge Jul 9, 2024
018e208
fix
guo-shaoge Jul 9, 2024
77826d8
fix
guo-shaoge Jul 9, 2024
4e63522
add updateWeakHash32Impl
guo-shaoge Jul 10, 2024
18cf199
refine
guo-shaoge Jul 10, 2024
aa0ea6b
refine
guo-shaoge Jul 10, 2024
954e903
check block.info runtime
guo-shaoge Jul 10, 2024
b50063e
refine LoopOneColumn
guo-shaoge Jul 10, 2024
db21b5a
refine
guo-shaoge Jul 10, 2024
35b38e5
refine
guo-shaoge Jul 10, 2024
643d1b6
Merge branch 'master' of github.com:pingcap/tiflash into auto_passthr…
guo-shaoge Jul 11, 2024
7470ef1
fix getPassThroughBlock
guo-shaoge Jul 11, 2024
60a8559
Merge branch 'master' of github.com:pingcap/tiflash into selective_block
guo-shaoge Jul 12, 2024
4eaa2b0
Merge branch 'selective_block' of github.com:guo-shaoge/tiflash into …
guo-shaoge Jul 12, 2024
c98d332
fix conflict
guo-shaoge Jul 12, 2024
569053a
del checkSelective
guo-shaoge Jul 12, 2024
0a4148a
log
guo-shaoge Jul 12, 2024
6cecb2c
disable selective check for expression block input stream
guo-shaoge Jul 14, 2024
ed6033b
disable state switch
guo-shaoge Jul 14, 2024
d4a1ac6
Revert "disable state switch"
guo-shaoge Jul 14, 2024
e471184
Revert "disable selective check for expression block input stream"
guo-shaoge Jul 14, 2024
717dced
fix select template for exchange sender
guo-shaoge Jul 14, 2024
b25dee7
fix auto pass through integration case(need fix todos later)
guo-shaoge Jul 14, 2024
6df41d0
optimize getPassThroughBlock
guo-shaoge Jul 15, 2024
839e0cb
case for AutoPassThroughHashAggHelper
guo-shaoge Jul 16, 2024
9a03f59
benchmark for setupAutoPassThroughColumnGenerator
guo-shaoge Jul 17, 2024
8a8d9b6
fix some todos
guo-shaoge Jul 17, 2024
41783c8
fix projection
guo-shaoge Jul 17, 2024
1f71029
tmp disable send block in advance
guo-shaoge Jul 17, 2024
45f033d
Revert "tmp disable send block in advance"
guo-shaoge Jul 17, 2024
926d79e
tmp refine count col generator
guo-shaoge Jul 17, 2024
f5d1ba9
tmp change decimal infer
guo-shaoge Jul 18, 2024
9d5e7e3
tmp some log
guo-shaoge Jul 18, 2024
b4323f7
tmp disable expression copy block info
guo-shaoge Jul 18, 2024
8ba8bc3
tmp log agg expr actions
guo-shaoge Jul 18, 2024
7d99144
log expression block input stream time
guo-shaoge Jul 18, 2024
00b8b4e
tmp remove cast after agg
guo-shaoge Jul 18, 2024
77ab379
tmp debug exchange sender(and header in executeQuery)
guo-shaoge Jul 18, 2024
837284d
tmp disable cast in final projection
guo-shaoge Jul 18, 2024
b4a1510
Revert "tmp disable cast in final projection"
guo-shaoge Jul 19, 2024
70f4329
tmp hack count: count return int64; count gen didn't check nullable
guo-shaoge Jul 21, 2024
826734f
refine
guo-shaoge Jul 21, 2024
6e2a5a5
Merge branch 'master' of github.com:pingcap/tiflash into auto_passthr…
guo-shaoge Jul 21, 2024
7a675b0
refine
guo-shaoge Jul 21, 2024
35a742c
fix case
guo-shaoge Jul 21, 2024
e08f0ce
refine sum(null)/count(1)/min/max
guo-shaoge Jul 22, 2024
d6c8059
refine
guo-shaoge Jul 23, 2024
a430c69
refine case
guo-shaoge Jul 23, 2024
fd6b49c
lint
guo-shaoge Jul 23, 2024
b07a871
del template fro ExpressionBlockInputStream
guo-shaoge Jul 23, 2024
0d0e1ec
refine comment; add check for ExpressionBlockInputStream
guo-shaoge Jul 24, 2024
c060643
fix build
guo-shaoge Jul 24, 2024
ed65697
refine auto pass through helper
guo-shaoge Jul 29, 2024
947a19e
check block.info.selective runtime
guo-shaoge Jul 29, 2024
97b46f3
refine
guo-shaoge Jul 31, 2024
2f15000
enable -> enabled
guo-shaoge Jul 31, 2024
38b323b
refine log
guo-shaoge Jul 31, 2024
60736a1
fmt
guo-shaoge Jul 31, 2024
cb8098c
aggresive pass through policy
guo-shaoge Jul 31, 2024
411633a
refine stream
guo-shaoge Jul 31, 2024
8a508a1
fix cycle reference
guo-shaoge Aug 1, 2024
c75ac8c
refine setParent; add spillable case
guo-shaoge Aug 5, 2024
dcfd99c
refine forceState()
guo-shaoge Aug 5, 2024
8c5960b
refine case(spill not-spill)
guo-shaoge Aug 6, 2024
1cd2063
refine
guo-shaoge Aug 6, 2024
a8bf0f0
del spill case
guo-shaoge Aug 6, 2024
4c04f55
clear spill callback for auto pass
guo-shaoge Aug 6, 2024
c02793f
refine spill case
guo-shaoge Aug 6, 2024
cd9ed17
refine comment
guo-shaoge Aug 6, 2024
19bf804
update continusous limit logic
guo-shaoge Aug 7, 2024
35f5fc7
finish spillable stage
guo-shaoge Aug 7, 2024
0100f6b
fmt
guo-shaoge Aug 7, 2024
76a1e34
Merge branch 'master' into auto_passthrough_hashagg
guo-shaoge Aug 7, 2024
a5af40c
fix recursiveSetBlockInputStreamParent
guo-shaoge Aug 7, 2024
c3be1a9
Compression: add microbenchmark (#9293)
Lloyd-Pottiger Aug 7, 2024
7c49f3f
Revert "Compression: add microbenchmark (#9293)"
guo-shaoge Aug 7, 2024
d1447f2
Merge branch 'master' into auto_passthrough_hashagg
guo-shaoge Aug 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/tipb
73 changes: 63 additions & 10 deletions dbms/src/Columns/ColumnAggregateFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,11 @@ void ColumnAggregateFunction::updateHashWithValues(
void ColumnAggregateFunction::updateWeakHash32(WeakHash32 & hash, const TiDB::TiDBCollatorPtr &, String &) const
{
auto s = data.size();
if (hash.getData().size() != data.size())
guo-shaoge marked this conversation as resolved.
Show resolved Hide resolved
throw Exception(
fmt::format(
"Size of WeakHash32 does not match size of column: column size is {}, hash size is {}",
s,
hash.getData().size()),
ErrorCodes::LOGICAL_ERROR);
RUNTIME_CHECK_MSG(
hash.getData().size() == data.size(),
"Size of WeakHash32({}) does not match size of column({})",
hash.getData().size(),
s);

auto & hash_data = hash.getData();

Expand All @@ -181,6 +179,32 @@ void ColumnAggregateFunction::updateWeakHash32(WeakHash32 & hash, const TiDB::Ti
}
}

void ColumnAggregateFunction::updateWeakHash32(
WeakHash32 & hash,
const TiDB::TiDBCollatorPtr &,
String &,
const BlockSelectivePtr & selective_ptr) const
{
const auto selective_rows = selective_ptr->size();
RUNTIME_CHECK_MSG(
hash.getData().size() == selective_rows,
"Size of WeakHash32({}) does not match size of selective column({})",
hash.getData().size(),
selective_rows);

UInt32 * hash_data = hash.getData().data();

std::vector<UInt8> v;
for (const auto & row : *selective_ptr)
{
WriteBufferFromVector<std::vector<UInt8>> wbuf(v);
func->serialize(data[row], wbuf);
wbuf.finalize();
*hash_data = ::updateWeakHash32(v.data(), v.size(), *hash_data);
hash_data++;
}
}

/// NOTE: Highly overestimates size of a column if it was produced in AggregatingBlockInputStream (it contains size of other columns)
size_t ColumnAggregateFunction::byteSize() const
{
Expand Down Expand Up @@ -419,9 +443,38 @@ MutableColumns ColumnAggregateFunction::scatter(IColumn::ColumnIndex num_columns
return columns;
}

void ColumnAggregateFunction::scatterTo(
ScatterColumns & columns [[maybe_unused]],
const Selector & selector [[maybe_unused]]) const
MutableColumns ColumnAggregateFunction::scatter(
IColumn::ColumnIndex num_columns,
const IColumn::Selector & selector,
const BlockSelectivePtr & selective) const
{
/// Columns with scattered values will point to this column as the owner of values.
MutableColumns columns(num_columns);
for (auto & column : columns)
column = createView();

const auto & selective_rows = selective->size();

{
size_t reserve_size = 1.1 * selective_rows / num_columns; /// 1.1 is just a guess. Better to use n-sigma rule.

if (reserve_size > 1)
for (auto & column : columns)
column->reserve(reserve_size);
}

for (size_t i = 0; i < selective_rows; ++i)
static_cast<ColumnAggregateFunction &>(*columns[selector[i]]).data.push_back(data[(*selective)[i]]);

return columns;
}

void ColumnAggregateFunction::scatterTo(ScatterColumns &, const Selector &) const
{
throw TiFlashException("ColumnAggregateFunction does not support scatterTo", Errors::Coprocessor::Unimplemented);
}

void ColumnAggregateFunction::scatterTo(ScatterColumns &, const Selector &, const BlockSelectivePtr &) const
{
throw TiFlashException("ColumnAggregateFunction does not support scatterTo", Errors::Coprocessor::Unimplemented);
}
Expand Down
6 changes: 6 additions & 0 deletions dbms/src/Columns/ColumnAggregateFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ class ColumnAggregateFunction final : public COWPtrHelper<IColumn, ColumnAggrega
const override;

void updateWeakHash32(WeakHash32 & hash, const TiDB::TiDBCollatorPtr &, String &) const override;
void updateWeakHash32(WeakHash32 & hash, const TiDB::TiDBCollatorPtr &, String &, const BlockSelectivePtr &)
const override;

size_t byteSize() const override;

Expand All @@ -189,8 +191,12 @@ class ColumnAggregateFunction final : public COWPtrHelper<IColumn, ColumnAggrega
ColumnPtr replicateRange(size_t start_row, size_t end_row, const IColumn::Offsets & offsets) const override;

MutableColumns scatter(ColumnIndex num_columns, const Selector & selector) const override;
MutableColumns scatter(ColumnIndex num_columns, const Selector & selector, const BlockSelectivePtr & selective)
const override;

void scatterTo(ScatterColumns & columns, const Selector & selector) const override;
void scatterTo(ScatterColumns & columns, const Selector & selector, const BlockSelectivePtr & selective)
const override;

void gather(ColumnGathererStream & gatherer_stream) override;

Expand Down
48 changes: 43 additions & 5 deletions dbms/src/Columns/ColumnArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ void ColumnArray::updateWeakHash32(
String & sort_key_container) const
{
auto s = offsets->size();
if (hash.getData().size() != s)
throw Exception(
"Size of WeakHash32 does not match size of column: column size is " + std::to_string(s) + ", hash size is "
+ std::to_string(hash.getData().size()),
ErrorCodes::LOGICAL_ERROR);
RUNTIME_CHECK_MSG(
hash.getData().size() == s,
"Size of WeakHash32({}) does not match size of column({})",
hash.getData().size(),
s);

WeakHash32 internal_hash(data->size());
data->updateWeakHash32(internal_hash, collator, sort_key_container);
Expand All @@ -284,6 +284,44 @@ void ColumnArray::updateWeakHash32(
}
}

void ColumnArray::updateWeakHash32(
WeakHash32 & hash,
const TiDB::TiDBCollatorPtr & collator,
String & sort_key_container,
const BlockSelectivePtr & selective_ptr) const
{
const auto selective_rows = selective_ptr->size();
RUNTIME_CHECK_MSG(
hash.getData().size() == selective_rows,
"Size of WeakHash32({}) does not match size of column({})",
hash.getData().size(),
selective_rows);

WeakHash32 internal_hash(data->size());
guo-shaoge marked this conversation as resolved.
Show resolved Hide resolved
data->updateWeakHash32(internal_hash, collator, sort_key_container);

Offset prev_offset = 0;
const auto & offsets_data = getOffsets();
UInt32 * hash_data = hash.getData().data();
auto & internal_hash_data = internal_hash.getData();

for (const auto & i : *selective_ptr)
{
/// This row improves hash a little bit according to integration tests.
/// It is the same as to use previous hash value as the first element of array.
*hash_data = intHashCRC32(*hash_data);

for (size_t row = prev_offset; row < offsets_data[i]; ++row)
/// It is probably not the best way to combine hashes.
/// But much better then xor which lead to similar hash for arrays like [1], [1, 1, 1], [1, 1, 1, 1, 1], ...
/// Much better implementation - to add offsets as an optional argument to updateWeakHash32.
*hash_data = intHashCRC32(internal_hash_data[row], *hash_data);

prev_offset = offsets_data[i];
++hash_data;
}
}

void ColumnArray::insert(const Field & x)
{
const auto & array = DB::get<const Array &>(x);
Expand Down
12 changes: 12 additions & 0 deletions dbms/src/Columns/ColumnArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ class ColumnArray final : public COWPtrHelper<IColumn, ColumnArray>
void updateHashWithValues(IColumn::HashValues & hash_values, const TiDB::TiDBCollatorPtr &, String &)
const override;
void updateWeakHash32(WeakHash32 & hash, const TiDB::TiDBCollatorPtr &, String &) const override;
void updateWeakHash32(WeakHash32 & hash, const TiDB::TiDBCollatorPtr &, String &, const BlockSelectivePtr &)
const override;
void insertRangeFrom(const IColumn & src, size_t start, size_t length) override;
void insert(const Field & x) override;
void insertFrom(const IColumn & src_, size_t n) override;
Expand Down Expand Up @@ -144,10 +146,20 @@ class ColumnArray final : public COWPtrHelper<IColumn, ColumnArray>
{
return scatterImpl<ColumnArray>(num_columns, selector);
}
MutableColumns scatter(ColumnIndex num_columns, const Selector & selector, const BlockSelectivePtr & selective)
const override
{
return scatterImpl<ColumnArray>(num_columns, selector, selective);
}
void scatterTo(ScatterColumns & columns, const Selector & selector) const override
{
scatterToImpl<ColumnArray>(columns, selector);
}
void scatterTo(ScatterColumns & columns, const Selector & selector, const BlockSelectivePtr & selective)
const override
{
scatterToImpl<ColumnArray>(columns, selector, selective);
}
void gather(ColumnGathererStream & gatherer_stream) override;

void forEachSubcolumn(ColumnCallback callback) override
Expand Down
90 changes: 74 additions & 16 deletions dbms/src/Columns/ColumnConst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,32 @@ ColumnPtr ColumnConst::permute(const Permutation & perm, size_t limit) const

MutableColumns ColumnConst::scatter(ColumnIndex num_columns, const Selector & selector) const
{
if (s != selector.size())
throw Exception(
fmt::format("Size of selector ({}) doesn't match size of column ({})", selector.size(), s),
ErrorCodes::SIZES_OF_COLUMNS_DOESNT_MATCH);
RUNTIME_CHECK_MSG(
s == selector.size(),
"Size of selector ({}) doesn't match size of column ({})",
selector.size(),
s);

return scatterImplForColumnConst(num_columns, selector);
}

MutableColumns ColumnConst::scatter(
ColumnIndex num_columns,
const Selector & selector,
const BlockSelectivePtr & selective) const
{
const auto selective_rows = selective->size();
RUNTIME_CHECK_MSG(
selective_rows == selector.size(),
"Size of selector ({}) doesn't match size of selective column ({})",
selector.size(),
selective_rows);

return scatterImplForColumnConst(num_columns, selector);
}

MutableColumns ColumnConst::scatterImplForColumnConst(ColumnIndex num_columns, const Selector & selector) const
{
std::vector<size_t> counts = countColumnsSizeInSelector(num_columns, selector);

MutableColumns res(num_columns);
Expand All @@ -101,11 +122,28 @@ MutableColumns ColumnConst::scatter(ColumnIndex num_columns, const Selector & se

void ColumnConst::scatterTo(ScatterColumns & columns, const Selector & selector) const
{
if (s != selector.size())
throw Exception(
fmt::format("Size of selector ({}) doesn't match size of column ({})", selector.size(), s),
ErrorCodes::SIZES_OF_COLUMNS_DOESNT_MATCH);
RUNTIME_CHECK_MSG(
s == selector.size(),
"Size of selector ({}) doesn't match size of column ({})",
selector.size(),
s);
scatterToImplForColumnConst(columns, selector);
}

void ColumnConst::scatterTo(ScatterColumns & columns, const Selector & selector, const BlockSelectivePtr & selective)
const
{
const auto selective_rows = selective->size();
RUNTIME_CHECK_MSG(
selective_rows == selector.size(),
"Size of selector ({}) doesn't match size of column ({})",
selector.size(),
selective_rows);
scatterToImplForColumnConst(columns, selector);
}

void ColumnConst::scatterToImplForColumnConst(ScatterColumns & columns, const Selector & selector) const
{
ColumnIndex num_columns = columns.size();
std::vector<size_t> counts = countColumnsSizeInSelector(num_columns, selector);

Expand All @@ -126,20 +164,40 @@ void ColumnConst::updateWeakHash32(
const TiDB::TiDBCollatorPtr & collator,
String & sort_key_container) const
{
if (hash.getData().size() != s)
throw Exception(
fmt::format(
"Size of WeakHash32 does not match size of column: column size is {}, hash size is {}",
s,
hash.getData().size()),
ErrorCodes::LOGICAL_ERROR);
RUNTIME_CHECK_MSG(
hash.getData().size() != s,
"Size of WeakHash32({}) does not match size of column({})",
hash.getData().size(),
s);
updateWeakHash32Impl(hash, collator, sort_key_container);
}

void ColumnConst::updateWeakHash32(
WeakHash32 & hash,
const TiDB::TiDBCollatorPtr & collator,
String & sort_key_container,
const BlockSelectivePtr & selective_ptr) const
{
const auto selective_rows = selective_ptr->size();
RUNTIME_CHECK_MSG(
hash.getData().size() != selective_rows,
"Size of WeakHash32({}) does not match size of selective column({})",
hash.getData().size(),
selective_rows);

updateWeakHash32Impl(hash, collator, sort_key_container);
}

void ColumnConst::updateWeakHash32Impl(
WeakHash32 & hash,
const TiDB::TiDBCollatorPtr & collator,
String & sort_key_container) const
{
WeakHash32 element_hash(1);
data->updateWeakHash32(element_hash, collator, sort_key_container);
size_t data_hash = element_hash.getData()[0];

for (auto & value : hash.getData())
value = intHashCRC32(data_hash, value);
}

} // namespace DB
9 changes: 9 additions & 0 deletions dbms/src/Columns/ColumnConst.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ class ColumnConst final : public COWPtrHelper<IColumn, ColumnConst>
}

void updateWeakHash32(WeakHash32 & hash, const TiDB::TiDBCollatorPtr &, String &) const override;
void updateWeakHash32(WeakHash32 & hash, const TiDB::TiDBCollatorPtr &, String &, const BlockSelectivePtr &)
const override;
void updateWeakHash32Impl(WeakHash32 & hash, const TiDB::TiDBCollatorPtr &, String &) const;

ColumnPtr filter(const Filter & filt, ssize_t result_size_hint) const override;
ColumnPtr replicateRange(size_t start_row, size_t end_row, const IColumn::Offsets & offsets) const override;
Expand All @@ -151,8 +154,14 @@ class ColumnConst final : public COWPtrHelper<IColumn, ColumnConst>
}

MutableColumns scatter(ColumnIndex num_columns, const Selector & selector) const override;
MutableColumns scatter(ColumnIndex num_columns, const Selector & selector, const BlockSelectivePtr & selective)
const override;
MutableColumns scatterImplForColumnConst(ColumnIndex num_columns, const Selector & selector) const;

void scatterTo(ScatterColumns & columns, const Selector & selector) const override;
void scatterTo(ScatterColumns & columns, const Selector & selector, const BlockSelectivePtr & selective)
const override;
void scatterToImplForColumnConst(ScatterColumns & columns, const Selector & selector) const;
void gather(ColumnGathererStream &) override
{
throw Exception("Cannot gather into constant column " + getName(), ErrorCodes::NOT_IMPLEMENTED);
Expand Down
Loading