[ 
https://issues.apache.org/jira/browse/CALCITE-2322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16498451#comment-16498451
 ] 

ASF GitHub Bot commented on CALCITE-2322:
-----------------------------------------

Github user kminder commented on a diff in the pull request:

    https://github.com/apache/calcite-avatica/pull/49#discussion_r192495397
  
    --- Diff: 
core/src/main/java/org/apache/calcite/avatica/AvaticaStatement.java ---
    @@ -108,6 +109,7 @@ protected AvaticaStatement(AvaticaConnection connection,
         this.resultSetType = resultSetType;
         this.resultSetConcurrency = resultSetConcurrency;
         this.resultSetHoldability = resultSetHoldability;
    +    this.fetchSize = connection.config().fetchSize(); // Default to 
connection config fetch size.
    --- End diff --
    
    I'm not clear on what you are suggesting here.  Are you suggesting this be 
defaulted to 0 and have the real value resolved in getFetchSize()?  I went with 
the approach I did because a setting made via the connection url is accessed 
through the connection object.  The connection reference isn't stored within 
AvaticaStatement so the connection value needs to be propagated down somehow.  
You are correct that if the value is explicitly set to 0 either via url param 
or via Statement.setFetchSize or ResultSet.setFetchSize I have no idea what 
will happen.  All I can say is that I didn't change that behavior with this 
change.  It will do whatever is would have done before.


> Add fetch size support to connection url and JDBC statement
> -----------------------------------------------------------
>
>                 Key: CALCITE-2322
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2322
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.11.0
>            Reporter: Kevin Minder
>            Assignee: Julian Hyde
>            Priority: Major
>
> Currently the remote driver defaults to hard coded fetch size of 100 rows.  
> When a connection is operating in HTTP mode having such a small fetch size 
> can add enormous overhead.  This is especially true if TLS connections are 
> used and made worse if each connection flows throw multiple proxies.  
> Consider that 100K rows returned 100 rows at a time will make 1K HTTP POST 
> requests.  One might say that nobody should ever do that but some tools like 
> Spotfire may end up doing this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to