You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2020/04/06 01:47:40 UTC

[GitHub] [drill] cgivre commented on a change in pull request #2040: DRILL-7668: Allow Time Bucket Function to Accept Floats and Timestamps

cgivre commented on a change in pull request #2040: DRILL-7668: Allow Time Bucket Function to Accept Floats and Timestamps
URL: https://github.com/apache/drill/pull/2040#discussion_r403792155
 
 

 ##########
 File path: contrib/udfs/src/test/java/org/apache/drill/exec/udfs/TestTimeBucketFunction.java
 ##########
 @@ -92,6 +94,28 @@ public void testTimeBucket() throws Exception {
       .go();
   }
 
+  @Test
+  public void testDoubleTimeBucket() throws Exception {
+    String query = "SELECT time_bucket(CAST(1451606760 AS DOUBLE), 300000) AS high FROM (values(1))";
+    testBuilder()
+      .sqlQuery(query)
+      .ordered()
+      .baselineColumns("high")
+      .baselineValues(1451400000L)
+      .go();
+  }
+
+  @Test
+  public void testTimeBucketTimestamp() throws Exception {
+    String query = "SELECT time_bucket(CAST(1585272833845 AS TIMESTAMP), 300000) AS high FROM (values(1))";
 
 Review comment:
   Removed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services