Skip to content

Commit

Permalink
Fix the failure test testExtractDatePartWithTimeType()
Browse files Browse the repository at this point in the history
Signed-off-by: Lantao Jin <ltjin@amazon.com>
  • Loading branch information
LantaoJin committed Dec 30, 2024
1 parent 6712526 commit 9e2defc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

package org.opensearch.sql.expression.datetime;

import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR;
import static java.time.temporal.ChronoField.DAY_OF_WEEK;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.opensearch.sql.data.type.ExprCoreType.LONG;

Expand Down Expand Up @@ -98,7 +98,7 @@ public void testExtractDatePartWithTimeType() {
datePartWithTimeArgQuery(
"WEEK",
timeInput,
LocalDate.now(functionProperties.getQueryStartClock()).get(ALIGNED_WEEK_OF_YEAR));
LocalDate.now(functionProperties.getQueryStartClock()).get(DAY_OF_WEEK));

datePartWithTimeArgQuery(
"MONTH", timeInput, LocalDate.now(functionProperties.getQueryStartClock()).getMonthValue());
Expand Down

0 comments on commit 9e2defc

Please sign in to comment.