Apache OpenOffice (AOO) Bugzilla – Issue 117278
CAST shows non existing data in query results
Last modified: 2013-01-29 21:47:48 UTC
I created table with, ID(integr), timestamps, date, time data types in fields. I added data into it adding NULL into some fields, it inserted default data into these fields, other fields remains empty. SELECT CAST( "timestamp" AS DATE ) FROM "Table" SELECT CAST( "date" AS DATE ) AS "one" FROM "Table" When these queries run instead of empty fields I get, 1-01-02 date value instead of empty field. Similar happens with SELECT CAST( "timestamp" AS TIME ) FROM "Table" SELECT CAST( "time" AS TIME ) FROM "Table" When these queries run instead of empty fields I get, 00:00:00 time value instead of empty field. If I run hsqldb server and run same queries in database manager I get empty fields when no data in table. This happens same in DEV300m101, OOo 3.3 and cws dba34d from qa-upload.
Created attachment 76049 [details] bugdoc with CAST in query
can confirm. @oj: sounds a little bit like a duplicate of the HSQL bug we found lately, in another context: HSQL claiming that a column can't be NULL, so we respect that and deliver some non-NULL value.
@fs: Yes, but not duplicate. It has to be fixed in the database itself. CAST can return NULL values so the resultmetadata must be fixed to return the correct value ;-)
getting rid of value "enhancement" for field "severity". For enhancement the field "issue type" shall be used.