public void execute(QueryMaster.QueryMasterContext context, QueryContext queryContext,
Query query, ExecutionBlockId finalExecBlockId,
Path finalOutputDir) throws Exception {
SubQuery lastStage = query.getSubQuery(finalExecBlockId);
TableMeta meta = lastStage.getTableMeta();
TableStats stats = lastStage.getResultStats();
TableDesc resultTableDesc =
new TableDesc(
query.getId().toString(),
lastStage.getSchema(),
meta,
finalOutputDir);
resultTableDesc.setExternal(true);
stats.setNumBytes(getTableVolume(query.systemConf, finalOutputDir));
resultTableDesc.setStats(stats);
query.setResultDesc(resultTableDesc);
}