[
https://issues.apache.org/jira/browse/TRAFODION-3043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Wayne Birdsall updated TRAFODION-3043:
--------------------------------------------
Description:
If we run the following script:
drop table if exists t;
create table t (c1 interval year to month, c2 interval month);
insert into t values (interval '11-01' year to month, interval '11' month);
select DATE_PART('YEARQUARTER', c1) from t;
select DATE_PART('YEARQUARTER', c2) from t;
select DATE_PART('YEARMONTH', c1) from t;
select DATE_PART('YEARMONTH', c2) from t;
select DATE_PART('YEARWEEK', c1) from t;
select DATE_PART('YEARWEEK', c2) from t;
We get correct 4037 error messages on column c2. For YEARQUARTER and YEARMONTH
on c1 though we get an internal error 8001 at run-time instead. For YEARWEEK we
get a compile time error 4035 on c1 instead.
was:
If we run the following script:
drop table if exists t;
create table t (c1 interval year to month, c2 interval month);
insert into t values (interval '11-01' year to month, interval '11' month);
select DATE_PART('YEARQUARTER', c1) from t;
select DATE_PART('YEARQUARTER', c2) from t;
select DATE_PART('YEARMONTH', c1) from t;
select DATE_PART('YEARMONTH', c2) from t;
select DATE_PART('YEARWEEK', c1) from t;
select DATE_PART('YEARWEEK', c2) from t;
We get correct 4037 error messages on column c2, and on c1 for YEARWEEK. For
the other two on c1 though we get an internal error 8001 at run-time instead.
> DATE_PART(YEARQUARTER|YEARMONTH|YEARWEEK, <interval>) should return a proper
> error
> ----------------------------------------------------------------------------------
>
> Key: TRAFODION-3043
> URL: https://issues.apache.org/jira/browse/TRAFODION-3043
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmp
> Affects Versions: 2.3
> Reporter: David Wayne Birdsall
> Assignee: David Wayne Birdsall
> Priority: Major
>
> If we run the following script:
> drop table if exists t;
> create table t (c1 interval year to month, c2 interval month);
> insert into t values (interval '11-01' year to month, interval '11' month);
> select DATE_PART('YEARQUARTER', c1) from t;
> select DATE_PART('YEARQUARTER', c2) from t;
> select DATE_PART('YEARMONTH', c1) from t;
> select DATE_PART('YEARMONTH', c2) from t;
> select DATE_PART('YEARWEEK', c1) from t;
> select DATE_PART('YEARWEEK', c2) from t;
> We get correct 4037 error messages on column c2. For YEARQUARTER and
> YEARMONTH on c1 though we get an internal error 8001 at run-time instead. For
> YEARWEEK we get a compile time error 4035 on c1 instead.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)