From 3bae157547a5e7cd8c8c5288b983ec632817e674 Mon Sep 17 00:00:00 2001 From: manoharbvk Date: Sat, 24 Aug 2024 23:40:57 +0530 Subject: [PATCH] Issue #4305 Added default statements to 4 switch case statements --- .../storage/relational/service/FilesetMetaService.java | 2 ++ .../gravitino/storage/relational/service/SchemaMetaService.java | 2 ++ .../gravitino/storage/relational/service/TableMetaService.java | 2 ++ .../gravitino/storage/relational/service/TopicMetaService.java | 2 ++ 4 files changed, 8 insertions(+) diff --git a/core/src/main/java/org/apache/gravitino/storage/relational/service/FilesetMetaService.java b/core/src/main/java/org/apache/gravitino/storage/relational/service/FilesetMetaService.java index 4d63c5f19b7..711861ff087 100644 --- a/core/src/main/java/org/apache/gravitino/storage/relational/service/FilesetMetaService.java +++ b/core/src/main/java/org/apache/gravitino/storage/relational/service/FilesetMetaService.java @@ -319,6 +319,8 @@ private void fillFilesetPOBuilderParentEntityId(FilesetPO.Builder builder, Names SchemaMetaService.getInstance().getSchemaIdByCatalogIdAndName(parentEntityId, name); builder.withSchemaId(parentEntityId); break; + default: + throw new IllegalArgumentException("Unsupported namespace level: " + level); } } } diff --git a/core/src/main/java/org/apache/gravitino/storage/relational/service/SchemaMetaService.java b/core/src/main/java/org/apache/gravitino/storage/relational/service/SchemaMetaService.java index f89c4c5f0f0..a1dc5756305 100644 --- a/core/src/main/java/org/apache/gravitino/storage/relational/service/SchemaMetaService.java +++ b/core/src/main/java/org/apache/gravitino/storage/relational/service/SchemaMetaService.java @@ -275,6 +275,8 @@ private void fillSchemaPOBuilderParentEntityId(SchemaPO.Builder builder, Namespa .getCatalogIdByMetalakeIdAndName(parentEntityId, name); builder.withCatalogId(parentEntityId); break; + default: + throw new IllegalArgumentException("Unsupported namespace level: " + level); } } } diff --git a/core/src/main/java/org/apache/gravitino/storage/relational/service/TableMetaService.java b/core/src/main/java/org/apache/gravitino/storage/relational/service/TableMetaService.java index 87a2df50ee8..cc4574dbab8 100644 --- a/core/src/main/java/org/apache/gravitino/storage/relational/service/TableMetaService.java +++ b/core/src/main/java/org/apache/gravitino/storage/relational/service/TableMetaService.java @@ -226,6 +226,8 @@ private void fillTablePOBuilderParentEntityId(TablePO.Builder builder, Namespace SchemaMetaService.getInstance().getSchemaIdByCatalogIdAndName(parentEntityId, name); builder.withSchemaId(parentEntityId); break; + default: + throw new IllegalArgumentException("Unsupported namespace level: " + level); } } } diff --git a/core/src/main/java/org/apache/gravitino/storage/relational/service/TopicMetaService.java b/core/src/main/java/org/apache/gravitino/storage/relational/service/TopicMetaService.java index f13fc202abf..35b0eb0f143 100644 --- a/core/src/main/java/org/apache/gravitino/storage/relational/service/TopicMetaService.java +++ b/core/src/main/java/org/apache/gravitino/storage/relational/service/TopicMetaService.java @@ -171,6 +171,8 @@ private void fillTopicPOBuilderParentEntityId(TopicPO.Builder builder, Namespace SchemaMetaService.getInstance().getSchemaIdByCatalogIdAndName(parentEntityId, name); builder.withSchemaId(parentEntityId); break; + default: + throw new IllegalArgumentException("Unsupported namespace level: " + level); } } }