Karan980 opened a new pull request #4075:
URL: https://github.com/apache/carbondata/pull/4075
### Why is this PR needed?
When a SDK written segment on which read is already performed once, is added
through alter table add segment query to a carbon table, then select * query
fails after adding it.
In SDK segments the segmentId is the timestamp of the segment. When the SDK
segment is read before adding, its indexes are stored in cache. Cache is a map
of indexFilePath to Indexes. Now when the same segment is added to carbon table
its segment ID is no longer the timestamp but the indexFilePath remains same as
it is added externally. Now when we run select * query we get the indexes from
the cache, but it is unable to map it to segment, because segment id changes.
### What changes were proposed in this PR?
Also added segment Id to the key of cache map to make it more unique.
### Does this PR introduce any user interface change?
-No
### Is any new testcase added?
- Yes
----------------------------------------------------------------
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:
[email protected]