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

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'

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 ?

Geetika Gupta

Sent from: