Skip to content

Commit

Permalink
Fixed code coverage for time passed to date function case.
Browse files Browse the repository at this point in the history
Signed-off-by: MitchellGale-BitQuill <[email protected]>
  • Loading branch information
MitchellGale committed Oct 19, 2022
1 parent 99c98b0 commit f9e38e9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP;

import com.google.common.collect.ImmutableList;
import java.time.LocalDate;
import java.util.List;
import lombok.AllArgsConstructor;
import org.junit.jupiter.api.BeforeEach;
Expand Down Expand Up @@ -248,6 +249,8 @@ public void date() {

expr = dsl.date(dsl.time(DSL.literal("12:12:00")));
assertEquals(DATE, expr.type());
assertEquals(new ExprDateValue(LocalDate.now()), expr.valueOf(null));


expr = dsl.date(DSL.literal("2020-02-30"));
assertEquals(nullValue(), expr.valueOf(null));
Expand Down

0 comments on commit f9e38e9

Please sign in to comment.