Type cast error when fetching double values from aerospike when numbers are put with values ending as .0


I am getting error interface {} is int, not float64 , while fetching record from aerospike for numbers which end as .0 example 1.0, 13.0

I am pushing value as a float value using

_, err = localAsClient.Execute(shared.WritePolicy, asKey, “metaSet”, “pushMetaValues”, as.FloatValue(13.0))

and also fetching it as float value. I see that number is stored as integer in aerospike.

How are you sure you are saving the data as float64? Are you passing FloatValue(1.0) to the Put API?

I am writing data using as.FloatValue(1.0)

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.