paul-rogers commented on code in PR #13780:
URL: https://github.com/apache/druid/pull/13780#discussion_r1102202501


##########
server/src/main/java/org/apache/druid/catalog/model/table/FormattedInputSourceDefn.java:
##########
@@ -95,7 +95,10 @@ protected List<ParameterDefn> addFormatParameters(
   )
   {
     final List<ParameterDefn> toAdd = new ArrayList<>();
-    final ParameterDefn formatProp = new Parameter(FORMAT_PARAMETER, 
ParameterType.VARCHAR, false);
+    // While the format parameter is required, we mark it as optional. Else
+    // if the source defines optional parameters, they will still be ignored

Review Comment:
   Actually, _input source_, as written. The input source parameters preceded 
the input format parameters. That's how we end up with the scenario in the 
comment: the input source has two optional parameters, but the format has a 
required one. That forces the input source parameters to also become required.
   
   This is, by the way, why that bug in `extern`, where I had the optional flag 
backward, actually worked. Calcite took my `(optional, optional, required)` and 
turned it into what the code originally had: `(required, required, required)`.



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