GitHub user manishgupta88 opened a pull request:
https://github.com/apache/carbondata/pull/2510
[WIP] [CARBONDATA-2649] Fixed arrayIndexOutOfBoundException while loading
Blocklet DataMap after alter add column operation
Things done as part of this PR
1. Fixed arrayIndexOutOfBoundException while loading Blocklet DataMap after
alter add column operation
**Problem:**
Array Index out of bound exception was thrown after alter add column
operation.
**Analysis:**
After alter add column operation if COLUMN_META_CACHE is set on the newly
added columns, then on executing select query on the data loaded before alter
operation threw exception. This was because minMaxCache caching columns were
fetched irrespective of the segmentProperties. Data loaded before alter add
column operation will not have the newly added columns in its columnSchemaList
and hence can throw exception if non existent column are not removed from
min/max column cache.
**Solution:**
Fetch the min/max cache columns based on segmentProperties
- [ ] Any interfaces changed?
No
- [ ] Any backward compatibility impacted?
No
- [ ] Document update required?
No
- [ ] Testing done
Added test case
- [ ] For large changes, please consider breaking it into sub-tasks under
an umbrella JIRA.
NA
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/manishgupta88/carbondata
index_load_failure_after_alter_add_column
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/carbondata/pull/2510.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2510
----
commit 061782978192f32d131c7b629bbc5111382e5273
Author: m00258959 <manish.gupta@...>
Date: 2018-07-16T06:56:41Z
Fixed arrayIndexOutOfBoundException while loading Blocklet DataMap after
alter add column operation
----
---