public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException { TGetTablesResp getTableResp; if (schemaPattern == null) { // if schemaPattern is null it means that the schemaPattern value should not be used to narrow the search schemaPattern = "%"; } TGetTablesReq getTableReq = new TGetTablesReq(sessHandle); getTableReq.setTableName(tableNamePattern); // TODO: need to set catalog parameter if (types != null) { getTableReq.setTableTypes(Arrays.asList(types)); } if (schemaPattern != null) { getTableReq.setSchemaName(schemaPattern); } try { getTableResp = client.GetTables(getTableReq); } catch (TException e) { throw new SQLException(e.getMessage(), "08S01", e); } Utils.verifySuccess(getTableResp.getStatus()); return new HiveQueryResultSet.Builder(connection) .setClient(client) .setSessionHandle(sessHandle) .setStmtHandle(getTableResp.getOperationHandle()) .build(); }
public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException { TGetTablesResp getTableResp; if (schemaPattern == null) { // if schemaPattern is null it means that the schemaPattern value should not be used to narrow the search schemaPattern = "%"; } TGetTablesReq getTableReq = new TGetTablesReq(sessHandle); getTableReq.setTableName(tableNamePattern); // TODO: need to set catalog parameter if (types != null) { getTableReq.setTableTypes(Arrays.asList(types)); } if (schemaPattern != null) { getTableReq.setSchemaName(schemaPattern); } try { getTableResp = client.GetTables(getTableReq); } catch (TException e) { throw new SQLException(e.getMessage(), "08S01", e); } Utils.verifySuccess(getTableResp.getStatus()); return new HiveQueryResultSet.Builder(connection) .setClient(client) .setSessionHandle(sessHandle) .setStmtHandle(getTableResp.getOperationHandle()) .build(); }
@Override public OperationHandle getTables(SessionHandle sessionHandle, String catalogName, String schemaName, String tableName, List<String> tableTypes) throws HiveSQLException { try { TGetTablesReq req = new TGetTablesReq(sessionHandle.toTSessionHandle()); req.setTableName(tableName); req.setTableTypes(tableTypes); req.setSchemaName(schemaName); TGetTablesResp resp = cliService.GetTables(req); checkStatus(resp.getStatus()); TProtocolVersion protocol = sessionHandle.getProtocolVersion(); return new OperationHandle(resp.getOperationHandle(), protocol); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public OperationHandle getTables(SessionHandle sessionHandle, String catalogName, String schemaName, String tableName, List<String> tableTypes) throws HiveSQLException { try { TGetTablesReq req = new TGetTablesReq(sessionHandle.toTSessionHandle()); req.setTableName(tableName); req.setTableTypes(tableTypes); req.setSchemaName(schemaName); TGetTablesResp resp = cliService.GetTables(req); checkStatus(resp.getStatus()); TProtocolVersion protocol = sessionHandle.getProtocolVersion(); return new OperationHandle(resp.getOperationHandle(), protocol); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public OperationHandle getTables(SessionHandle sessionHandle, String catalogName, String schemaName, String tableName, List<String> tableTypes) throws HiveSQLException { try { TGetTablesReq req = new TGetTablesReq(sessionHandle.toTSessionHandle()); req.setTableName(tableName); req.setTableTypes(tableTypes); req.setSchemaName(schemaName); TGetTablesResp resp = cliService.GetTables(req); checkStatus(resp.getStatus()); TProtocolVersion protocol = sessionHandle.getProtocolVersion(); return new OperationHandle(resp.getOperationHandle(), protocol); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public OperationHandle getTables(SessionHandle sessionHandle, String catalogName, String schemaName, String tableName, List<String> tableTypes) throws HiveSQLException { try { TGetTablesReq req = new TGetTablesReq(sessionHandle.toTSessionHandle()); req.setTableName(tableName); req.setTableTypes(tableTypes); req.setSchemaName(schemaName); TGetTablesResp resp = cliService.GetTables(req); checkStatus(resp.getStatus()); TProtocolVersion protocol = sessionHandle.getProtocolVersion(); return new OperationHandle(resp.getOperationHandle(), protocol); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
public GetTables_result getResult(I iface, GetTables_args args) throws org.apache.thrift.TException { GetTables_result result = new GetTables_result(); result.success = iface.GetTables(args.req); return result; } }
public GetTables_result getResult(I iface, GetTables_args args) throws org.apache.thrift.TException { GetTables_result result = new GetTables_result(); result.success = iface.GetTables(args.req); return result; } }
public GetTables_result getResult(I iface, GetTables_args args) throws org.apache.thrift.TException { GetTables_result result = new GetTables_result(); result.success = iface.GetTables(args.req); return result; } }
public GetTables_result getResult(I iface, GetTables_args args) throws org.apache.thrift.TException { GetTables_result result = new GetTables_result(); result.success = iface.GetTables(args.req); return result; } }