Conditional logic with integer working just fine but not working with float, is my interpreting of float in condition wrong ?
I tried all possible scenarios for float brackets but no success.
Integer conditional logic - results OK
join(tables:{reject:reject, cycle:cycle}, on:["_start"])
|> map(fn:(r) => ({
_value: if r._value_cycle == 0 then 5 else r._value_cycle / r._value_reject
}))
Without conditional logic, float works fine - OK
quality = join(tables:{reject:reject, cycle:cycle}, on:["_start"])
|> map(fn:(r) => ({
_value: ((float(v: r._value_cycle) - float(v: r._value_reject)) / float(v: r._value_cycle)) * 100.00 }))
Float conditional logic - NO RESULT, ERROR
quality = join(tables:{reject:reject, cycle:cycle}, on:["_start"])
|> map(fn:(r) => ({
_value: if r._value_cycle == 0 then 5 else float(v: r._value_cycle) / float(v: r._value_reject)
}))