Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello I have the following expression and when I have Min and Max == or != to each other in the tester, I get "Exception in thread "main" java.lang.Error: Unresolved compilation problems:"
SET_VALUES.AddrMin == SET_VALUES.AddrMax ? null
: SET_VALUES.AddrMin != SET_VALUES.AddrMax ? SET_VALUES.Count + SET_VALUES.ModuleWidth
:null
However, When I run my job anyway, my results show that is works when Min != Max (it does the calculation properally) However, it doesn't set the output to null if the min == max. Please help!
I ended up changing the data type to Big Decimal and then the following expression worked. For some reason, adding doubles doesn't work very consistently. Thanks!
row6.AddrMin.equals(row6.AddrMax) ? null
: row6.AddrMin.add(row6.MinW)
@dutch070 ,you need to change the expression below way. this will work check this.
SET_VALUES.AddrMin != SET_VALUES.AddrMax ? SET_VALUES.Count + SET_VALUES.ModuleWidth
:null
@dutch070 ,input column data type should be integer.
So It has to be at least a decimal for me because my data set has them. I have it set as datatype double. Math should still work out the same though right?
I tried both expressions and neither worked. for me.
I ended up changing the data type to Big Decimal and then the following expression worked. For some reason, adding doubles doesn't work very consistently. Thanks!
row6.AddrMin.equals(row6.AddrMax) ? null
: row6.AddrMin.add(row6.MinW)