zachjsh commented on code in PR #13627:
URL: https://github.com/apache/druid/pull/13627#discussion_r1066569420


##########
server/src/main/java/org/apache/druid/catalog/model/TableDefnRegistry.java:
##########
@@ -102,10 +144,25 @@ public ResolvedTable resolve(TableSpec spec)
     if (Strings.isNullOrEmpty(type)) {
       throw new IAE("The table type is required.");
     }
-    TableDefn defn = defns.get(type);
+    TableDefn defn = tableDefns.get(type);
     if (defn == null) {
       throw new IAE("Table type [%s] is not valid.", type);
     }
     return new ResolvedTable(defn, spec, jsonMapper);
   }
+
+  public InputSourceDefn inputSourceDefnFor(String type)
+  {
+    return type == null ? null : inputSourceDefns.get(type);
+  }
+
+  public InputFormatDefn inputFormatDefnFor(String type)
+  {
+    return type == null ? null : inputFormatDefns.get(type);

Review Comment:
   nit: I dont think you need the null check do you? If null, should just 
return null? Or why is this check not being done for `formats()`?



##########
server/src/main/java/org/apache/druid/catalog/model/TableDefnRegistry.java:
##########
@@ -102,10 +144,25 @@ public ResolvedTable resolve(TableSpec spec)
     if (Strings.isNullOrEmpty(type)) {
       throw new IAE("The table type is required.");
     }
-    TableDefn defn = defns.get(type);
+    TableDefn defn = tableDefns.get(type);
     if (defn == null) {
       throw new IAE("Table type [%s] is not valid.", type);
     }
     return new ResolvedTable(defn, spec, jsonMapper);
   }
+
+  public InputSourceDefn inputSourceDefnFor(String type)
+  {
+    return type == null ? null : inputSourceDefns.get(type);

Review Comment:
   nit: I dont think you need the null check do you? If null, should just 
return null? Or why is this check not being done for formats()?



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