paul-rogers opened a new issue, #13768:
URL: https://github.com/apache/druid/issues/13768

   Please provide a detailed title (e.g. "Broker crashes when using TopN query 
with Bound filter" instead of just "Broker crashes").
   
   ### Affected Version
   
   26.0.0-SNAPSHOT
   
   ### Description
   
   Suppose we submit a query that takes a query parameter, but we omit the 
parameter in the request. We get back a misleading error. Please provide a 
better error messages.
   
   Query:
   
   ```sql
   REPLACE INTO "myWiki" OVERWRITE ALL
   SELECT
     TIME_PARSE("timestamp") AS "__time",
     namespace,
     page,
     channel,
     "user",
     countryName,
     CASE WHEN isRobot = 'true' THEN 1 ELSE 0 END AS isRobot,
     "added",
     "delta",
     CASE WHEN isNew = 'true' THEN 1 ELSE 0 END AS isNew,
     "deltaBucket",
     "deleted"
   FROM TABLE(ext.wikiSample(
     uris => ?
   ))
   ```
   
   The error response:
   
   ```
   {'error': 'Plan validation failed', 
   'errorMessage': 'At line 17, column 11: Illegal use of dynamic parameter', 
   'errorClass': 'org.apache.calcite.tools.ValidationException', 
   'host': None}
   ```
   
   Note that the _use_ of the dynamic parameter is legal. Rather, the problem 
is that no value was provided. So, the error should be "No value provided for 
parameter 1."
   
   Suppose we simplify the query as the above query depends on a catalog 
definition, and does some fancy stuff irrelevant to this issue. So, let's try a 
very simple query:
   
   ```sql
   SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = ?
   ```
   
   In this case, we get a non-error response with no data. Yet, we didn't 
provide query parameter values. Same situation, different outcome. Still 
confusing.
   
   The request is to have a consistent error message when the number of query 
parameters and values don't match.


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