Github user kevinjmh commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2879#discussion_r229285339
--- Diff:
processing/src/main/java/org/apache/carbondata/processing/loading/steps/CarbonRowDataWriterProcessorStepImpl.java
---
@@ -212,7 +212,11 @@ private void finish(CarbonFactHandler dataHandler, int
iteratorIndex) {
try {
processingComplete(dataHandler);
} catch (CarbonDataLoadingException e) {
- exception = new CarbonDataWriterException(e.getMessage(), e);
+ // only assign when exception is null
+ // else it will erase original root cause
+ if (null == exception) {
--- End diff --
not for the statistics. better to read the whole method. It has two stages:
finish the handler and close the handler. the exception could be assigned in
either stage.
---