[GitHub] [carbondata] jackylk commented on a change in pull request #3355: [HOTFIX] Improve select query after Update/Delete operation.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] jackylk commented on a change in pull request #3355: [HOTFIX] Improve select query after Update/Delete operation.

GitBox
jackylk commented on a change in pull request #3355: [HOTFIX] Improve select query after Update/Delete operation.
URL: https://github.com/apache/carbondata/pull/3355#discussion_r313277452
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java
 ##########
 @@ -358,40 +333,40 @@ public boolean isBlockValid(String segName, String blockName) {
     return deleteFileList;
   }
 
-  private List<String> getFilePaths(CarbonFile blockDir, final String blockNameFromTuple,
+  private List<String> getFilePaths(String blockDir, final String blockNameFromTuple,
       final String extension, List<String> deleteFileList, final long deltaStartTimestamp,
       final long deltaEndTimeStamp) throws IOException {
-    if (null != blockDir.getParentFile()) {
-      CarbonFile[] files = blockDir.getParentFile().listFiles(new CarbonFileFilter() {
-
-        @Override
-        public boolean accept(CarbonFile pathName) {
+    List<String> deltaList = segmentDeleteDeltaListMap.get(blockDir);
+    if (deltaList == null) {
+      CarbonFile[] files = FileFactory.getCarbonFile(blockDir).listFiles(new CarbonFileFilter() {
 
 Review comment:
   Maybe we can consider adding the delta file list in SegmentUpdateDetails and save it when committing the UD operation. Then listFiles can be avoiding in query.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services