JAkutenshi commented on code in PR #6712:
URL: https://github.com/apache/ignite-3/pull/6712#discussion_r2450611929
##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java:
##########
@@ -542,11 +545,33 @@ public static CatalogTableDescriptor tableOrThrow(Catalog
catalog, int tableId)
*/
public static @Nullable CatalogZoneDescriptor zone(Catalog catalog, String
name, boolean shouldThrowIfNotExists)
throws CatalogValidationException {
+ try {
+ return zone(catalog, name);
+ } catch (CatalogValidationException e) {
+ if (shouldThrowIfNotExists) {
+ throw e;
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * Returns zone with given name.
+ *
+ * @param catalog Catalog to look up zone in.
+ * @param name Name of the zone of interest.
+ * @return Zone descriptor for given name.
+ * @throws CatalogValidationException If zone with given name is not
exists and flag shouldThrowIfNotExists
+ * set to {@code true}.
+ */
+ public static CatalogZoneDescriptor zone(Catalog catalog, String name)
Review Comment:
Changed.
--
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]