Skip to content

Commit

Permalink
fix: rely on interface for literal handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bvolpato committed Feb 22, 2025
1 parent c7e0f02 commit 0394f98
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ public Expression.Literal convert(RexLiteral literal) {
}
throw new UnsupportedOperationException("Unable to handle char type: " + val);
}
case FLOAT, DOUBLE -> fp64(n, (Double) literal.getValue());
case REAL -> fp32(n, ((Double) literal.getValue()).floatValue());

case FLOAT, DOUBLE -> fp64(n, ((Number) literal.getValue()).doubleValue());
case REAL -> fp32(n, ((Number) literal.getValue()).floatValue());
case DECIMAL -> {
BigDecimal bd = bd(literal);
yield decimal(n, bd, literal.getType().getPrecision(), literal.getType().getScale());
Expand Down

0 comments on commit 0394f98

Please sign in to comment.