Open dorlevi opened 3 months ago
Could be related to #12670
Can you try select min(cast(block_number as double)) from org_2dYiMRMfas142XRKQ3bJIqmN3V6_erc20_balance_changes limit 10
and see if it works? Even in v1
this query won't be executed on big_decimal
, but on double
with potential precision loss
The original queryselect min(block_number) from org_2dYiMRMfas142XRKQ3bJIqmN3V6_erc20_balance_changes limit 10
works well on v1 for us; tried your version casting as double works. but it shouldn't be necessary here
v2 is strong typed, and currently min()
takes double
as input and return double
, that is why it failed in v2. Ideally min()
should be able to directly take big_decimal
and return big_decimal
.
Ideally it would support all the types that other calcite compatible DBs would accept
A simple min/max over a big_decimal fails when using the multi-stage engine,
Query:
select min(block_number) from org_2dYiMRMfas142XRKQ3bJIqmN3V6_erc20_balance_changes limit 10
Error:
the same query works on v1 query engine.