Login  Register

Re: [discussion]When table properties is repeated it only set the last one

Posted by ravipesala on Sep 29, 2016; 2:00am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/discussion-When-table-properties-is-repeated-it-only-set-the-last-one-tp1539p1556.html

+1 for option 1

On Thu, 29 Sep 2016 02:52 Jihong Ma, <[hidden email]> wrote:

> Would prefer error out, vote for option 1.
>
> Jenny
>
> -----Original Message-----
> From: Zhangshunyu [mailto:[hidden email]]
> Sent: Wednesday, September 28, 2016 12:11 AM
> To: [hidden email]
> Subject: [discussion]When table properties is repeated it only set the
> last one
>
> 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')
>
> As we use map to store the properties, only salary is set to
> DICTIONARY_INCLUDE and only phonetype is set to DICTIONARY_EXCLUDE.
>
> I think we can fix this pbm in 2 way:
>
> 1. Do restrict syntax check: When tblProperty is repeated, throw an
> MalformedCarbonCommandException to tell the user that table properties is
> repeated, so that the user would not perform error operation.
> 2. Let the properties recombining, and set the table properties for all the
> specified columns.
>
> What's your opinion?
>
>
>
> --
> View this message in context:
> http://apache-carbondata-mailing-list-archive.1130556.n5.nabble.com/discussion-When-table-properties-is-repeated-it-only-set-the-last-one-tp1539.html
> Sent from the Apache CarbonData Mailing List archive mailing list archive
> at Nabble.com.
>