Skip to content

Commit

Permalink
Fixed TestJava8DateTime failures.
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Kraus <tomas.kraus@oracle.com>
  • Loading branch information
Tomas-Kraus authored and lukasj committed Mar 4, 2022
1 parent 243dd93 commit 74aeaa5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ protected Hashtable<Class<?>, FieldTypeDefinition> buildFieldTypes() {

fieldTypeMapping.put(java.time.LocalDate.class, new FieldTypeDefinition("DATE"));
fieldTypeMapping.put(java.time.LocalDateTime.class, new FieldTypeDefinition("TIMESTAMP"));
fieldTypeMapping.put(java.time.LocalTime.class, new FieldTypeDefinition("TIME"));
fieldTypeMapping.put(java.time.LocalTime.class, new FieldTypeDefinition("TIMESTAMP"));
fieldTypeMapping.put(java.time.OffsetDateTime.class, new FieldTypeDefinition("TIMESTAMP"));
fieldTypeMapping.put(java.time.OffsetTime.class, new FieldTypeDefinition("TIMESTAMP"));

Expand All @@ -343,6 +343,8 @@ protected void initializePlatformOperators() {
super.initializePlatformOperators();
// Derby does not support DECIMAL, but does have a DOUBLE function.
addOperator(ExpressionOperator.simpleFunction(ExpressionOperator.ToNumber, "DOUBLE"));
// LocalTime should be processed as TIMESTAMP
addOperator(ExpressionOperator.simpleFunctionNoParentheses(ExpressionOperator.LocalTime, "CAST(CURRENT_TIME AS TIMESTAMP)"));
addOperator(extractOperator());
addOperator(derbyPowerOperator());
addOperator(derbyRoundOperator());
Expand Down

0 comments on commit 74aeaa5

Please sign in to comment.