[
https://issues.apache.org/jira/browse/CALCITE-3533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17144878#comment-17144878
]
Charles Givre commented on CALCITE-3533:
----------------------------------------
I encountered this as well when someone was trying to query an Oracle database
that had a non-JDBC column. IMHO, it would be nice if Calcite could return a
default type or something other than an exception.
> Map non-jdbc data types to ANY in JdbcSchema
> --------------------------------------------
>
> Key: CALCITE-3533
> URL: https://issues.apache.org/jira/browse/CALCITE-3533
> Project: Calcite
> Issue Type: Bug
> Reporter: Vova Vysotskyi
> Priority: Major
>
> jdbc adapter fails with {{IllegalArgumentException}} when the table has
> non-jdbc data type.
> For example, MS SQL supports non-jdbc datetimeoffset data type, and
> {{JdbcSchema.getRelDataType()}} calls avatica's {{SqlType.valueOf(dataType)}}
> when constructing {{RelProtoDataType}} which throws
> {{IllegalArgumentException}} because this type wasn't mapped to {{SqlType}}.
> We should map such types to {{SqlTypeName.ANY}} type in {{JdbcSchema}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)