[
https://issues.apache.org/jira/browse/CALCITE-2219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16404294#comment-16404294
]
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_r175318021
--- Diff:
core/src/main/java/org/apache/calcite/avatica/AvaticaStatement.java ---
@@ -268,18 +278,20 @@ protected void close_() {
}
public int getMaxFieldSize() throws SQLException {
- throw connection.HELPER.unsupported();
+ checkOpen();
+ return 0;
}
public void setMaxFieldSize(int max) throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
--- End diff --
Would it make sense to make this be a noop instead of returning unsupported
now that `getMaxFieldSize()` is set to always return 0.
> 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)