[ 
https://issues.apache.org/jira/browse/CASSANDRA-20161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922806#comment-17922806
 ] 

Stefan Miklosovic commented on CASSANDRA-20161:
-----------------------------------------------

there is
{noformat}
nodetool getendpoints ks tb a {noformat}
which eventually calls 'StorageService.partitionKeyToBytes' which uses 
`metadata.partitionKeyType.fromString(key)`.

I know that we need to specify keys also when "denylisting partitions". If you 
check the docs about that, we can insert stuff like this there
{code:java}
INSERT INTO system_distributed.denylisted_partitions (ks_name, table_name, 
partition_key) VALUES ('ks', 'table1', 'k11:k21') {code}
Check "k11:k21" - that is composite partition key.

I would expect this would behave same way so we could do 

{code}
select * from system_views.primary_ids where keyspace_name = 'ks' and 
table_name = 'tb3' and key = 'a:b';
{code}

and this would just match partition key of values "a" and the second partition 
key of value "b".

I tried to do this but I have not been successful yet.

> Virtual table to query partition keys in a table
> ------------------------------------------------
>
>                 Key: CASSANDRA-20161
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20161
>             Project: Apache Cassandra
>          Issue Type: New Feature
>          Components: Feature/Virtual Tables
>            Reporter: Chris Lohfink
>            Assignee: Chris Lohfink
>            Priority: Low
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Introduce a new virtual table, {{{}PrimaryIdTable{}}}, to allow users to 
> query partition keys and related metadata for a specific table within a 
> keyspace. This feature provides insights into SSTable-level details, such as 
> token values, size estimates, and SSTable counts, without requiring expensive 
> disk-based operations.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to