teyeheimans commented on issue #17361:
URL: https://github.com/apache/druid/issues/17361#issuecomment-2421624438

   I am using a map lookup, just like you. Your example shows the problem 
already:
   
   ```
   $ curl -X GET http://localhost:8888/druid/v1/lookups/introspect/mapLookup/   
 
   {"1":"One","2":"Two","3":"Three"}
   
   $ curl -X GET 
http://localhost:8888/druid/v1/lookups/introspect/mapLookup/keys   
   [1, 2, 3]        
   
   $ curl -X GET 
http://localhost:8888/druid/v1/lookups/introspect/mapLookup/values     
   [One, Two, Three]
   ```
   
   The values returned in your example is **NOT** valid JSON. The values are 
not quoted. The correct response would be:
   
   ```["One", "Two", "Three"]```
   
   Also, to check if it is valid JSON you could use `jq`:
   
   ```$ curl -X GET 
http://localhost:8888/druid/v1/lookups/introspect/mapLookup/values | jq '.' ```
   
   This also happens when the keys are strings. So the `keys` and `values` 
endpoints of the introspect API's are NOT returning valid JSON. 
   
   Finally, the `version` endpoint does not seem to work (indeed). However, it 
is documented that it should be there, so the documentation seems to be 
incorrect. See this page at the bottom: 
https://druid.apache.org/docs/latest/querying/lookups-cached-global/#introspection


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