This is an automated email from the ASF dual-hosted git repository.
dzamo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git
The following commit(s) were added to refs/heads/master by this push:
new 8850b697fd [MINOR UPDATE]: Fix Code Gen Error in Nearest Date UDF
(#2769)
8850b697fd is described below
commit 8850b697fdddaf6ff4fb117b6a757e36eca3ba61
Author: Charles S. Givre <[email protected]>
AuthorDate: Thu Mar 2 00:17:23 2023 -0500
[MINOR UPDATE]: Fix Code Gen Error in Nearest Date UDF (#2769)
---
.../udfs/src/main/java/org/apache/drill/exec/udfs/DateFunctions.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/contrib/udfs/src/main/java/org/apache/drill/exec/udfs/DateFunctions.java
b/contrib/udfs/src/main/java/org/apache/drill/exec/udfs/DateFunctions.java
index 979d60374e..75b56ef001 100644
--- a/contrib/udfs/src/main/java/org/apache/drill/exec/udfs/DateFunctions.java
+++ b/contrib/udfs/src/main/java/org/apache/drill/exec/udfs/DateFunctions.java
@@ -80,7 +80,7 @@ public class DateFunctions {
String input =
org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(interval.start,
interval.end, interval.buffer);
java.time.LocalDateTime ld =
java.time.LocalDateTime.ofInstant(java.time.Instant.ofEpochMilli(inputDate.value),
java.time.ZoneId.of("UTC"));
- java.time.LocalDateTime td = DateConversionUtils.getDate(ld, input);
+ java.time.LocalDateTime td =
org.apache.drill.exec.udfs.DateConversionUtils.getDate(ld, input);
out.value =
td.atZone(java.time.ZoneId.of("UTC")).toInstant().toEpochMilli();
}
}
@@ -143,7 +143,7 @@ public class DateFunctions {
java.time.format.DateTimeFormatter formatter =
java.time.format.DateTimeFormatter.ofPattern(format);
java.time.LocalDateTime dateTime =
java.time.LocalDateTime.parse(inputDate, formatter);
- java.time.LocalDateTime td = DateConversionUtils.getDate(dateTime,
intervalString);
+ java.time.LocalDateTime td =
org.apache.drill.exec.udfs.DateConversionUtils.getDate(dateTime,
intervalString);
out.value =
td.atZone(java.time.ZoneId.of("UTC")).toInstant().toEpochMilli();
}
}