capistrant commented on code in PR #19375:
URL: https://github.com/apache/druid/pull/19375#discussion_r3163502289


##########
processing/src/main/java/org/apache/druid/segment/projections/Projections.java:
##########
@@ -57,6 +57,17 @@ public class Projections
 
   private static final ConcurrentHashMap<byte[], Boolean> PERIOD_GRAN_CACHE = 
new ConcurrentHashMap<>();
 
+  public static String validateProjectionName(@Nullable String name)
+  {
+    if (name == null || name.isEmpty()) {
+      throw InvalidInput.exception("projection name cannot be null or empty");
+    }
+    if (name.startsWith("__")) {
+      throw InvalidInput.exception("projection cannot use reserved name[%s]", 
BASE_TABLE_PROJECTION_NAME);

Review Comment:
   implies `name` is `__base` but don't we only know that name is prefixed with 
`__` at this point? could be misleading in the messaging. does it make more 
sense to say `projection[name] cannot use reserved prefix[__]`



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