Issue1421

classification
Title: Support for INTERVAL types (Oracle)
Type: crash Severity: normal
Components: zxjdbc Versions: Jython 2.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: etelstan, fwierzbicki, pjenvey, zyasoft
Priority: normal Keywords:

Created on 2009-08-04.11:36:22 by etelstan, last changed 2014-09-26.05:14:41 by zyasoft.

Messages
msg4985 (view) Author: Yuri (etelstan) Date: 2009-08-04.11:36:21
Trying to execute select INTERVAL type column causes exception:

Java Traceback:
java.sql.SQLException: error getting index [1], type [-104]
	at com.ziclix.python.sql.DataHandler.getPyObject(DataHandler.java:307)
	at
com.ziclix.python.sql.FilterDataHandler.getPyObject(FilterDataHandler.java:110)
	at
com.ziclix.python.sql.JDBC20DataHandler.getPyObject(JDBC20DataHandler.java:151)
	at com.ziclix.python.sql.Fetch.createResult(Fetch.java:436)
	at com.ziclix.python.sql.Fetch.createResults(Fetch.java:411)
	at com.ziclix.python.sql.StaticFetch.add(Fetch.java:519)
	at com.ziclix.python.sql.StaticFetch.add(Fetch.java:505)
	at com.ziclix.python.sql.PyStatement.execute(PyStatement.java:219)
	at com.ziclix.python.sql.PyCursor.execute(PyCursor.java:612)
	at com.ziclix.python.sql.PyCursor.execute(PyCursor.java:584)
	at com.ziclix.python.sql.CursorFunc.__call__(PyCursor.java:912)
	at org.python.core.PyObject.__call__(PyObject.java:401)
...

Environment: 
Oracle 10.2, Oracle JDBC driver 9.0

Selected table DDL:
CREATE TABLE meeting (
    prj_id         VARCHAR(16) NOT NULL,
    item_no        NUMBER(38) NOT NULL,
    meeting_seq    NUMBER(38),
    starts_at      TIMESTAMP WITH TIME ZONE,
    duration       INTERVAL DAY TO SECOND,
    CONSTRAINT meeting_pk
      PRIMARY KEY (prj_id,item_no),
    CONSTRAINT meeting_uk
      UNIQUE (meeting_seq)
);

Selected table data:
INSERT INTO meeting (prj_id, item_no, meeting_seq, starts_at, duration)
VALUES
('smbl',2,1,'2005-12-10 15:30 -3:00',INTERVAL '1:30' HOUR TO MINUTE);
INSERT INTO meeting (prj_id, item_no, meeting_seq, starts_at, duration)
VALUES
('smbl',30,2,'2005-12-15 13:00 -3:00',INTERVAL '0:30' HOUR TO MINUTE);
INSERT INTO meeting (prj_id, item_no, meeting_seq, starts_at, duration)
VALUES
('smen',2,3,'2006-05-01 10:00 -3:00',INTERVAL '1:00' HOUR TO MINUTE);
INSERT INTO meeting (prj_id, item_no, meeting_seq, starts_at, duration)
VALUES
('smak',2,4,'2007-02-28 16:00 -4:00',INTERVAL '2:00' HOUR TO MINUTE);
INSERT INTO meeting (prj_id, item_no, meeting_seq, starts_at, duration)
VALUES
('smak',5,5,'2006-09-01 13:00 -4:00',INTERVAL '1:00' HOUR TO MINUTE);


SQL statement:
SELECT "_meeting_1"."DURATION" AS "_e_1", "_meeting_1"."PRJ_ID" AS
"_e_2", "_meeting_1"."ITEM_NO" AS "_e_3" FROM "MEETING" "_meeting_1"
ORDER BY "_e_2" ASC, "_e_3" ASC
msg4986 (view) Author: Philip Jenvey (pjenvey) Date: 2009-08-04.23:03:55
There's a number of other Oracle specific types that trigger this too. 
I've already seen the SQLAlchemy test suite trigger it with TIMESTAMPTZ 
(code -101) columns
msg9039 (view) Author: Jim Baker (zyasoft) Date: 2014-09-26.05:14:41
To be fixed by using jyjdbc to replace zxJDBC (jyjdbc has the necessary testing for us to move forward)
History
Date User Action Args
2014-09-26 05:14:41zyasoftsetmessages: + msg9039
2013-02-25 18:47:57fwierzbickisetnosy: + fwierzbicki
versions: + Jython 2.5, - 2.5.1
2010-10-15 14:05:33zyasoftsetassignee: zyasoft ->
2010-08-22 22:48:21zyasoftsetpriority: normal
2009-08-04 23:03:55pjenveysetnosy: + pjenvey
messages: + msg4986
2009-08-04 14:57:31zyasoftsetassignee: zyasoft
nosy: + zyasoft
versions: + 2.5.1, - 2.5.0
2009-08-04 11:36:22etelstancreate