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

Alex Petrov commented on CASSANDRA-18322:
-----------------------------------------

I first thought that I have made a mistake and create/drop keyspace is an 
instance of QualifiedStatement, but my intention in implementing this was to 
pick a statement that can only be applied to insert/update/delete/select, and 
create/drop is not an instance of such. So naturally `isFullyQualified` does 
not apply to those. Maybe we could use an enum or capital-case boolean to 
distinguish between those cases. I think its a reasonable UI/UX change. That 
said, unfortunately I won't get to it any time soon, so if anyone has cycles, 
it would be great if you could take a stub. Thanks!

> Warnings when using prepared statement with "drop/create keyspace .." ( after 
> 15252)
> ------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-18322
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18322
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Messaging/Client
>            Reporter: Mohammad Aburadeh
>            Assignee: Alex Petrov
>            Priority: Urgent
>
> Hi, 
> We get the following warnings when we use prepared statements with "create 
> keyspace ... " or "drop keyspace" statements.
> "
> {{USE <keyspace>}} with prepared statements is considered to be an 
> anti-pattern due to ambiguity in non-qualified table names. Please consider 
> removing instances of {{{}Session#setKeyspace(<keyspace>){}}}, 
> {{Session#execute("USE <keyspace>")}} and {{cluster.newSession(<keyspace>)}} 
> from your code, and always use fully qualified table names (e.g. 
> <keyspace>.<table>). Keyspace used: null, statement keyspace: null, statement 
> id: 8153d922390fdf9a9963bfeda85b2f3b at 
> "
> Such statements are already full-qualified. So, why are we getting this 
> warning? 
> Regards
> Mohammad



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