MCPcopy Create free account
hub / github.com/AbelChe/evil_minio / bytesToFloat

Method bytesToFloat

internal/s3select/sql/value.go:683–687  ·  view source on GitHub ↗

Converts untyped value into float. The bool return implies success - it returns false only if there is a conversion failure.

()

Source from the content-addressed store, hash-verified

681// Converts untyped value into float. The bool return implies success
682// - it returns false only if there is a conversion failure.
683func (v Value) bytesToFloat() (float64, bool) {
684 bytes, _ := v.ToBytes()
685 i, err := strconv.ParseFloat(strings.TrimSpace(string(bytes)), 64)
686 return i, err == nil
687}
688
689// Converts untyped value into bool. The second bool return implies
690// success - it returns false in case of a conversion failure.

Callers 5

InferBytesTypeMethod · 0.95
TestValue_bytesToFloatFunction · 0.95
inferTypesForCmpFunction · 0.80
inferTypeForArithOpFunction · 0.80
evalAggregationNodeMethod · 0.80

Calls 1

ToBytesMethod · 0.95

Tested by 1

TestValue_bytesToFloatFunction · 0.76