Open vityaman opened 2 months ago
Merged the MR Add YQL syntax highlighting to YDB CLI #7448.
We noticed, that current implementation is not so good, as it does not distinguish ANSI or extended SQL syntax types and parses text as extended SQL, so ANSI query can be highlighted incorrectly.
We should add an abstraction and support both SQL dialects.
Maybe we should use yql/sql/sql.h interface.
We noticed, that current solution highlight some identifiers incorrectly as in the YQL keywords can be identifiers.
Examples
select 1 as window;
select group from (SELECT 1 as group);
select group from (select 1 as group) (group = column)
select min(x) from T group by y; (group = keyword)
We "could-have" YQL syntax highlighting in YDB CLI in interactive mode with color schema like we have in Embedded UI Monaco editor. This can be done using YQL ANTLR4 grammar.
After this feature we want to add