[ https://issues.apache.org/jira/browse/CARBONDATA-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15528413#comment-15528413 ] ASF GitHub Bot commented on CARBONDATA-280: ------------------------------------------- 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 <[hidden email]> Date: 2016-09-28T04:50:01Z Fix the bug that when table properties is repeated it only set the last one ---- > when table properties is repeated it only set the last one > ----------------------------------------------------------- > > Key: CARBONDATA-280 > URL: https://issues.apache.org/jira/browse/CARBONDATA-280 > Project: CarbonData > Issue Type: Bug > Components: sql > Affects Versions: 0.1.1-incubating > Reporter: zhangshunyu > Assignee: zhangshunyu > Priority: Minor > Fix For: 0.2.0-incubating > > > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332) |
Free forum by Nabble | Edit this page |