Closed jbigot closed 2 months ago
you're right, there's a bug in the logic where we do the math not based on the type of the operands (double) as expected, but on the type of the result (boolean, hence int)
created branch 430-use-set_value-plugin-with-floating-point-values
to address this issue
created branch 430-use-set_value-plugin-with-floating-point-values
to address this issue
@Yushan-Wang, can you test with branch 430-use-set_value-plugin-with-floating-point-values
?
In GitLab by @Yushan-Wang on Sep 16, 2022, 15:08
@jbigot Sorry, the problem is still here.
In GitLab by @Yushan-Wang on Sep 16, 2022, 19:13
After removing the old build and install, this new branch works perfectly. Thanks @jbigot
mentioned in commit ab9edd1c7f6b919759fa3856bb19370d2811266f
mentioned in commit 4972327772ba325fe1591864fcaa80131c3e0f67
mentioned in commit e30b443eac49ddf135856d601b2d491517596d40
mentioned in commit 44c212c418a07684eb9fe97c07966ebe68ca615d
mentioned in commit a53d910378d7b2133527965cc5c16396e195124c
mentioned in commit ae61cdaba15020ab8eb67427ccd1dfe5283bda09
mentioned in commit dd5a3b1aaa3a98ef70a2ad76d740d6ca1a1506db
mentioned in commit 3ef709ce012fcbf6d3a7f0d5c97fe42f180cd937
mentioned in commit a6a012b6a618ec3c97fbb5016017d8578837f68b
mentioned in commit 51550ba62f96cacb195eb35a7250f181d184b453
mentioned in commit c222de1aeb68e8a1c80e9ed61c27140b32a3cd4a
Fixed in 1.5.5
In GitLab by @Yushan-Wang on Sep 7, 2022, 13:37
Does the set_value plugin support floating-point values? All the examples provided by PDI website use integer numbers. https://pdi.dev/master/set_value_plugin.html
For example, I want to set the integer value of
my_switch
from an expression${current_time} >= ${final_time}
wherecurrent/final_time
are floating-point numbers.I got that the floating-point numbers are cast into integers before applying the
>=
operation.For example, if
current_time=1.0
andfinal_time=1.5
, thenmy_switch=1
because[1.0]=1>=1=[1.5]
.I also tried with
${current_time:f} >= ${final_time:f}
but got the same wrong result.