String resultLocation = "";
if (result.getStoreFileLocation() != null){
resultLocation = result.getStoreFileLocation();
}
QueryHistory history = new QueryHistory();
history.setHql(input.getHql());
history.setUsername(input.getUsername());
history.setAddtime(new Date(input.getTimestamp()));
history.setFilename(resultLocation);
queryHistoryService.insertQueryHistory(history);
HiveQueryOutputBo bo = result.toHiveQueryOutputBo();
return bo;
}