Github user ajantha-bhat commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/3003#discussion_r243770677
--- Diff:
processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
---
@@ -272,18 +272,44 @@ protected void commitCurrentFile(boolean
copyInCurrentThread) {
CarbonUtil.closeStreams(this.fileOutputStream, this.fileChannel);
if (!enableDirectlyWriteDataToStorePath) {
try {
- if (copyInCurrentThread) {
-
CarbonUtil.copyCarbonDataFileToCarbonStorePath(carbonDataFileTempPath,
- model.getCarbonDataDirectoryPath(), fileSizeInBytes);
+ if (currentFileSize == 0) {
FileFactory
.deleteFile(carbonDataFileTempPath,
FileFactory.getFileType(carbonDataFileTempPath));
+ if (blockIndexInfoList.size() > 0 &&
blockIndexInfoList.get(blockIndexInfoList.size() - 1)
--- End diff --
not same, paths are different.
Now moved into a method that takes path.
---