You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by dz...@apache.org on 2023/04/18 15:26:34 UTC

[drill] 06/15: [MINOR UPDATE]: Fix Code Gen Error in Nearest Date UDF (#2769)

This is an automated email from the ASF dual-hosted git repository.

dzamo pushed a commit to branch 1.21
in repository https://gitbox.apache.org/repos/asf/drill.git

commit 92fd3147738aa7dee04d873cada5a5696838dc9c
Author: Charles S. Givre <cg...@apache.org>
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();
     }
   }