adelapena commented on code in PR #2110:
URL: https://github.com/apache/cassandra/pull/2110#discussion_r1101669210


##########
src/java/org/apache/cassandra/cql3/statements/SelectStatement.java:
##########
@@ -1153,10 +1153,14 @@ private Selection prepareSelection(TableMetadata table,
             if (hasGroupBy)
                 Guardrails.groupByEnabled.ensureEnabled(state);
 
+            boolean isJson = parameters.isJson;
+            boolean returnStaticContentOnPartitionWithNoRows = 
restrictions.returnStaticContentOnPartitionWithNoRows();
+
             if (selectables.isEmpty()) // wildcard query
             {
-                return hasGroupBy ? Selection.wildcardWithGroupBy(table, 
boundNames, parameters.isJson, 
restrictions.returnStaticContentOnPartitionWithNoRows())
-                                  : Selection.wildcard(table, 
parameters.isJson, restrictions.returnStaticContentOnPartitionWithNoRows());
+                return hasGroupBy || 
table.columns().stream().anyMatch(ColumnMetadata::isMasked)

Review Comment:
   Added that convenience `TableMetadata#hasMaskedColumns()` method, which is 
way cleaner. Since that's now a general purpose method that might called in any 
path I'm changing it to a loop.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to