[ 
https://issues.apache.org/jira/browse/BEAM-5112?focusedWorklogId=178746&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-178746
 ]

ASF GitHub Bot logged work on BEAM-5112:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Dec/18 19:42
            Start Date: 26/Dec/18 19:42
    Worklog Time Spent: 10m 
      Work Description: akedin commented on pull request #6417: [BEAM-5112] Use 
Calcite codegen to implement BeamCalcRel
URL: https://github.com/apache/beam/pull/6417#discussion_r244035866
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/integrationtest/BeamSqlDateFunctionsIntegrationTest.java
 ##########
 @@ -55,11 +56,13 @@ public Void apply(Iterable<Row> input) {
       Row row = iter.next();
       // LOCALTIME
       DateTime date = DateTime.now();
-      assertTrue(date.getMillis() - row.getDateTime(0).getMillis() < 1000);
-      assertTrue(date.getMillis() - row.getDateTime(1).getMillis() < 1000);
-      assertTrue(date.getMillis() - row.getDateTime(2).getMillis() < 1000);
-      assertTrue(date.getMillis() - row.getDateTime(3).getMillis() < 1000);
-      assertTrue(date.getMillis() - row.getDateTime(4).getMillis() < 1000);
+      long millis = date.getMillis();
+      int timeMillis = (int) (date.getMillis() % MILLIS_PER_DAY);
+      assertTrue(timeMillis - row.getDateTime(0).getMillis() < 1000);
+      assertTrue(millis - row.getDateTime(1).getMillis() < 1000);
+      assertTrue(millis - row.getDateTime(2).getMillis() < (MILLIS_PER_DAY + 
1000));
 
 Review comment:
   nit: can you add few comments here, it's hard to parse these assertions
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 178746)
    Time Spent: 2.5h  (was: 2h 20m)

> Investigate if Calcite can generate functions that we need
> ----------------------------------------------------------
>
>                 Key: BEAM-5112
>                 URL: https://issues.apache.org/jira/browse/BEAM-5112
>             Project: Beam
>          Issue Type: Sub-task
>          Components: dsl-sql
>            Reporter: Rui Wang
>            Assignee: Andrew Pilloud
>            Priority: Major
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to