[ https://issues.apache.org/jira/browse/TRAFODION-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Atanu Mishra closed TRAFODION-123. ---------------------------------- Resolution: Fixed Fix Version/s: 0.8 (pre-incubation) > LP Bug: 1233323 - SELECT query returns error 8415 when DATE type is in > primary key > ---------------------------------------------------------------------------------- > > Key: TRAFODION-123 > URL: https://issues.apache.org/jira/browse/TRAFODION-123 > Project: Apache Trafodion > Issue Type: Bug > Components: sql-general > Reporter: Weishiun Tsai > Assignee: Anoop Sharma > Priority: Critical > Fix For: 0.8 (pre-incubation) > > > When the DATE type is used as a primary key, the SELECT query returns error > 8415, as shown in the following example. Also shown in the example is that > the same query runs fine if DATE is not a primary key. A similar query > without the WHERE clause also runs fine when DATE is a primary key. > >>cqd mode_seabase 'on'; > --- SQL operation complete. > >>set schema seabase.phoenix; > --- SQL operation complete. > >>create table t (id int no default not null, date1 date no default not null) > >>primary key (id); > --- SQL operation complete. > >>insert into t values (3, date '2013-01-01'), (2, date '2011-01-01'), (1, > >>date '2012-01-01'); > --- 3 row(s) inserted. > >>select id, date1 from t where id < 2; > ID DATE1 > ----------- ---------- > 1 2012-01-01 > --- 1 row(s) selected. > >>drop table t; > --- SQL operation complete. > >>create table t (id int no default not null, date1 date no default not null) > >>primary key (id, date1); > --- SQL operation complete. > >>insert into t values (3, date '2013-01-01'), (2, date '2011-01-01'), (1, > >>date '2012-01-01'); > --- 3 row(s) inserted. > >>select id, date1 from t where id < 2; > >> > *** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot > be converted. > --- 0 row(s) selected. > >>select id, date1 from t; > ID DATE1 > ----------- ---------- > 1 2012-01-01 > 2 2011-01-01 > 3 2013-01-01 > --- 3 row(s) selected. -- This message was sent by Atlassian JIRA (v6.3.4#6332)