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

ASF GitHub Bot commented on TAJO-751:
-------------------------------------

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

    https://github.com/apache/tajo/pull/459#discussion_r28492503
  
    --- Diff: 
tajo-client/src/main/java/org/apache/tajo/jdbc/WaitingResultSet.java ---
    @@ -0,0 +1,71 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.tajo.jdbc;
    +
    +import com.google.protobuf.ServiceException;
    +import org.apache.tajo.QueryId;
    +import org.apache.tajo.TajoProtos;
    +import org.apache.tajo.catalog.CatalogUtil;
    +import org.apache.tajo.catalog.Schema;
    +import org.apache.tajo.catalog.TableDesc;
    +import org.apache.tajo.client.QueryClient;
    +import org.apache.tajo.client.QueryStatus;
    +import org.apache.tajo.client.TajoClientUtil;
    +import org.apache.tajo.ipc.ClientProtos;
    +
    +import java.sql.SQLException;
    +
    +/**
    + * Blocks on schema retrieval if it's not ready
    + */
    +public class WaitingResultSet extends FetchResultSet {
    +
    +  public WaitingResultSet(QueryClient tajoClient, QueryId queryId, int 
fetchRowNum)
    +      throws SQLException {
    +    super(tajoClient, null, queryId, fetchRowNum);
    +  }
    +
    +  @Override
    +  public boolean next() throws SQLException {
    +    getSchema();
    +    return super.next();
    +  }
    +
    +  @Override
    +  protected Schema getSchema() throws SQLException {
    +    return schema == null ? schema = waitOnResult() : schema;
    --- End diff --
    
    Could you explain why you check schema?


> JDBC driver should support cancel() method.
> -------------------------------------------
>
>                 Key: TAJO-751
>                 URL: https://issues.apache.org/jira/browse/TAJO-751
>             Project: Tajo
>          Issue Type: Improvement
>            Reporter: Hyoungjun Kim
>            Assignee: Navis
>            Priority: Minor
>
> Some OLAP or ETL tool call JDBC's cancel() function when a query is too late. 
> So Tajo's JDBC should support cancel() function in Statement or 
> PreparedStatement class.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to