Invalid type for numerics
Closed this issue · 5 comments
romaintailhurat commented
When handling expression like:
WEB := WEB [calc NHAB := if (nvl(NBHAB,0)=0) then 1 else cast(NBHAB,integer)];
in Kraftwerk, an error occurs:
invalid type Long, expected 0 to be Double
Note that this VTL expression is reused from the questionnaire definition (for which the used VTL implementation is TrevasJS)
The full error message in Kraftwerk
Script='WEB := WEB [calc NHAB := if (nvl(NBHAB,0)=0) then 1 else cast(NBHAB,integer)];'
Message='invalid type Long, expected 0 to be Double'
NicoLaval commented
I reproduced your use case in tests and for me there is no error.
Is your Trevas version up-to-date?
NicoLaval commented
@romaintailhurat any news?
romaintailhurat commented
Checking with the Post Processing team at Insee
NicoLaval commented
@romaintailhurat can we close?
romaintailhurat commented
Probably