GitHub user Zhangshunyu opened a pull request:
https://github.com/apache/incubator-carbondata/pull/204
[CARBONDATA-280]Fix the bug that when table properties is repeated it only
set the last one
## Why raise this pr?
When table properties is repeated it only set the last one, for example,
```
CREATE TABLE IF NOT EXISTS carbontable
(ID Int, date Timestamp, country String,
name String, phonetype String, serialname String, salary Int)
STORED BY 'carbondata'
TBLPROPERTIES(**'DICTIONARY_EXCLUDE'='country','DICTIONARY_INCLUDE'='ID',
'DICTIONARY_EXCLUDE'='phonetype', 'DICTIONARY_INCLUDE'='salary'**)
```
only salary is set to DICTIONARY_INCLUDE and only phonetype is set to
DICTIONARY_EXCLUDE.
## How to solve?
We should do restrict syntax check and if table properties is repeated,
throw an MalformedCarbonCommandException to tell the user that Table
properties is repeated, so that the user would not perform error operation.
## How to test?
Pass the exist test cases and the new test case for this bug.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Zhangshunyu/incubator-carbondata tbprop
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-carbondata/pull/204.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 #204
----
commit 3e0030e04bff9d11f87471684b4b7b7a8d8b6209
Author: Zhangshunyu <[email protected]>
Date: 2016-09-28T04:50:01Z
Fix the bug that when table properties is repeated it only set the last one
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---