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

Stefan Miklosovic commented on CASSANDRA-18219:
-----------------------------------------------

Yes you are right we probably do not need that in cql warn, this warning is 
propagated to drivers anyway (as far as I know) and users executing queries 
know what query they executed so we do not need to repeat the information about 
table and keyspace because they are the ones executing the query and they know 
it. So I will remove modifications about cqlsh warn.

The current PR (1) logs this via NoSpamLogger:
{code:java}
DEBUG [Native-Transport-Requests-1] 2023-02-02 11:23:47,086 
NoSpamLogger.java:105 - Aggregation query used without partition key on table 
ks.tb, aggregation type: AGGREGATE_EVERYTHING, query: <SELECT c1, c2 FROM ks.tb>
{code}
I am working on the fix because it should write "max(c1), max(c2)" ....

> Warning message on aggregation queries doesn't specify table name or 
> aggregate type
> -----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-18219
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18219
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Observability/Logging
>            Reporter: Brad Schoening
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The existing aggregation query warning messages in cassandra.log from 
> SelectStatement.java:
>      _'[WARN] Aggregation query used without partition key'_
>      {_}'{_}{_}[WARN]{_} _Aggregation query used on multiple partition keys 
> (IN restriction)'_
> are missing the helpful details which would assist users in quickly 
> identifying the offending query. The table name and type of aggregation would 
> be useful additions in the WARN message.
> In addition, following the example of the slow query logger and printing out 
> the query string at DEBUG level would be especially helpful.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to