MojoJojo
MojoJojo

Reputation: 4242

Phoenix table split by composite row key

Is it possible to specify region split values when creating a table in Phoenix with composite primary key? For instance:

CREATE TABLE TEST_TABLE(A VARCHAR, B VARCHAR CONSTRAINT PRIMARY KEY (A,B)) SPLIT ON (1,2)

The above specifies the value for splitting on key A. How do include a value for B i.e. I want to split using keys. Is it even possible?

Upvotes: 0

Views: 212

Answers (1)

potatochip
potatochip

Reputation: 146

Appears to be undocumented, but it works if you nest the split points.

CREATE TABLE TEST_TABLE(A VARCHAR, B VARCHAR CONSTRAINT PRIMARY KEY (A,B)) 
SPLIT ON (('1', '2'), ('3', '4'))

Upvotes: 0

Related Questions