when i using case when to trans string to float data, it can not get right error,the sql is right here:
input:
one_data is a map where with key and value,
output:
get the right value into float value.
sql:
select case when one_data[“name1”] is not null then cast(one_data[“name1”] as float)
else 0.0 end as name1_value
when i run is it,get neg value such:
one_data[“name1″]=”123”
name1_value = -123
what is the right answer to use sql