public static FetchOrientation getFetchOrientation(TFetchOrientation tFetchOrientation) { for (FetchOrientation fetchOrientation : values()) { if (tFetchOrientation.equals(fetchOrientation.toTFetchOrientation())) { return fetchOrientation; } } // TODO: Should this really default to FETCH_NEXT? return FETCH_NEXT; }
@Override public RowSet fetchResults(OperationHandle opHandle, FetchOrientation orientation, long maxRows, FetchType fetchType) throws HiveSQLException { try { TFetchResultsReq req = new TFetchResultsReq(); req.setOperationHandle(opHandle.toTOperationHandle()); req.setOrientation(orientation.toTFetchOrientation()); req.setMaxRows(maxRows); req.setFetchType(fetchType.toTFetchType()); TFetchResultsResp resp = cliService.FetchResults(req); checkStatus(resp.getStatus()); return RowSetFactory.create(resp.getResults(), opHandle.getProtocolVersion()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
public static FetchOrientation getFetchOrientation(TFetchOrientation tFetchOrientation) { for (FetchOrientation fetchOrientation : values()) { if (tFetchOrientation.equals(fetchOrientation.toTFetchOrientation())) { return fetchOrientation; } } // TODO: Should this really default to FETCH_NEXT? return FETCH_NEXT; }
public static FetchOrientation getFetchOrientation(TFetchOrientation tFetchOrientation) { for (FetchOrientation fetchOrientation : values()) { if (tFetchOrientation.equals(fetchOrientation.toTFetchOrientation())) { return fetchOrientation; } } // TODO: Should this really default to FETCH_NEXT? return FETCH_NEXT; }
public static FetchOrientation getFetchOrientation(TFetchOrientation tFetchOrientation) { for (FetchOrientation fetchOrientation : values()) { if (tFetchOrientation.equals(fetchOrientation.toTFetchOrientation())) { return fetchOrientation; } } // TODO: Should this really default to FETCH_NEXT? return FETCH_NEXT; }
public static FetchOrientation getFetchOrientation(TFetchOrientation tFetchOrientation) { for (FetchOrientation fetchOrientation : values()) { if (tFetchOrientation.equals(fetchOrientation.toTFetchOrientation())) { return fetchOrientation; } } // TODO: Should this really default to FETCH_NEXT? return FETCH_NEXT; }
public static FetchOrientation getFetchOrientation(TFetchOrientation tFetchOrientation) { for (FetchOrientation fetchOrientation : values()) { if (tFetchOrientation.equals(fetchOrientation.toTFetchOrientation())) { return fetchOrientation; } } // TODO: Should this really default to FETCH_NEXT? return FETCH_NEXT; }
@Override public RowSet fetchResults(OperationHandle opHandle, FetchOrientation orientation, long maxRows, FetchType fetchType) throws HiveSQLException { try { TFetchResultsReq req = new TFetchResultsReq(); req.setOperationHandle(opHandle.toTOperationHandle()); req.setOrientation(orientation.toTFetchOrientation()); req.setMaxRows(maxRows); req.setFetchType(fetchType.toTFetchType()); TFetchResultsResp resp = cliService.FetchResults(req); checkStatus(resp.getStatus()); return RowSetFactory.create(resp.getResults(), opHandle.getProtocolVersion()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public RowSet fetchResults(OperationHandle opHandle, FetchOrientation orientation, long maxRows, FetchType fetchType) throws HiveSQLException { try { TFetchResultsReq req = new TFetchResultsReq(); req.setOperationHandle(opHandle.toTOperationHandle()); req.setOrientation(orientation.toTFetchOrientation()); req.setMaxRows(maxRows); req.setFetchType(fetchType.toTFetchType()); TFetchResultsResp resp = cliService.FetchResults(req); checkStatus(resp.getStatus()); return RowSetFactory.create(resp.getResults(), opHandle.getProtocolVersion()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public RowSet fetchResults(OperationHandle opHandle, FetchOrientation orientation, long maxRows, FetchType fetchType) throws HiveSQLException { try { TFetchResultsReq req = new TFetchResultsReq(); req.setOperationHandle(opHandle.toTOperationHandle()); req.setOrientation(orientation.toTFetchOrientation()); req.setMaxRows(maxRows); req.setFetchType(fetchType.toTFetchType()); TFetchResultsResp resp = cliService.FetchResults(req); checkStatus(resp.getStatus()); return RowSetFactory.create(resp.getResults(), opHandle.getProtocolVersion()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public RowSet fetchResults(OperationHandle opHandle, FetchOrientation orientation, long maxRows, FetchType fetchType) throws HiveSQLException { try { TFetchResultsReq req = new TFetchResultsReq(); req.setOperationHandle(opHandle.toTOperationHandle()); req.setOrientation(orientation.toTFetchOrientation()); req.setMaxRows(maxRows); req.setFetchType(fetchType.toTFetchType()); TFetchResultsResp resp = cliService.FetchResults(req); checkStatus(resp.getStatus()); return RowSetFactory.create(resp.getResults(), opHandle.getProtocolVersion()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
@Override public RowSet fetchResults(OperationHandle opHandle, FetchOrientation orientation, long maxRows, FetchType fetchType) throws HiveSQLException { try { TFetchResultsReq req = new TFetchResultsReq(); req.setOperationHandle(opHandle.toTOperationHandle()); req.setOrientation(orientation.toTFetchOrientation()); req.setMaxRows(maxRows); req.setFetchType(fetchType.toTFetchType()); TFetchResultsResp resp = cliService.FetchResults(req); checkStatus(resp.getStatus()); return RowSetFactory.create(resp.getResults(), opHandle.getProtocolVersion()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }