MCPcopy Create free account
hub / github.com/PyTables/PyTables / col_light

Function col_light

tables/idxutils.py:230–241  ·  view source on GitHub ↗

Compute the optimizations to be done for light indexes.

(nblocks: int, optlevel: int)

Source from the content-addressed store, hash-verified

228
229
230def col_light(nblocks: int, optlevel: int) -> tuple[bool, bool, bool, bool]:
231 """Compute the optimizations to be done for light indexes."""
232 optmedian, optstarts, optstops, optfull = (False,) * 4
233
234 if 0 < optlevel <= 3:
235 optmedian = True
236 elif 3 < optlevel <= 6:
237 optmedian, optstarts = (True, True)
238 elif 6 < optlevel <= 9:
239 optmedian, optstarts, optstops = (True, True, True)
240
241 return optmedian, optstarts, optstops, optfull
242
243
244def col_medium(nblocks: int, optlevel: int) -> tuple[bool, bool, bool, bool]:

Callers 1

calcoptlevelsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected