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

David Capwell commented on CASSANDRA-14872:
-------------------------------------------

vtables work

{code}
cqlsh> desc keyspaces;

system_virtual_schema  system_schema  system_views  system_distributed
bar                    system_auth    system        system_traces

cqlsh> describe system_views;

/*
Warning: Keyspace system_views is a virtual keyspace and cannot be recreated 
with CQL.
Structure, for reference:*/
// VIRTUAL KEYSPACE system_views;

/*
Warning: Table system_views.sstable_tasks is a virtual table and cannot be 
recreated with CQL.
Structure, for reference:
VIRTUAL TABLE system_views.sstable_tasks (
    keyspace_name text,
    table_name text,
    task_id uuid,
    kind text,
    progress bigint,
    total bigint,
    unit text,
    PRIMARY KEY (keyspace_name, table_name, task_id)
) WITH CLUSTERING ORDER BY (table_name ASC, task_id ASC)
    AND comment = 'current sstable tasks';
*/
...
cqlsh> use system_views;
cqlsh:system_views> desc tables;

sstable_tasks       clients                   coordinator_write_latency
disk_usage          local_write_latency       tombstones_per_read
thread_pools        internode_outbound        settings
local_scan_latency  coordinator_scan_latency  max_partition_size
internode_inbound   coordinator_read_latency  caches
local_read_latency  rows_per_read
cqlsh:system_views> desc rows_per_read;

/*
Warning: Table system_views.rows_per_read is a virtual table and cannot be 
recreated with CQL.
Structure, for reference:
VIRTUAL TABLE system_views.rows_per_read (
    keyspace_name text,
    table_name text,
    "50th" double,
    "99th" double,
    count bigint,
    max double,
    PRIMARY KEY ((keyspace_name, table_name))
) WITH comment = '';
*/
{code}

> Update to version of python driver and update cqlsh to use driver metadata 
> for virtual tables
> ---------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-14872
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14872
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tool/cqlsh
>            Reporter: Andy Tolbert
>            Assignee: Dinesh Joshi
>            Priority: Normal
>             Fix For: 4.0, 4.0-alpha
>
>
> When virtual tables were implemented ([CASSANDRA-7622]), cqlsh.py was updated 
> to parse virtual keyspace metadata by making queries to the 
> {{system_virtual_schema}} table and included a TODO:
> {code:python}
> # TODO remove after virtual tables are added to connection metadata
> {code}
> Since python driver 3.15.0 (released in August), the driver now parses 
> virtual keyspace metadata.   It would be good to update the bundled python 
> driver and simplify cqlsh code to utilize its capability to parse virtual 
> tables.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to