lukasz-antoniak commented on code in PR #254:
URL: 
https://github.com/apache/cassandra-analytics/pull/254#discussion_r4410709906


##########
cassandra-analytics-common/src/main/java/org/apache/cassandra/spark/data/SaiIndex.java:
##########
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cassandra.spark.data;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Serializable description of a Cassandra Storage-Attached-Index (SAI).
+ *
+ * This intentionally contains only version-neutral metadata. Cassandra-version
+ * specific bridge code converts it to native index metadata ({@code 
StorageAttachedIndex}).
+ */
+public final class SaiIndex implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+
+    @NotNull
+    private final String name;

Review Comment:
   We use index name only to construct index metadata:
   ```
   IndexMetadata indexMetadata = 
IndexMetadata.fromSchemaMetadata(saiIndex.name(),
                                                                  
IndexMetadata.Kind.CUSTOM,
                                                                  options);
   return new StorageAttachedIndex(cfs, indexMetadata);
   ```
   Analytics allows to read data only from single table in a given Spark job. 
There is no global cache of opened SAI indexes.



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