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

Brad Schoening edited comment on CASSANDRA-19631 at 1/8/25 8:49 PM:
--------------------------------------------------------------------

1. With select<tab> I see the following:
{code:java}
cassandra@cqlsh> select 
                         <pgStringLiteral>        cqlshtests_nbqeqfhnqr.   
system_cluster_metadata. true                    
*                        <quotedStringLiteral>    DISTINCT                 
system_distributed.      TTL                     
-                        <uuid>                   false                    
system_schema.           WRITETIME               
<blobLiteral>            <wholenumber>            JSON                     
system_traces.           {                       
<colname>                [                        NULL                     
system_views.           
<float>                  CAST                     system.                  
system_virtual_schema. 
<identifier>             COUNT                    system_auth.             
TOKEN        {code}

min, max, sum, avg, abs, exp, log, log10, round 
map_keys, map_values, 
toDate, toTimestamp, toUnitTimestamp are among those missing.

2. Select with where LHS:
{code:java}
select * from system.peers where 
             <identifier> <quotedName> peer         TOKEN(      
{code}

3. Select with where RHS
{code:java}
select * from system.peers where  rack =
                       false                 true                 <float>       
        <quotedStringLiteral>
 -                     NULL                  {                    <identifier>  
        <uuid>               
 [                     TOKEN                <blobLiteral>         
<pgStringLiteral>     <wholenumber>   
{code}

Examples of valid queries with functions:

SELECT to_date(compacted_at) FROM system.compaction_history WHERE compacted_at 
< current_timestamp() LIMIT 10 ALLOW FILTERING;


was (Author: bschoeni):
1. With select<tab> I see the following:
{code:java}
cassandra@cqlsh> select 
                         <pgStringLiteral>        cqlshtests_nbqeqfhnqr.   
system_cluster_metadata. true                    
*                        <quotedStringLiteral>    DISTINCT                 
system_distributed.      TTL                     
-                        <uuid>                   false                    
system_schema.           WRITETIME               
<blobLiteral>            <wholenumber>            JSON                     
system_traces.           {                       
<colname>                [                        NULL                     
system_views.           
<float>                  CAST                     system.                  
system_virtual_schema. 
<identifier>             COUNT                    system_auth.             
TOKEN        {code}

min, max, sum, avg, abs, exp, log, log10, round 
map_keys, map_values, 
toDate, toTimestamp, toUnitTimestamp are among those missing.

2. Select with where LHS:
{code:java}
select * from system.peers where 
             <identifier> <quotedName> peer         TOKEN(      
{code}

3. Select with where RHS
{code:java}
select * from system.peers where  rack =
                       false                 true                 <float>       
        <quotedStringLiteral>
 -                     NULL                  {                    <identifier>  
        <uuid>               
 [                     TOKEN                <blobLiteral>         
<pgStringLiteral>     <wholenumber>   
{code}


> Consider autocompletion of in-built functions in CQLSH
> ------------------------------------------------------
>
>                 Key: CASSANDRA-19631
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19631
>             Project: Apache Cassandra
>          Issue Type: Improvement
>          Components: CQL/Interpreter
>            Reporter: Stefan Miklosovic
>            Assignee: Brad Schoening
>            Priority: Normal
>
> Why do we not autocomplete native functions in CQLSH shell? I am pretty lost 
> in what functions are there to choose from without consulting the 
> documentation.
> Additionally, the documentation on [Blob conversion 
> functions|https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#blob-conversion-functions]
>  could use an example, as done for the other builtins. 



--
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