Skip to content
Closed
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 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 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 @@ -98,7 +98,7 @@ struct AggregateFunctionCollectSetData {
}

void read(BufferReadable& buf) {
size_t new_size = 0;
UInt64 new_size = 0;
read_var_uint(new_size, buf);
ElementNativeType x;
for (size_t i = 0; i < new_size; ++i) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ struct AggregateFunctionDistinctSingleNumericData {
void deserialize(BufferReadable& buf, Arena*) {
DCHECK(!stable);
if constexpr (!stable) {
size_t new_size = 0;
UInt64 new_size = 0;
read_var_uint(new_size, buf);
T x;
for (size_t i = 0; i < new_size; ++i) {
Expand Down
4 changes: 2 additions & 2 deletions be/src/vec/common/space_saving.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class SpaceSaving {

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

for (size_t i = 0; i < count; ++i) {
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 alpha_size = 0;
read_var_uint(alpha_size, rb);
for (size_t i = 0; i < alpha_size; ++i) {
uint64_t alpha = 0;
Expand Down
2 changes: 1 addition & 1 deletion be/src/vec/exprs/table_function/vexplode_numbers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Status VExplodeNumbersTableFunction::process_init(Block* block, RuntimeState* st

((ColumnInt32*)_elements_column.get())->clear();
//_cur_size may be a negative number
_cur_size = std::max(0L, _cur_size);
_cur_size = std::max(static_cast<int64_t>(0), _cur_size);
if (_cur_size &&
_cur_size <= state->batch_size()) { // avoid elements_column too big or empty
_is_const = true; // use const optimize
Expand Down
4 changes: 3 additions & 1 deletion be/src/vec/exprs/vruntimefilter_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ class VRuntimeFilterWrapper final : public VExpr {
template <typename T>
static void judge_selectivity(double ignore_threshold, int64_t filter_rows, int64_t input_rows,
T& always_true) {
always_true = filter_rows / (input_rows * 1.0L) < ignore_threshold;
always_true = static_cast<long double>(filter_rows) /
(static_cast<long double>(input_rows) * 1.0L) <
ignore_threshold;
}

bool is_rf_wrapper() const override { return true; }
Expand Down