Primary key on multiple columns

Let’s consider the following example
CREATE TABLE X_TEST (
A INT,
B INT,
C TEXT,
PRIMARY KEY (A,B),
SHARD KEY (A) USING CLUSTERED COLUMNSTORE);

I check the metadata for columns in the columns table
SELECT COLUMN_NAME, ORDINAL_POSITION, DATA_TYPE, COLUMN_KEY
FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ‘X_TEST’;

and see that the second column is not marked as part of primary key
COLUMN_NAME, ORDINAL_POSITION, DATA_TYPE, COLUMN_KEY
A 1 INT PRI
B 2 INT
C 3 TEXT

select @@memsql_version
7.5.11

Why the second column is not marked as PRI in the data dictionary table?

Hi,

Yes, we have an odd legacy behavior for what we label PRI in information_schema.columns (which predates our support for primary keys on columnstore tables). We label
the clustered columnstore key columns as PRI - which is why only A is showing as PRI in your example. We are tracking a task internally to change this.

-Adam