-
Notifications
You must be signed in to change notification settings - Fork 190
[BUG][Calcite Engine] Calcite doesn't support cast decimal to double #3437
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
bugSomething isn't workingSomething isn't workingcalcitecalcite migration releatedcalcite migration releatedwontfixThis will not be worked onThis will not be worked on
Description
What is the bug?
When converting a set of literals to Sarg, calcite will throw exception if there is both type of integer and double, although they are both numeric family
Exception stack:
class java.lang.Double cannot be cast to class java.math.BigDecimal (java.lang.Double and java.math.BigDecimal are in module java.base of loader 'bootstrap')
java.lang.ClassCastException: class java.lang.Double cannot be cast to class java.math.BigDecimal (java.lang.Double and java.math.BigDecimal are in module java.base of loader 'bootstrap')
at java.base/java.math.BigDecimal.compareTo(BigDecimal.java:305)
at com.google.common.collect.Range.compareOrThrow(Range.java:702)
at com.google.common.collect.Cut.compareTo(Cut.java:80)
at com.google.common.collect.Range.<init>(Range.java:331)
at com.google.common.collect.Range.create(Range.java:132)
at com.google.common.collect.Range.closed(Range.java:157)
at org.apache.calcite.rex.RexBuilder.makeBetween(RexBuilder.java:1805)
at org.apache.calcite.tools.RelBuilder.between(RelBuilder.java:1153)
at org.apache.calcite.tools.RelBuilder.call(RelBuilder.java:752)
at org.apache.calcite.tools.RelBuilder.call(RelBuilder.java:765)
at org.apache.calcite.tools.RelBuilder.call(RelBuilder.java:736)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcalcitecalcite migration releatedcalcite migration releatedwontfixThis will not be worked onThis will not be worked on