You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "abhishekrb19 (via GitHub)" <gi...@apache.org> on 2023/02/10 17:12:34 UTC

[GitHub] [druid] abhishekrb19 commented on a diff in pull request #13780: Refinements to input-source specific table functions

abhishekrb19 commented on code in PR #13780:
URL: https://github.com/apache/druid/pull/13780#discussion_r1101248487


##########
server/src/main/java/org/apache/druid/catalog/model/table/HttpInputSourceDefn.java:
##########
@@ -172,6 +172,14 @@ public void validate(ResolvedExternalTable table)
     super.validate(table);
   }
 
+  @Override
+  protected void auditInputSource(Map<String, Object> jsonMap)
+  {
+    // A partial table may not include the URI parameter, but it is
+    // needed to serialize the input source.
+    jsonMap.putIfAbsent(URIS_PARAMETER, "http://bogus.com");

Review Comment:
   Why do we need to populate a bogus value here? Is it used to bypass any validation checks?



##########
server/src/main/java/org/apache/druid/catalog/model/table/BaseTableFunction.java:
##########
@@ -76,11 +85,11 @@ public List<ParameterDefn> parameters()
     return parameters;
   }
 
-  protected void requireSchema(String fnName, List<ColumnSpec> columns)
+  protected static void requireSchema(String fnName, List<ColumnSpec> columns)
   {
     if (columns == null) {
       throw new IAE(
-          "The %s table function requires an EXTEND clause with a schema",
+          "Function requires a schema: TABLE(%s(...)) (<col> <type>...)",

Review Comment:
   Neat



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org