MCPcopy Create free account
hub / github.com/apache/cloudberry / anl_random_fract

Function anl_random_fract

src/backend/utils/misc/sampling.c:344–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342static ReservoirStateData oldrs;
343
344double
345anl_random_fract(void)
346{
347 /* initialize if first time through */
348 if (oldrs.randstate[0] == 0)
349 sampler_random_init_state(random(), oldrs.randstate);
350
351 /* and compute a random fraction */
352 return sampler_random_fract(oldrs.randstate);
353}
354
355double
356anl_init_selection_state(int n)

Callers

nothing calls this directly

Calls 3

randomFunction · 0.85
sampler_random_fractFunction · 0.85

Tested by

no test coverage detected