Autocompletion bugs & improvements
(in no particular order)
-
datatype completion is broken for the second column (and later)

-
only one completion is displayed in case of
SELECT * FROM sys<tab>
-
table autocompletion should have the current database in mind

-
aliased column in subqueries don't work

-
autocompletion prepends the table name if called inside the function's parentheses

Autocompletion should get the list of supported functions/datatypes/whatnot from the server
The lists are currently hard-coded in the clickhouse_cli/clickhouse/definitions.py:
-
FUNCTIONS,CASE_INSENSITIVE_FUNCTIONS,AGGREGATION_FUNCTIONS->SELECT * FROM system.functions;(should also take care ofis_aggregateandcase_insensitive) foris_aggregateones, should add suffixes fromSELECT * FROM system.aggregate_function_combinators; -
DATATYPES->SELECT * FROM system.data_type_families;