flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Solovev <Anton_Solo...@epam.com>
Subject trouble with type casting
Date Fri, 28 Oct 2016 09:42:21 GMT

I'm working on flink-4743 issue
I tried write tests as Fabian suggested me https://github.com/apache/flink/pull/2686#discussion_r85218584
and figure out that there is no implicit conversion of bigDecimal to double in table api.
"power" function accept only double as operands.

all is okay when run the function with sql api - "power(bigDecimal, double)" - a CallGenerator
creates casting to double
when running the function with table api - 'bigDecimal.power('double)
it throws ValidationException (fails on input type checking), because of TypeCoercion#canSafelyCast()
cannot allow to cast bigDecimal to double

what options I have?
1) let it cast with lose of information
2) don't use bigDecimal in functions, or cast it manually
3) create somewhere a new functions that accept bigDecimal as operand
4) any ideas?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message