You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by geetikagupta <ge...@knoldus.in> on 2017/09/07 06:30:01 UTC

Syntax for Update of complex datatypes

Hi Community,

I was working on complex datatypes in carbondata but I could not find the
correct syntax for updating an array.

Here are the commands:

CREATE TABLE carbon_table(shortField SHORT, intField INT, bigintField LONG,
doubleField DOUBLE, stringField STRING, timestampField TIMESTAMP,
decimalField DECIMAL(18,2), dateField DATE, charField CHAR(5), floatField
FLOAT, complexData ARRAY<STRING>)STORED BY 'carbondata'
TBLPROPERTIES('SORT_COLUMNS'='', 'DICTIONARY_INCLUDE'='dateField,
charField');

Update carbon_table set(complexData) = ('[xyz,abc]') where shortField = 5;

The above command updates only the first element of the array and other
elements are set as null.

So what would be the command to update all the elements of an array or a
struct ?

-- 
Regards,
Geetika Gupta



--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/