xuyangzhong commented on code in PR #26632:
URL: https://github.com/apache/flink/pull/26632#discussion_r2135573853


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/Index.java:
##########
@@ -0,0 +1,46 @@
+/*
+ * 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.flink.table.catalog;
+
+import org.apache.flink.annotation.Experimental;
+import org.apache.flink.annotation.PublicEvolving;
+
+import java.util.List;
+
+/**
+ * An index is a copy of selected columns of data, from a table, that is 
designed to enable very
+ * efficient search. An index normally includes a "key" or direct link to the 
original row of data
+ * from which it was copied, to allow the complete row to be retrieved 
efficiently.
+ *
+ * <p>Currently, this interface is only exposed to developers. In the future, 
when we introduce
+ * Index during lexical parsing, this can be marked as {@link PublicEvolving}.
+ */
+@Experimental
+@PublicEvolving

Review Comment:
   Only need to pick one between `PublicEvolving` and `Experimental`. If you 
choose to tag it with `PublicEvolving`, remove the tag `Experimental` and 
related comments.



##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/ResolvedSchema.java:
##########
@@ -63,15 +63,25 @@ public final class ResolvedSchema {
     private final List<Column> columns;
     private final List<WatermarkSpec> watermarkSpecs;
     private final @Nullable UniqueConstraint primaryKey;
+    @Deprecated private final List<Index> indexes;
 
     public ResolvedSchema(

Review Comment:
   Please add @Deprecated in this construct method.



##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/Schema.java:
##########
@@ -77,13 +79,29 @@ public final class Schema {
 
     private final @Nullable UnresolvedPrimaryKey primaryKey;
 
-    private Schema(
+    /**
+     * Referring to FLIP-486, as DeltaJoin is not currently supported, the 
index is currently marked

Review Comment:
   remove this comment



##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/serde/ResolvedSchemaJsonDeserializer.java:
##########
@@ -73,7 +77,17 @@ public ResolvedSchema deserialize(JsonParser jsonParser, 
DeserializationContext
                                 jsonParser.getCodec(),
                                 ctx)
                         .orElse(null);
+        List<Index> indexes;
+        if (jsonNode.has(INDEXES)) {

Review Comment:
   Please add tests for serde



##########
flink-python/pyflink/table/tests/test_catalog_completeness.py:
##########
@@ -16,10 +16,10 @@
 # limitations under the License.
 
################################################################################
 
-from pyflink.testing.test_case_utils import PythonAPICompletenessTestCase, 
PyFlinkTestCase
 from pyflink.table.catalog import Catalog, CatalogDatabase, CatalogBaseTable, 
CatalogPartition, \
     ObjectIdentifier, CatalogFunction, CatalogColumnStatistics, 
CatalogPartitionSpec, \
     ObjectPath, Column, WatermarkSpec, Constraint, UniqueConstraint, 
ResolvedSchema
+from pyflink.testing.test_case_utils import PythonAPICompletenessTestCase, 
PyFlinkTestCase

Review Comment:
   Could this changes be reverted?



##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/ResolvedSchema.java:
##########
@@ -63,15 +63,25 @@ public final class ResolvedSchema {
     private final List<Column> columns;
     private final List<WatermarkSpec> watermarkSpecs;
     private final @Nullable UniqueConstraint primaryKey;
+    @Deprecated private final List<Index> indexes;

Review Comment:
   We should not introduce a new public interface with `Deprecated`. 
`Deprecated` means we will delete it in future.



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

Reply via email to