GitHub user ajantha-bhat opened a pull request:
https://github.com/apache/carbondata/pull/2705
[CARBONDATA-2926] fixed ArrayIndexOutOfBoundException with varchar columns
and empty sort_columns
problem:
ArrayIndexOutOfBoundException if varchar column is present before
dictionary columns along with empty sort_columns.
root cause:
CarbonFactDataHandlerColumnar.isVarcharColumnFull() method uses
model.getVarcharDimIdxInNoDict()
and index of varchar column in no dictonary array became negative.
currently index was calculated based on ordinal-number of dictionary
columns. This can go negative in no_sort column case,
solution:
**take the varchar dimension index from no dictionary array from at runtime
based on schema.**
**Also hotfix: removed number validation in table properties of sdk, now we
support 7 properties**
Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:
- [ ] Any interfaces changed? NA
- [ ] Any backward compatibility impacted? NA
- [ ] Document update required? NA
- [ ] Testing done
updated UT
- [ ] 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/ajantha-bhat/carbondata master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/carbondata/pull/2705.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 #2705
----
commit 38b6e13d5e1b0362756301383f184505c615edd0
Author: ajantha-bhat <ajanthabhat@...>
Date: 2018-09-10T17:38:15Z
[CARBONDATA-2926] fixed ArrayIndexOutOfBoundException if varchar column is
present before dictionary columns along with empty sort_columns.
----
---