mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
Merge pull request #66320 from waynexia/period-detect
Avoid unneeded calculation in SeriesPeriodDetect
This commit is contained in:
commit
e501894767
@ -153,12 +153,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<double> xfreq(spec_len);
|
||||
double step = 0.5 / (spec_len - 1);
|
||||
for (size_t i = 0; i < spec_len; ++i)
|
||||
xfreq[i] = i * step;
|
||||
|
||||
auto freq = xfreq[idx];
|
||||
auto freq = idx * step;
|
||||
|
||||
period = std::round(1 / freq);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user