Github user gvramana commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1984#discussion_r169399178
--- Diff:
core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMapFactory.java
---
@@ -185,26 +212,27 @@ public void clear(String segmentId) {
@Override
public void clear() {
for (String segmentId : segmentMap.keySet().toArray(new
String[segmentMap.size()])) {
- clear(segmentId);
+ clear(new Segment(segmentId, null));
}
}
@Override
public List<DataMap> getDataMaps(DataMapDistributable distributable)
throws IOException {
BlockletDataMapDistributable mapDistributable =
(BlockletDataMapDistributable) distributable;
List<TableBlockIndexUniqueIdentifier> identifiers = new ArrayList<>();
- if
(mapDistributable.getFilePath().endsWith(CarbonTablePath.INDEX_FILE_EXT)) {
- identifiers.add(new TableBlockIndexUniqueIdentifier(identifier,
distributable.getSegmentId(),
- mapDistributable.getFilePath()));
- } else if
(mapDistributable.getFilePath().endsWith(CarbonTablePath.MERGE_INDEX_FILE_EXT))
{
+ String indexPath = mapDistributable.getFilePath();
+ if (indexPath.endsWith(CarbonTablePath.INDEX_FILE_EXT)) {
+ String parent = indexPath.substring(0, indexPath.lastIndexOf("/"));
--- End diff --
Need to use filedelimiter, as it requires to work on windows path
---