Skip to content

Commit

Permalink
Fix testConvertComparison test in TestPostgreSqlClient
Browse files Browse the repository at this point in the history
  • Loading branch information
Praveen2112 committed Apr 8, 2024
1 parent a54d768 commit b6742fb
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,20 +285,16 @@ public void testConvertComparison()
switch (operator) {
case EQUAL:
case NOT_EQUAL:
assertThat(converted).isPresent();
assertThat(converted.get().expression()).isEqualTo(format("(\"c_bigint\") %s (?)", operator.getValue()));
assertThat(converted.get().parameters()).isEqualTo(List.of(new QueryParameter(BIGINT, Optional.of(42L))));
return;
case LESS_THAN:
case LESS_THAN_OR_EQUAL:
case GREATER_THAN:
case GREATER_THAN_OR_EQUAL:
case IS_DISTINCT_FROM:
// Not supported yet, even for bigint
assertThat(converted).isEmpty();
return;
assertThat(converted).isPresent();
assertThat(converted.get().expression()).isEqualTo(format("(\"c_bigint\") %s (?)", operator.getValue()));
assertThat(converted.get().parameters()).isEqualTo(List.of(new QueryParameter(BIGINT, Optional.of(42L))));
break;
}
throw new UnsupportedOperationException("Unsupported operator: " + operator);
}
}

Expand Down

0 comments on commit b6742fb

Please sign in to comment.