Github user jinossy commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/993#discussion_r60341468
  
    --- Diff: 
tajo-core/src/main/java/org/apache/tajo/engine/function/datetime/AddDays.java 
---
    @@ -52,8 +56,16 @@ public AddDays() {
       }
     
       @Override
    +  public void init(OverridableConf context, FunctionEval.ParamType[] 
types) {
    +    if (!hasTimeZone()) {
    +      setTimeZone(context.getConf().getSystemTimezone());
    --- End diff --
    
    My test result was correct. Could you test again?
    ```
    default> \d test;
    
    table name: default.test
    table uri: hdfs://localhost:9010/tajo/warehouse/default/test
    store type: TEXT
    number of rows: 1
    volume: 40 B
    Options:
        'timezone'='Asia/Seoul'
        'text.delimiter'='|'
    
    schema:
    t   TIME
    ts  TIMESTAMP
    d   DATE
    
    
    default> select * from test;
    t,  ts,  d
    -------------------------------
    01:01:23,  2015-05-01 01:01:23,  2015-05-01
    02:02:23,  2016-05-01 02:02:23,  2016-05-01
    (2 rows, 0.154 sec, 0 B selected)
    default> select add_days(ts, 5) from test;
    ?add_days
    -------------------------------
    2015-05-06 01:01:23
    2016-05-06 02:02:23
    (2 rows, 0.076 sec, 0 B selected)
    default> select add_days(d, 5) from test;
    ?add_days
    -------------------------------
    2015-05-06 00:00:00
    2016-05-06 00:00:00
    (2 rows, 0.03 sec, 0 B selected)
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to