Merge pull request #17135 from amosbird/ccc

Fix ColumnConst comparison.
This commit is contained in:
alexey-milovidov 2020-11-19 07:36:41 +03:00 committed by GitHub
commit 5aff81b8b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 5 deletions

View File

@ -138,4 +138,12 @@ void ColumnConst::updateWeakHash32(WeakHash32 & hash) const
value = intHashCRC32(data_hash, value);
}
void ColumnConst::compareColumn(
const IColumn & rhs, size_t, PaddedPODArray<UInt64> *, PaddedPODArray<Int8> & compare_results, int, int nan_direction_hint)
const
{
Int8 res = compareAt(1, 1, rhs, nan_direction_hint);
std::fill(compare_results.begin(), compare_results.end(), res);
}
}

View File

@ -199,11 +199,7 @@ public:
void compareColumn(const IColumn & rhs, size_t rhs_row_num,
PaddedPODArray<UInt64> * row_indexes, PaddedPODArray<Int8> & compare_results,
int direction, int nan_direction_hint) const override
{
return data->compareColumn(rhs, rhs_row_num, row_indexes,
compare_results, direction, nan_direction_hint);
}
int direction, int nan_direction_hint) const override;
MutableColumns scatter(ColumnIndex num_columns, const Selector & selector) const override;

View File

@ -0,0 +1 @@
select '1111' as name from system.numbers_mt order by name limit 10000 format Null;