Syntax for Update of complex datatypes

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Syntax for Update of complex datatypes

geetikagupta
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/