Maxwell-Guo commented on code in PR #4038: URL: https://github.com/apache/cassandra/pull/4038#discussion_r2278072055
########## src/java/org/apache/cassandra/cql3/statements/schema/CreateIndexStatement.java: ########## @@ -229,8 +237,9 @@ private void validateIndexTarget(TableMetadata table, IndexMetadata.Kind kind, I AbstractType<?> baseType = column.type.unwrap(); - if ((kind == IndexMetadata.Kind.CUSTOM) && !SchemaConstants.isValidName(target.column.toString())) - throw ire(INVALID_CUSTOM_INDEX_TARGET, target.column, SchemaConstants.NAME_LENGTH); + // This check will be removed with CASSANDRA-20235 Review Comment: cc @netudima @smiklosovic ########## src/java/org/apache/cassandra/cql3/statements/schema/CreateIndexStatement.java: ########## @@ -229,8 +237,9 @@ private void validateIndexTarget(TableMetadata table, IndexMetadata.Kind kind, I AbstractType<?> baseType = column.type.unwrap(); - if ((kind == IndexMetadata.Kind.CUSTOM) && !SchemaConstants.isValidName(target.column.toString())) - throw ire(INVALID_CUSTOM_INDEX_TARGET, target.column, SchemaConstants.NAME_LENGTH); + // This check will be removed with CASSANDRA-20235 Review Comment: The codebase is not a notepad. You already have Jira, so why do you need this kind of meaningless record? Have you seen similar notepad messages in recent Cassandra code? ########## src/java/org/apache/cassandra/cql3/statements/schema/CreateIndexStatement.java: ########## @@ -60,8 +60,8 @@ public final class CreateIndexStatement extends AlterSchemaStatement public static final String CUSTOM_MULTIPLE_COLUMNS = "Only CUSTOM indexes support multiple columns"; public static final String DUPLICATE_TARGET_COLUMN = "Duplicate column '%s' in index target list"; public static final String COLUMN_DOES_NOT_EXIST = "Column '%s' doesn't exist"; - public static final String INVALID_CUSTOM_INDEX_TARGET = "Column '%s' is longer than the permissible name length of %d characters or" + - " contains non-alphanumeric-underscore characters"; + public static final String INVALID_CHARS_CUSTOM_INDEX_TARGET = "Column '%s' contains non-alphanumeric-underscore characters"; Review Comment: This will help the code readability. see this google example : `public static final String COLUMN_DOES_NOT_EXIST = "Column '%s' doesn't exist";` -- 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