[ 
https://issues.apache.org/jira/browse/TRAFODION-3150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16549458#comment-16549458
 ] 

Hans Zeller commented on TRAFODION-3150:
----------------------------------------

1.select extract(quarter from interval '99' month) from dual;

 

99 months are 8 years and 3 months. That is 33 quarters. Since the argument is 
an interval, the result should also reflect the interval.

 

2.select extract(week from date '2016-01-03') from dual;

 

That date is the first Sunday in 2016. According to the Trafodion SQL reference 
manual, this starts the second week of the year. I know there are other ways to 
compute the week, and ISO 8601 would come to a different result, but Trafodion 
does not use ISO 8601 to calculate week numbers.

 

3.select to_char(date '2016-01-03','ww') from dual;

 

Same as above

 

4.select to_char(time '00:00:01', 'hh12') from dual;

 

I'm not sure about this one.

 

Maybe you compared this to Oracle and got different results? I think we would 
have to discuss whether we would want to make an incompatible change to 
Trafodion to be more similar to Oracle. Then, would that make us incompatible 
with maybe some other system like MySQL or Impala?

> to_char and extract function's new options bug
> ----------------------------------------------
>
>                 Key: TRAFODION-3150
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3150
>             Project: Apache Trafodion
>          Issue Type: Bug
>            Reporter: chenyunren
>            Priority: Major
>
> 1.select extract(quarter from interval '99' month) from dual;
> return:33
> should return 1
> 2.select extract(week from date '2016-01-03') from dual;
> return:2
> should return 1
> 3.select to_char(date '2016-01-03','ww') from dual;
> return:2
> should return 1
> 4.select to_char(time '00:00:01', 'hh12') from dual;
> return:00
> should return 12



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

Reply via email to