k-rus commented on code in PR #4038:
URL: https://github.com/apache/cassandra/pull/4038#discussion_r2281702268


##########
src/java/org/apache/cassandra/schema/IndexMetadata.java:
##########
@@ -117,29 +114,25 @@ public static IndexMetadata 
fromIndexTargets(List<IndexTarget> targets,
     {
         Map<String, String> newOptions = new HashMap<>(options);
         newOptions.put(IndexTarget.TARGET_OPTION_NAME, targets.stream()
-                                                              .map(target -> 
target.asCqlString())

Review Comment:
   See also my comment: 
https://github.com/apache/cassandra/pull/4038#discussion_r2281701393



##########
src/java/org/apache/cassandra/schema/IndexMetadata.java:
##########
@@ -117,29 +114,25 @@ public static IndexMetadata 
fromIndexTargets(List<IndexTarget> targets,
     {
         Map<String, String> newOptions = new HashMap<>(options);
         newOptions.put(IndexTarget.TARGET_OPTION_NAME, targets.stream()
-                                                              .map(target -> 
target.asCqlString())
+                                                              
.map(IndexTarget::asCqlString)
                                                               
.collect(Collectors.joining(", ")));
         return new IndexMetadata(name, newOptions, kind);
     }
 
-    public static boolean isNameValid(String name)
-    {
-        return name != null && !name.isEmpty() && 
PATTERN_WORD_CHARS.matcher(name).matches();
-    }
-
     public static String generateDefaultIndexName(String table, 
ColumnIdentifier column)
     {
-        return PATTERN_NON_WORD_CHAR.matcher(table + "_" + column.toString() + 
"_idx").replaceAll("");

Review Comment:
   See also my comment: 
https://github.com/apache/cassandra/pull/4038#discussion_r2281701393



-- 
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-unsubscr...@cassandra.apache.org

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


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

Reply via email to