Vladimir Sitnikov created OPTIQ-308:
---------------------------------------
Summary: Wrong result when using DATE+INTERVAL arithmetics
Key: OPTIQ-308
URL: https://issues.apache.org/jira/browse/OPTIQ-308
Project: optiq
Issue Type: Bug
Reporter: Vladimir Sitnikov
Assignee: Julian Hyde
Test: {{date '2014-06-19' + interval '1' year}}
{noformat}
java.lang.AssertionError:
Expected :[2015-06-19]
Actual :[2014-06-31]
{noformat}
Generated java code:
{noformat}
/* 23 */ public Object current() {
/* 24 */ return $L4J$C$16240_12;
/* 25 */ }
/* 26 */
/* 27 */ static final int $L4J$C$16240_12 = 16240 + 12; // !!! interval '1'
year is converted to 12 months and 12 gets added to the number of days
{noformat}
Additional test -- {{JdbcTest.testWinIntervalFrame}}
--
This message was sent by Atlassian JIRA
(v6.2#6252)