crash
crash copied to clipboard
Keyword completion: Update SQLCompleter with keywords from aggregation functions?
Hi there,
while applying some housekeeping to the repository, I found the patch [1] by @chaudum which adds the analyze keyword.
While this has been already integrated into the main branch on behalf of a different commit, I am asking myself if any of the aggregation functions [2] should also be part of the list of keywords.
SELECT word FROM pg_catalog.pg_get_keywords(); doesn't contain any of them either, so this might well be intentional. However, some of the scalar functions like trim, left and right are both included within the documentation [3] and the synthesized pg_catalog.pg_get_keywords().
On the other hand, some scalar functions like floor or ceil are included within the documentation but are not part of either pg_catalog.pg_get_keywords() nor the list of fallback keywords [4].
Please let me know if this should be improved on different ends.
With kind regards, Andreas.
[1] https://github.com/crate/crash/compare/h/analyze?expand=1 [2] https://github.com/crate/crate/blob/4.4.0/docs/general/builtins/aggregation.rst [3] https://github.com/crate/crate/blob/4.4.0/docs/general/builtins/scalar.rst [4] https://github.com/crate/crash/blob/0.27.0/crate/crash/repl.py#L115-L151
cc @seut, @jayeff, @proddata