tkalkirill commented on code in PR #2680:
URL: https://github.com/apache/ignite-3/pull/2680#discussion_r1356473574
##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java:
##########
@@ -363,4 +365,22 @@ static CatalogZoneDescriptor zoneOrThrow(Catalog catalog,
String name) throws Ca
public static String pkIndexName(String tableName) {
return tableName + "_PK";
}
+
+ /**
+ * Returns index with given name.
+ *
+ * @param schema Schema to look up index in.
+ * @param name Name of the index of interest.
+ * @return Table with given name.
+ * @throws IndexNotFoundValidationException If index with given name is
not exists.
+ */
+ static CatalogIndexDescriptor indexOrThrow(CatalogSchemaDescriptor schema,
String name) throws IndexNotFoundValidationException {
Review Comment:
I don’t think it’s worth it, this method is only used by teams, but
`CatalogSchemaDescriptor` can be used by anyone.
##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java:
##########
@@ -363,4 +365,22 @@ static CatalogZoneDescriptor zoneOrThrow(Catalog catalog,
String name) throws Ca
public static String pkIndexName(String tableName) {
return tableName + "_PK";
}
+
+ /**
+ * Returns index with given name.
+ *
+ * @param schema Schema to look up index in.
+ * @param name Name of the index of interest.
+ * @return Table with given name.
+ * @throws IndexNotFoundValidationException If index with given name is
not exists.
+ */
+ static CatalogIndexDescriptor indexOrThrow(CatalogSchemaDescriptor schema,
String name) throws IndexNotFoundValidationException {
Review Comment:
I don’t think it’s worth it, this method is only used by teams, but
`CatalogSchemaDescriptor` can be used by anyone.
--
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]