MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / std

Method std

sql/sql_analyse.h:256–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254 return s;
255 }
256 String *std(String *s, ha_rows rows)
257 {
258 double tmp = ulonglong2double(rows);
259 if (!(tmp - nulls))
260 s->set_real((double) 0.0, 1,my_thd_charset);
261 else
262 {
263 double tmp2 = ((sum_sqr - sum * sum / (tmp - nulls)) /
264 (tmp - nulls));
265 s->set_real(((double) tmp2 <= 0.0 ? 0.0 : sqrt(tmp2)), DEC_IN_AVG,my_thd_charset);
266 }
267 return s;
268 }
269 friend int collect_longlong(longlong *element, element_count count,
270 TREE_INFO *info);
271 tree_walk_action collect_enum()

Callers

nothing calls this directly

Calls 1

set_realMethod · 0.80

Tested by

no test coverage detected