drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adeneche <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-3566: Fix: PreparedStatement.executeQuer...
Date Thu, 03 Sep 2015 22:53:26 GMT
Github user adeneche commented on a diff in the pull request:

    https://github.com/apache/drill/pull/143#discussion_r38706036
  
    --- Diff: exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillResultSetImpl.java ---
    @@ -87,12 +88,12 @@
       boolean hasPendingCancelationNotification;
     
     
    -  DrillResultSetImpl(DrillStatementImpl statement, AvaticaPrepareResult prepareResult,
    +  DrillResultSetImpl(AvaticaStatement statement, AvaticaPrepareResult prepareResult,
                          ResultSetMetaData resultSetMetaData, TimeZone timeZone) {
         super(statement, prepareResult, resultSetMetaData, timeZone);
    -    this.statement = statement;
    +    connection = (DrillConnectionImpl) statement.getConnection();
         final int batchQueueThrottlingThreshold =
    -        this.getStatement().getConnection().getClient().getConfig().getInt(
    +        connection.getClient().getConfig().getInt(
    --- End diff --
    
    if you move the line `this.client = client;` before this line you should be able to reuse
`this.client` instead of calling `connection.getClient()`
    You can also reuse `this.connection` instead of creating another instance `c` below


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message