MCPcopy Create free account
hub / github.com/apache/impala / GetNumDigits

Function GetNumDigits

be/src/exprs/mask-functions-ir.cc:293–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293static inline int GetNumDigits(int64_t val) {
294 if (val == 0) return 1;
295 if (val < 0) val = -val;
296 int num_digits = 0;
297 while (val != 0) {
298 num_digits++;
299 val /= 10;
300 }
301 return num_digits;
302}
303
304/// Mask the numeric value by replacing the digits with 'masked_number'. The first
305/// 'un_mask_char_count' digits will be kept unchanged. Ported from

Callers 4

MaskShowFirstNImplFunction · 0.85
MaskShowLastNImplFunction · 0.85
MaskFirstNImplFunction · 0.85
MaskLastNImplFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected