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

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

                Author: ASF GitHub Bot
            Created on: 17/Jul/18 21:02
            Start Date: 17/Jul/18 21:02
    Worklog Time Spent: 10m 
      Work Description: apilloud commented on a change in pull request #5926: 
[BEAM-4723] [SQL] Support datetime type minus time interval
URL: https://github.com/apache/beam/pull/5926#discussion_r203174889
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/date/BeamSqlTimestampMinusIntervalExpression.java
 ##########
 @@ -52,8 +50,8 @@ public boolean accept() {
   static boolean accept(List<BeamSqlExpression> operands, SqlTypeName 
outputType) {
     return operands.size() == 2
         && SqlTypeName.TIMESTAMP.equals(outputType)
-        && SqlTypeName.TIMESTAMP.equals(operands.get(0).getOutputType())
-        && 
INTERVALS_DURATIONS_TYPES.containsKey(operands.get(1).getOutputType());
+        && SqlTypeName.DATETIME_TYPES.contains(operands.get(0).getOutputType())
 
 Review comment:
   This one line appears to be the only functional change in this diff. Took me 
a few minutes to find it because of all the no-op changes. So with this change 
you are expanding the set of supported types to `DATE, TIME, 
TIME_WITH_LOCAL_TIME_ZONE, TIMESTAMP, TIMESTAMP_WITH_LOCAL_TIME_ZONE`. I think 
you need to rename this class to `BeamSqlDatetimeMinusIntervalExpression` to 
reflect its new behavior.

----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 124215)
    Time Spent: 1.5h  (was: 1h 20m)

> Enhance Datetime*Expression Datetime Type
> -----------------------------------------
>
>                 Key: BEAM-4723
>                 URL: https://issues.apache.org/jira/browse/BEAM-4723
>             Project: Beam
>          Issue Type: Bug
>          Components: dsl-sql
>            Reporter: Kai Jiang
>            Assignee: Kai Jiang
>            Priority: Major
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Datetime*Expression only supports timestamp type for first operand now. We 
> should let it accept all Datetime_Types



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

Reply via email to