Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class AggregateFunctionApproxTopK final
void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf,
Arena* arena) const override {
auto readStringBinaryInto = [](Arena& arena, BufferReadable& buf) {
size_t size = 0;
uint64_t size = 0;
read_var_uint(size, buf);

if (UNLIKELY(size > DEFAULT_MAX_STRING_SIZE)) {
Expand All @@ -101,7 +101,7 @@ class AggregateFunctionApproxTopK final
auto& set = this->data(place).value;
set.clear();

size_t size = 0;
uint64_t size = 0;
read_var_uint(size, buf);
if (UNLIKELY(size > TOP_K_MAX_SIZE)) {
throw Exception(ErrorCode::INTERNAL_ERROR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class AggregateFunctionApproxTopSum final
void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf,
Arena* arena) const override {
auto readStringBinaryInto = [](Arena& arena, BufferReadable& buf) {
size_t size = 0;
uint64_t size = 0;
read_var_uint(size, buf);

if (UNLIKELY(size > DEFAULT_MAX_STRING_SIZE)) {
Expand All @@ -105,7 +105,7 @@ class AggregateFunctionApproxTopSum final
auto& set = this->data(place).value;
set.clear();

size_t size = 0;
uint64_t size = 0;
read_var_uint(size, buf);
if (UNLIKELY(size > TOP_K_MAX_SIZE)) {
throw Exception(ErrorCode::INTERNAL_ERROR,
Expand Down
6 changes: 3 additions & 3 deletions be/src/vec/common/space_saving.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ class SpaceSaving {

void read(BufferReadable& rb) {
destroy_elements();
size_t count = 0;
uint64_t count = 0;
read_var_uint(count, rb);

for (size_t i = 0; i < count; ++i) {
for (UInt64 i = 0; i < count; ++i) {
std::unique_ptr counter = std::make_unique<Counter>();
counter->read(rb);
counter->hash = counter_map.hash(counter->key);
Expand All @@ -259,7 +259,7 @@ class SpaceSaving {

// Reads the alpha map data from the provided readable buffer.
void read_alpha_map(BufferReadable& rb) {
size_t alpha_size = 0;
uint64_t alpha_size = 0;
read_var_uint(alpha_size, rb);
for (size_t i = 0; i < alpha_size; ++i) {
uint64_t alpha = 0;
Expand Down
4 changes: 2 additions & 2 deletions be/src/vec/exec/scan/scanner_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ vectorized::BlockUPtr ScannerContext::get_free_block(bool force) {
if (_free_blocks.try_dequeue(block)) {
DCHECK(block->mem_reuse());
_block_memory_usage -= block->allocated_bytes();
_scanner_memory_used_counter->set(_block_memory_usage);
_scanner_memory_used_counter->set(static_cast<int64_t>(_block_memory_usage));
// A free block is reused, so the memory usage should be decreased
// The caller of get_free_block will increase the memory usage
update_peak_memory_usage(-block->allocated_bytes());
Expand All @@ -249,7 +249,7 @@ void ScannerContext::return_free_block(vectorized::BlockUPtr block) {
if (block->mem_reuse() && _block_memory_usage < _max_bytes_in_queue) {
size_t block_size_to_reuse = block->allocated_bytes();
_block_memory_usage += block_size_to_reuse;
_scanner_memory_used_counter->set(_block_memory_usage);
_scanner_memory_used_counter->set(static_cast<int64_t>(_block_memory_usage));
block->clear_column_data();
if (_free_blocks.enqueue(std::move(block))) {
update_peak_memory_usage(block_size_to_reuse);
Expand Down
3 changes: 2 additions & 1 deletion be/src/vec/exprs/vruntimefilter_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ class VRuntimeFilterWrapper final : public VExpr {
template <typename T, typename TT>
static void judge_selectivity(double ignore_threshold, int64_t filter_rows, int64_t input_rows,
T& always_true, TT& judge_counter) {
always_true = filter_rows / (input_rows * 1.0) < ignore_threshold;
always_true = static_cast<double>(filter_rows) / static_cast<double>(input_rows) <
ignore_threshold;
judge_counter = config::runtime_filter_sampling_frequency;
}

Expand Down