Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/965#discussion_r55160199
--- Diff: tajo-core/src/main/java/org/apache/tajo/querymaster/Query.java ---
@@ -653,12 +679,19 @@ public void execute(QueryMaster.QueryMasterContext
context, QueryContext queryCo
TableDesc resultTableDesc =
new TableDesc(
query.getId().toString(),
- lastStage.getOutSchema(),
+ lastStage.getOutSchema(),
meta,
finalOutputDir.toUri());
resultTableDesc.setExternal(true);
- stats.setNumBytes(getTableVolume(query.systemConf,
finalOutputDir));
+ if (query.hasUnionPlan()) {
+ TableStats aggregated =
query.aggregateTableStatsOfTerminalBlock();
+ stats.setNumRows(aggregated.getNumRows());
+ stats.setNumBytes(aggregated.getNumBytes());
--- End diff --
Copying numRows and numBytes is insufficient. ```aggretated``` should be
set as the stats of ```resultTableDesc```.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---