<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/yql/essentials/parser/common, branch main</title>
<subtitle>Mirror of YDB github repos</subtitle>
<id>https://code.mastervirt.ru/ydb/atom?h=main</id>
<link rel='self' href='https://code.mastervirt.ru/ydb/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/'/>
<updated>2026-03-05T07:10:57Z</updated>
<entry>
<title>YQL-20095: Apply lost Clang Tidy fixes</title>
<updated>2026-03-05T07:10:57Z</updated>
<author>
<name>vitya-smirnov</name>
<email>vitya-smirnov@yandex-team.com</email>
</author>
<published>2026-03-05T06:31:38Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=69ce2ac7f0827799bda5e02dc9bf9a0b9398772d'/>
<id>urn:sha1:69ce2ac7f0827799bda5e02dc9bf9a0b9398772d</id>
<content type='text'>
I do not known why, but these Clang Tidy fixes was lost. Maybe this is
because of conditional preprocessing. Maybe Clang Tidy is ran only on
changed sources.
commit_hash:718e5487699b21b643ed90729ce8347c84cbd6ee
</content>
</entry>
<entry>
<title>YQL-20095: Enable google-explicit-constructor</title>
<updated>2026-01-23T13:17:10Z</updated>
<author>
<name>vitya-smirnov</name>
<email>vitya-smirnov@yandex-team.com</email>
</author>
<published>2026-01-23T12:36:47Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=5ec2ab12d84c8edd135d4a89d87e2fbd2b281f4e'/>
<id>urn:sha1:5ec2ab12d84c8edd135d4a89d87e2fbd2b281f4e</id>
<content type='text'>
commit_hash:4d77ad10fd4db303459ec4e45e139967c7fc8196
</content>
</entry>
<entry>
<title>YQL-20095: Enable modernize-use-override</title>
<updated>2026-01-13T14:55:02Z</updated>
<author>
<name>vitya-smirnov</name>
<email>vitya-smirnov@yandex-team.com</email>
</author>
<published>2026-01-13T14:28:38Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=dcda00624e675c16afa086ce13d8f583f7929846'/>
<id>urn:sha1:dcda00624e675c16afa086ce13d8f583f7929846</id>
<content type='text'>
The check `modernize-use-override` is useful as it:

1. Removes redundant `override` when it is used with a `final`.

2. Removes redundant `virtual` or replace it with a `override`.
   So it is more clean for a reader, that overriding happens.

It is enabled not out of order, as it is just an alias to
`cppcoreguidelines-explicit-virtual-functions`.

I also decided to switch a strategy of enabling checks. Now
I will enable only a single rule with a single PR and prefer
rules with a non-breaking autofix.

In the new year with new linter checks! 🎄
commit_hash:e6e233baa90b31e5f65e11837546690c47f71ab5
</content>
</entry>
<entry>
<title>YQL-20086 invert flag</title>
<updated>2025-10-10T14:08:12Z</updated>
<author>
<name>vvvv</name>
<email>vvvv@yandex-team.com</email>
</author>
<published>2025-10-10T13:31:33Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=98f2ee1a36436bada54371eef656138d98dd40e0'/>
<id>urn:sha1:98f2ee1a36436bada54371eef656138d98dd40e0</id>
<content type='text'>
commit_hash:a6b640bc576263b62884a0b4187ba79c893e13d9
</content>
</entry>
<entry>
<title>YQL-20086 parser</title>
<updated>2025-10-08T12:09:49Z</updated>
<author>
<name>vvvv</name>
<email>vvvv@yandex-team.com</email>
</author>
<published>2025-10-08T11:35:50Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=343f6fb150d2e6f4316b082cee900527d4b33a25'/>
<id>urn:sha1:343f6fb150d2e6f4316b082cee900527d4b33a25</id>
<content type='text'>
commit_hash:dd605e5cde39ff07fdadf62f0c2364a8b12c8405
</content>
</entry>
<entry>
<title>YQL-20116: Introduce ANTLR4 ambiguity detection</title>
<updated>2025-10-06T06:18:09Z</updated>
<author>
<name>vitya-smirnov</name>
<email>vitya-smirnov@yandex-team.com</email>
</author>
<published>2025-10-06T06:00:56Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=96bddf8336a6ca765ee3141049197b8bff1810b5'/>
<id>urn:sha1:96bddf8336a6ca765ee3141049197b8bff1810b5</id>
<content type='text'>
- Ignored 2 known ambiguities.
- Tested tools.
commit_hash:9e29bb2f876dabc68293b3e5c26a470d373506ae
</content>
</entry>
<entry>
<title>YQL-20086 parser (w/o pg)</title>
<updated>2025-06-20T14:10:34Z</updated>
<author>
<name>vvvv</name>
<email>vvvv@yandex-team.com</email>
</author>
<published>2025-06-20T13:21:56Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=e1efda2594290917a9cbef824f5ca242f62a845c'/>
<id>urn:sha1:e1efda2594290917a9cbef824f5ca242f62a845c</id>
<content type='text'>
commit_hash:f4bddb30981abde1a951149fff272d86a22dd726
</content>
</entry>
<entry>
<title>YQL-19747 Detect a token at the caret position</title>
<updated>2025-04-23T12:27:38Z</updated>
<author>
<name>vityaman</name>
<email>vityaman.dev@yandex.ru</email>
</author>
<published>2025-04-23T12:04:48Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=c222f6f103376934dd705e16bf9a3bad66e44365'/>
<id>urn:sha1:c222f6f103376934dd705e16bf9a3bad66e44365</id>
<content type='text'>
When I tried to implement a folder and object names completion at `ID_QUOTED` I faced with a problem, that I actually can't detect, that cursor is at `ID_QUOTED` token because `TCompletionInput::Text` it was cut until the `TCompletionInput::CursorPosition`, therefore at input ``` SELECT * FROM `#` ``` prefix was ``` SELECT * FROM `# ``` and then lexer failed.

