Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
Reduce initial size, experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Sep 8, 2022
1 parent e84f06c commit ef6da75
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions native-sql-engine/cpp/src/codegen/arrow_compute/ext/actions_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class UniqueAction : public ActionBase {
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
null_flag_.resize(max_group_size, false);
Expand Down Expand Up @@ -364,7 +364,7 @@ class CountAction : public ActionBase {
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_.resize(max_group_size, 0);
return arrow::Status::OK();
Expand Down Expand Up @@ -501,7 +501,7 @@ class CountDistinctAction : public ActionBase {
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_.resize(max_group_size, 0);
return arrow::Status::OK();
Expand Down Expand Up @@ -655,7 +655,7 @@ class CountLiteralAction : public ActionBase {
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_.resize(max_group_size, 0);
return arrow::Status::OK();
Expand Down Expand Up @@ -775,7 +775,7 @@ class MinAction<DataType, CType, precompile::enable_if_number<DataType>>
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_.resize(max_group_size, 0);
Expand Down Expand Up @@ -1082,7 +1082,7 @@ class MinAction<DataType, CType, precompile::enable_if_decimal<DataType>>
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_.resize(max_group_size, 0);
Expand Down Expand Up @@ -1241,7 +1241,7 @@ class MinAction<DataType, CType, precompile::enable_if_string_like<DataType>>
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_.resize(max_group_size, "");
Expand Down Expand Up @@ -1391,7 +1391,7 @@ class MaxAction<DataType, CType, precompile::enable_if_number<DataType>>
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_.resize(max_group_size, 0);
Expand Down Expand Up @@ -1693,7 +1693,7 @@ class MaxAction<DataType, CType, precompile::enable_if_decimal<DataType>>
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_.resize(max_group_size, 0);
Expand Down Expand Up @@ -1852,7 +1852,7 @@ class MaxAction<DataType, CType, precompile::enable_if_string_like<DataType>>
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_.resize(max_group_size, "");
Expand Down Expand Up @@ -2032,7 +2032,7 @@ class SumAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_.resize(max_group_size, 0);
Expand Down Expand Up @@ -2193,7 +2193,7 @@ class SumAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_.resize(max_group_size, 0);
Expand Down Expand Up @@ -2365,7 +2365,7 @@ class SumActionPartial<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_.resize(max_group_size, 0);
Expand Down Expand Up @@ -2532,7 +2532,7 @@ class SumActionPartial<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_.resize(max_group_size, 0);
Expand Down Expand Up @@ -2704,7 +2704,7 @@ class AvgAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_sum_.resize(max_group_size, 0);
Expand Down Expand Up @@ -2876,7 +2876,7 @@ class AvgAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_sum_.resize(max_group_size, 0);
Expand Down Expand Up @@ -3066,7 +3066,7 @@ class SumCountAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_sum_.resize(max_group_size, 0);
Expand Down Expand Up @@ -3256,7 +3256,7 @@ class SumCountAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_sum_.resize(max_group_size, 0);
Expand Down Expand Up @@ -3434,7 +3434,7 @@ class SumCountMergeAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_sum_.resize(max_group_size, 0);
Expand Down Expand Up @@ -3614,7 +3614,7 @@ class SumCountMergeAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_sum_.resize(max_group_size, 0);
Expand Down Expand Up @@ -3786,7 +3786,7 @@ class AvgByCountAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_sum_.resize(max_group_size, 0);
Expand Down Expand Up @@ -3965,7 +3965,7 @@ class AvgByCountAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_sum_.resize(max_group_size, 0);
Expand Down Expand Up @@ -4168,7 +4168,7 @@ class StddevSampPartialAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_sum_.resize(max_group_size, 0);
Expand Down Expand Up @@ -4402,7 +4402,7 @@ class StddevSampPartialAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_sum_.resize(max_group_size, 0);
Expand Down Expand Up @@ -4631,7 +4631,7 @@ class StddevSampFinalAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_count_.resize(max_group_size, 0);
Expand Down Expand Up @@ -4844,7 +4844,7 @@ class StddevSampFinalAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_validity_.resize(max_group_size, false);
cache_count_.resize(max_group_size, 0);
Expand Down Expand Up @@ -5082,7 +5082,7 @@ class FirstPartialAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_first_.resize(max_group_size);
cache_value_set_.resize(max_group_size, false);
Expand Down Expand Up @@ -5321,7 +5321,7 @@ class FirstPartialAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_first_.resize(max_group_size);
cache_value_set_.resize(max_group_size, false);
Expand Down Expand Up @@ -5563,7 +5563,7 @@ class FirstFinalAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_first_.resize(max_group_size);
cache_value_set_.resize(max_group_size, false);
Expand Down Expand Up @@ -5820,7 +5820,7 @@ class FirstFinalAction<DataType, CType, ResDataType, ResCType,
if (target_group_size < 128) {
max_group_size = 128;
} else {
max_group_size = target_group_size * 2;
max_group_size = target_group_size + 0.1 * target_group_size;
}
cache_first_.resize(max_group_size);
cache_value_set_.resize(max_group_size, false);
Expand Down

0 comments on commit ef6da75

Please sign in to comment.