You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "maedhroz (via GitHub)" <gi...@apache.org> on 2023/06/23 22:08:04 UTC

[GitHub] [cassandra] maedhroz commented on a diff in pull request #2433: CASSANDRA-18615 Add support for USING and index creation by name with CREATE INDEX

maedhroz commented on code in PR #2433:
URL: https://github.com/apache/cassandra/pull/2433#discussion_r1240450683


##########
src/java/org/apache/cassandra/cql3/statements/schema/CreateIndexStatement.java:
##########
@@ -316,6 +318,23 @@ public CreateIndexStatement prepare(ClientState state)
 
             if (indexName.hasKeyspace() && !keyspaceName.equals(indexName.getKeyspace()))
                 throw ire(KEYSPACE_DOES_NOT_MATCH_INDEX, keyspaceName, tableName);
+            
+            // Set the configured default 2i implementation if one isn't specified with USING:
+            if (attrs.customClass == null)
+                if (DatabaseDescriptor.getDefaultSecondaryIndexEnabled())

Review Comment:
   The usage here is why I didn't end up making this a guardrail.



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