You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "bereng (via GitHub)" <gi...@apache.org> on 2023/02/15 10:21:59 UTC

[GitHub] [cassandra] bereng commented on a diff in pull request #2156: CASSANDRA-18071 trunk: Allow to use user-defined functions (UDF) as masking functions

bereng commented on code in PR #2156:
URL: https://github.com/apache/cassandra/pull/2156#discussion_r1106932100


##########
src/java/org/apache/cassandra/cql3/statements/schema/DropFunctionStatement.java:
##########
@@ -120,9 +121,28 @@ public Keyspaces apply(Keyspaces schema)
         if (!dependentAggregates.isEmpty())
             throw ire("Function '%s' is still referenced by aggregates %s", name, dependentAggregates);
 
+        String dependentMasks = keyspace.tables.stream()
+                                               .filter(table -> hasDependingMask(table, function))
+                                               .map(table -> table.name)
+                                               .collect(joining(", "));
+
+        if (!dependentMasks.isEmpty())
+            throw ire("Function '%s' is still referenced by column masks in tables %s", name, dependentMasks);

Review Comment:
   I would add the keyspace name here "ks.table". Countless times I've amended error messages just bc a user had the same exact ks but: ks_dev, ks_testWhatever, ks_preProd, etc



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org