public static Expression resolve(final Expression expression, final SqlType sqlType) {
    if (sqlType instanceof SqlDecimal) {
      return resolveToDecimal(expression, (SqlDecimal)sqlType);
    }

    return expression;
  }
@Test
  public void shouldNotCastToDecimal() {
    // Given
    final List<Literal> fromLiterals = Arrays.asList(
        new BooleanLiteral("true"),
        new StringLiteral("10.2"),
        new DecimalLiteral(BigDecimal.valueOf(10.133))
    );

    for (final Literal literal : fromLiterals) {
      // When
      final Expression expression =
          ImplicitlyCastResolver.resolve(literal, DECIMAL_5_2);

      // Then
      assertThat("Should not cast " + literal.getClass().getSimpleName() + " to " + DECIMAL_5_2,
          expression, instanceOf(literal.getClass()));
      assertThat("Should not cast " + literal.getClass().getSimpleName() + " to " + DECIMAL_5_2,
          expression.equals(literal), is(true));
    }
  }