Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2879#discussion_r229194409
--- 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) {
+ exception = new CarbonDataWriterException(e.getMessage(), e);
--- End diff --
```suggestion
exception = new CarbonDataWriterException(e);
```
---