Maxwell-Guo commented on code in PR #4038:
URL: https://github.com/apache/cassandra/pull/4038#discussion_r2269954406


##########
.circleci/config.yml:
##########


Review Comment:
   I think we do not need to change the config.yml in the patch



##########
src/java/org/apache/cassandra/schema/IndexMetadata.java:
##########
@@ -111,29 +108,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("");
+        return PATTERN_NON_WORD_CHAR.matcher(table + '_' + column.toString() + 
"_idx").replaceAll("");
     }
 
     public static String generateDefaultIndexName(String table)
     {
-        return PATTERN_NON_WORD_CHAR.matcher(table + "_" + 
"idx").replaceAll("");
+        return PATTERN_NON_WORD_CHAR.matcher(table + "_idx").replaceAll("");
     }
 
     public void validate(TableMetadata table)
     {
-        if (!isNameValid(name))
+        // Validating the length will be addressed by CASSANDRA-20445

Review Comment:
   remove this line please



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