[
https://issues.apache.org/jira/browse/CALCITE-2219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16404296#comment-16404296
]
ASF GitHub Bot commented on CALCITE-2219:
-----------------------------------------
Github user risdenk commented on a diff in the pull request:
https://github.com/apache/calcite-avatica/pull/33#discussion_r175317619
--- Diff:
core/src/main/java/org/apache/calcite/avatica/AvaticaConnection.java ---
@@ -276,14 +298,17 @@ public CallableStatement prepareCall(
}
public Map<String, Class<?>> getTypeMap() throws SQLException {
- throw HELPER.unsupported();
+ checkOpen();
+ // Always return an empty map since custom types is not supported
+ return new HashMap<>();
--- End diff --
Would it be more correct to return `SQLFeatureNotSupportedException`? I
don't think it matters either way but below is from the javadoc for Connection.
> SQLFeatureNotSupportedException - if the JDBC driver does not support
this method
> Avatica Connection/Statement/ResultSet don't throw if resource is closed
> ------------------------------------------------------------------------
>
> Key: CALCITE-2219
> URL: https://issues.apache.org/jira/browse/CALCITE-2219
> Project: Calcite
> Issue Type: Bug
> Components: avatica
> Reporter: Laurent Goujon
> Assignee: Laurent Goujon
> Priority: Major
>
> According to JDBC spec/Javadoc, almost all methods of
> {{Connection}}/{{Statement}}/{{PreparedStatement}}/{{ResultSet}} should throw
> an exception if resource is closed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)