While we actually want tokenize the whole current statement, `C3` still needs to receive a prefix as input. I tried to tokenize the whole statement and then on input `SELECT Optional&lt;#&gt;` got nothing because `&lt;&gt;` is solid token in the `SQL`. The only way to fix it I found is to cut a query to prefix until the cursor position.

BTW, current implementation is not so efficient as we tokenize the input multiple times. Especially `SplitQueryToStatemnts` seems heavy. In future we anyway will parse the whole input so will need to design APIs to receive ready token streams to do statements splitting, for example, just not to do the work twice.

![image](https://github.com/user-attachments/assets/114804d3-f311-4a46-be84-8ed4650bc9dd)

So I introduce you the following changes

- [x] Select the whole current statement, not just prefix.
- [x] Find the token at caret and output no candidates when caret is at `STRING_VALUE`, `DIGIGTS` and so on.
- [x] Change `C3` wrapper interface to take `TCompletionInput` to hide an implementation detail that it runs on cut prefix.
- [x] `#` annotated queries in unit tests.
- [x] Detect `CaretTokenPosition` -- if is it enclosed with a token or between two.
- [x] Ensure that `maxErrors` in `ILexer::Tokenize` is positive. Just a tiny bugfix.

---

- Related to https://github.com/ytsaurus/ytsaurus/pull/1209
- Related to https://github.com/ydb-platform/ydb/issues/9056
- Related to https://github.com/vityaman/ydb/issues/14

---

Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1225
commit_hash:a434b9888ec8a7356247d63d9f1420e256ae4fca
</content>
</entry>
<entry>
<title>Intermediate changes</title>
<updated>2025-04-07T18:09:44Z</updated>
<author>
<name>robot-piglet</name>
<email>robot-piglet@yandex-team.com</email>
</author>
<published>2025-04-07T17:58:57Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=25675750186a875635ae4bc00d2433a3b4633e51'/>
<id>urn:sha1:25675750186a875635ae4bc00d2433a3b4633e51</id>
<content type='text'>
commit_hash:6768768ea3a3962231d3fabdffb2ce0db44e9347
</content>
</entry>
<entry>
<title>YQL-19616 Implement ILexer via antlr_ast</title>
<updated>2025-03-19T10:18:48Z</updated>
<author>
<name>Victor Smirnov</name>
<email>53015676+vityaman@users.noreply.github.com</email>
</author>
<published>2025-03-19T10:03:56Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=28b29535ce7b21a3dde60b485c98f66f8c08f882'/>
<id>urn:sha1:28b29535ce7b21a3dde60b485c98f66f8c08f882</id>
<content type='text'>
- [x] Added `antlr_ast/antlr4` module and moved `TLexerTokensCollector4` there from `proto_ast/antlr4`.
- [x] Moved stuff around back and forth.

Ready for a review.

---
Co-authored-by: vityaman [vityaman.dev@yandex.ru]

Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1128
commit_hash:e08785c3408ef813505bdc7511560e9536f4ab79
</content>
</entry>
</feed>
