Skip to content

Commit

Permalink
#49: Fixed double literal rendering (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobbraun authored Mar 18, 2021
1 parent bdaca27 commit c27a10a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/changes/changes_5.0.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ In this released we fixed double literals.
## Bugfixes:

* #47: Fixed wrong data type for double literals
* #49: Fixed double literal rendering

## Dependency Updates

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public String visit(final SqlLiteralTimestampUtc literal) {

@Override
public String visit(final SqlLiteralDouble literal) {
return "CAST(" + literal.getValue() + " AS DOUBLE)";
return "CAST(" + super.visit(literal) + " AS DOUBLE)";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ void testVisitSqlLiteralTimestampUtc() {
void testVisitSqlLiteralDouble() {
final ExasolSqlGenerationVisitor exasolSqlGenerationVisitor = new ExasolSqlGenerationVisitor(
this.exasolSqlDialect, null);
assertThat(exasolSqlGenerationVisitor.visit(new SqlLiteralDouble(1.23)), equalTo("CAST(1.23 AS DOUBLE)"));
assertThat(exasolSqlGenerationVisitor.visit(new SqlLiteralDouble(1.23)), equalTo("CAST(1.23E0 AS DOUBLE)"));
}
}

0 comments on commit c27a10a

Please sign in to comment.