v.18.16New Feature
Added Key Indicator Columns to system.columns Table
Added theis_in_partition_key,is_in_sorting_key,is_in_primary_key, andis_in_sampling_keycolumns to thesystem.columnstable. #3609
Why it matters
These new columns provide detailed metadata about each column's role in the table structure, indicating whether a column is part of the partition key, sorting key, primary key, or sampling key. This enhances visibility and helps users better understand and optimize their table schemas.How to use it
Query thesystem.columns table to inspect the new boolean columns is_in_partition_key, is_in_sorting_key, is_in_primary_key, and is_in_sampling_key to check if a specific column participates in the corresponding key. For example:SELECT name, is_in_partition_key, is_in_sorting_key, is_in_primary_key, is_in_sampling_key
FROM system.columns
WHERE table = 'your_table_name'No additional configuration is required to use this feature.