skoppu22 commented on code in PR #220:
URL: 
https://github.com/apache/cassandra-analytics/pull/220#discussion_r3530504183


##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/TableSchema.java:
##########
@@ -316,6 +349,45 @@ static void validateNoSecondaryIndexes(TableInfoProvider 
tableInfo)
         }
     }
 
+    public Set<String> getIndexStatements()
+    {
+        return indexStatements;
+    }
+
+    @VisibleForTesting
+    static boolean isCassandra5OrLater(String version)

Review Comment:
   Done



##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/TableSchema.java:
##########
@@ -308,6 +300,47 @@ private static void 
validateDataframeFieldsInTable(TableInfoProvider tableInfo,
         Preconditions.checkArgument(unknownFields.isEmpty(), "Unknown fields 
in data frame => " + unknownFields);
     }
 
+    /**
+     * Validates secondary index constraints for bulk write operations.
+     * <p>
+     * When the cluster is Cassandra 5.0+ and ALL indexes are SAI, the write 
is allowed because
+     * SAI index components are generated alongside SSTables and are 
immediately queryable after import.
+     * <p>
+     * When any index is non-SAI (legacy 2i), the write is blocked unless 
SKIP_SECONDARY_INDEX_CHECK is set.
+     *
+     * @param tableInfo               the table info provider
+     * @param skipSecondaryIndexCheck  whether the user explicitly opted out 
of the check
+     * @param indexStatements          the CREATE INDEX statements for the 
table
+     * @param lowestCassandraVersion   the lowest Cassandra version in the 
cluster
+     */
+    static void validateSecondaryIndexes(TableInfoProvider tableInfo,

Review Comment:
   Done



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