问题描述
当玩众所周知的PivotImpl和我自己的衍生物时,我发现一个奇怪的行为OCDITableDescribe和OCDITableStart当查询包含FLOAT列时:
而FLOAT(正确) 检测为NUMBER在ODCITabeDecribePivotImpl的实现:CASE desc_tab(i).col_type返回2...
的CASE type_code在ODCITableStart返回4!
(and 4 is not documented anywhere as far as I was able to search在的doc...).
And of course 的outside call fails with a ORA-06595: CASE not found while executing CASE statement.
When looking a 的generated TYPE ”ST000...” for 的OBJECT, it contains a FLOAT(126):
how possible if 的CASE在ODCITableDescribe将其定义为DBMS_TYPE.TYPECODE_NUMBER... ????
人们可以认为只需添加一个“WHEN 4”在的various CASE在Describe, Prepare, Fetch...
Well first在Describe it never returns 4 but 2 for NUMBER of which FLOAT is a subtype,
then在Prepare if you add a WHEN 4和call dbms_sql.define_column用一个“CAST(NULL as NUMBER)”
it pass this step but you still get a problem在Fetch:
in 的”WHEN 4” you may add try to do a outset.setnumber,又提出了一个ERR:
ORA-22626, ORA-06512 ”Type Mismatch while constructing or accessing OCIAnyData
Cause: Type supplied is not matching 的type of 的AnyData”.
So except rewriting 的queries (views, ...) to CAST AS NUMBER all 的met FLOAT...
(I don't control 的data model generated by a 4G...)
我还没有找到任何解决办法。
有什么想法吗?
而FLOAT(正确) 检测为NUMBER在ODCITabeDecribePivotImpl的实现:CASE desc_tab(i).col_type返回2...
的CASE type_code在ODCITableStart返回4!
(and 4 is not documented anywhere as far as I was able to search在的doc...).
And of course 的outside call fails with a ORA-06595: CASE not found while executing CASE statement.
When looking a 的generated TYPE ”ST000...” for 的OBJECT, it contains a FLOAT(126):
how possible if 的CASE在ODCITableDescribe将其定义为DBMS_TYPE.TYPECODE_NUMBER... ????
人们可以认为只需添加一个“WHEN 4”在的various CASE在Describe, Prepare, Fetch...
Well first在Describe it never returns 4 but 2 for NUMBER of which FLOAT is a subtype,
then在Prepare if you add a WHEN 4和call dbms_sql.define_column用一个“CAST(NULL as NUMBER)”
it pass this step but you still get a problem在Fetch:
in 的”WHEN 4” you may add try to do a outset.setnumber,又提出了一个ERR:
ORA-22626, ORA-06512 ”Type Mismatch while constructing or accessing OCIAnyData
Cause: Type supplied is not matching 的type of 的AnyData”.
So except rewriting 的queries (views, ...) to CAST AS NUMBER all 的met FLOAT...
(I don't control 的data model generated by a 4G...)
我还没有找到任何解决办法。
有什么想法吗?