druid
druid copied to clipboard
Web console: improve SQL autocomplete and add JSON autocomplete
Fixes https://github.com/apache/druid/issues/17628
Made the SQL autocomplete much smarter
(note how it is not trying to auto-complete functions and other nonsense)
Also added autocomplete to JSON native queries and to all the JSON entry fields
Thank you for the review and feedback @clintropolis in general I have taken the approach of only going after the documented properties. I also think of these JSON completions as best effort. It is ok for them to miss stuff. Even if they are totally wrong it is not a blocker (even though it is best to fix) as the completions are purely cosmetic.
As for updating I expect the completions to be updated like like the properties for rendering all the AutoForms. Ideally done by the dev adding a new property in their PR but more often done after the fact once that property is exposed and documented
I think the feedback all makes sense. I also think this PR makes things a lot better. In a follow up PR I will change this behaviour to use json-schema which is a standard and allows for recursive schema definition