Skip to content

Commit

Permalink
Fix null (#3258)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumuwu authored Nov 20, 2024
1 parent 6c5d72e commit f8f951e
Showing 1 changed file with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -620,10 +620,26 @@ private void appendLoadQueryStats(Executor<SqlGen, TabularData, SqlPlan> executo
switch ((String) queryStats.get(QueryStatsLogicalPlanUtils.OPERATOR_TYPE_ALIAS))
{
case QueryStatsLogicalPlanUtils.EXTERNAL_SCAN_STAGE:
stats.put(StatisticName.INPUT_FILES_BYTES_SCANNED, queryStats.get(QueryStatsLogicalPlanUtils.EXTERNAL_BYTES_SCANNED_ALIAS));
Object externalScan = queryStats.get(QueryStatsLogicalPlanUtils.EXTERNAL_BYTES_SCANNED_ALIAS);
if (externalScan != null)
{
stats.put(StatisticName.INPUT_FILES_BYTES_SCANNED, externalScan);
}
else
{
stats.put(StatisticName.INPUT_FILES_BYTES_SCANNED, 0);
}
break;
case QueryStatsLogicalPlanUtils.INSERT_STAGE:
stats.put(StatisticName.INCOMING_RECORD_COUNT, queryStats.get(QueryStatsLogicalPlanUtils.INPUT_ROWS_ALIAS));
Object insert = queryStats.get(QueryStatsLogicalPlanUtils.INPUT_ROWS_ALIAS);
if (insert != null)
{
stats.put(StatisticName.INCOMING_RECORD_COUNT, insert);
}
else
{
stats.put(StatisticName.INCOMING_RECORD_COUNT, 0);
}
break;
}
});
Expand Down

0 comments on commit f8f951e

Please sign in to comment.