use of org.apache.hive.service.rpc.thrift.TDownloadDataReq in project hive by apache.
the class ThriftCLIServiceClient method downloadData.
@Override
public OperationHandle downloadData(SessionHandle sessionHandle, String tableName, String query, String format, Map<String, String> options) throws HiveSQLException {
try {
TDownloadDataReq req = new TDownloadDataReq(sessionHandle.toTSessionHandle());
req.setTableName(tableName);
req.setQuery(query);
req.setFormat(format);
req.setDownloadOptions(options);
TDownloadDataResp resp = cliService.DownloadData(req);
checkStatus(resp.getStatus());
TProtocolVersion protocol = sessionHandle.getProtocolVersion();
return new OperationHandle(resp.getOperationHandle(), protocol);
} catch (TException e) {
throw new HiveSQLException(e);
}
}
Aggregations