MCPcopy Create free account
hub / github.com/apache/fory / countCompatibleDigit

Function countCompatibleDigit

go/fory/compatible_scalar.go:963–968  ·  view source on GitHub ↗
(digit byte, seenNonZero *bool, significantDigits *int64)

Source from the content-addressed store, hash-verified

961}
962
963func countCompatibleDigit(digit byte, seenNonZero *bool, significantDigits *int64) {
964 if digit != '0' || *seenNonZero {
965 *seenNonZero = true
966 (*significantDigits)++
967 }
968}
969
970func compatibleDecimalShape(significantDigits int64, scale int64) bool {
971 if scale > maxCompatibleDecimalDigits {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected