<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/yql/essentials/tests/sql/sql2yql, 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-06-23T08:17:53Z</updated>
<entry>
<title>YQL-20631: Support WITH CTE columns and fix UNION column order for YqlSelect</title>
<updated>2026-06-23T08:17:53Z</updated>
<author>
<name>vitya-smirnov</name>
<email>vitya-smirnov@yandex-team.com</email>
</author>
<published>2026-06-23T07:46:27Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=ed17a0497e70b70d2d40fe72e8dd8cbe170b77f4'/>
<id>urn:sha1:ed17a0497e70b70d2d40fe72e8dd8cbe170b77f4</id>
<content type='text'>
Implemented a column names specification for a WITH CTE. It requires a
column order derivation. It was not working on `YqlSelect` until PR
https://nda.ya.ru/t/qOC3TNqn7gAcy6 was merged. Also there was a bug
with `UNION` column order inference, which is essential for RECURSIVE
queries. There was compatibility problems with `PgSelect` `UNION`
positional column order semantics, so it was tweaked in `YqlSelect`
mode.
commit_hash:c96192270ca6d51eaa0cb39cf59b65c3951ce3fe
</content>
</entry>
<entry>
<title>YQL-21048: Fix GROUPING SETS aggregation optionality on YqlSelect</title>
<updated>2026-06-22T12:21:21Z</updated>
<author>
<name>vitya-smirnov</name>
<email>vitya-smirnov@yandex-team.com</email>
</author>
<published>2026-06-22T11:37:29Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=13d4d127c6f521bc4aeb20430216838456e67e1c'/>
<id>urn:sha1:13d4d127c6f521bc4aeb20430216838456e67e1c</id>
<content type='text'>
This patch fixes the query &lt;https://nda.ya.ru/t/pYH4zpRH7fw6U4&gt;. If you remove `PRAGMA YqlSelect`,
you'll see that it works on a legacy translation. It is also required to fix PR
&lt;https://nda.ya.ru/t/IZFPoRjS7fw6j8&gt;, because saving a column order makes the bug
visible.

The `nokey` flag of `YqlAgg` callable was renamed to `as_optional` and also an expansion was
fixed by rewriting `MatchType` on `Optional` to `AsOptionalType` to handle `Null` and `pg`
types properly.
commit_hash:dc435437e87006c79bb93984d65931aaf5901af4
</content>
</entry>
<entry>
<title>YQL-21338: Better error message</title>
<updated>2026-06-22T09:58:40Z</updated>
<author>
<name>atarasov5</name>
<email>atarasov5@yandex-team.com</email>
</author>
<published>2026-06-22T08:28:50Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=6aea1ab50afd3a0575b51dfd5f146cd747afcef6'/>
<id>urn:sha1:6aea1ab50afd3a0575b51dfd5f146cd747afcef6</id>
<content type='text'>
#### Better error messages for window frame expressions ✎

- Improved error messaging for RANGE window frames to provide more specific information about unsupported column types and invalid ORDER BY expressions
- Removed obsolete error handling for multiple sort columns and simplified the sort traits variant
- Enhanced error reporting with detailed type information when RANGE frames are used with non-numeric or complex expressions
- Added better handling for error types in ORDER BY expressions with improved diagnostic messages including nested error details
- Updated error messages to be more descriptive and actionable, showing the actual column type causing the issue
- Added new test cases covering various error scenarios including NULL types, optional types, and invalid expressions

&lt;a href="https://nda.ya.ru/t/qa0kX64r7DqvtN"&gt;&lt;font size="2"&gt;Autodescription by Yandex Code Assistant&lt;/font&gt;&lt;/a&gt;
commit_hash:1d2301ac75b3ff7bc9ca97213e9005507654e56b
</content>
</entry>
<entry>
<title>YQL-20631: Support RECURSIVE WITH CTE on YqlSelect</title>
<updated>2026-06-19T13:23:50Z</updated>
<author>
<name>vitya-smirnov</name>
<email>vitya-smirnov@yandex-team.com</email>
</author>
<published>2026-06-19T12:39:51Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=3d79ff71a5cb0a74ef11f187827a2955ff83b355'/>
<id>urn:sha1:3d79ff71a5cb0a74ef11f187827a2955ff83b355</id>
<content type='text'>
Implemented a RECURSIVE WITH CTE translation for YqlSelect. It relies on YqlSelf callable.
As this callable binds to enclosing YqlSelect, the diagnostic that subquery can't reference
an enclosing RECURSIVE WITH CTE was added, it is better, that an existing for pgSQL, where
just "table not found" is emitted. The core idea under RECURSIVE handling is that a
"not ready" CTE entry is added to a namespace (with a `nullptr` node), so it can be recognized.
Checked some interesting test cases and wrote TODOs.
commit_hash:65b8646e0615ae070b04822ce7af24245c203bbe
</content>
</entry>
<entry>
<title>YQL-20631: Support simple CTEs on YqlSelect</title>
<updated>2026-06-18T15:30:10Z</updated>
<author>
<name>vitya-smirnov</name>
<email>vitya-smirnov@yandex-team.com</email>
</author>
<published>2026-06-18T14:54:12Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=4265d9121fd0635072e106e1895db92e900e7508'/>
<id>urn:sha1:4265d9121fd0635072e106e1895db92e900e7508</id>
<content type='text'>
The first iteration on WITH CTE support. Only simple CTEs are supported.

Properties:

1. Redefinition is forbidden.

2. Shadowing is supported.

3. Nested WITH CTEs are supported.

Following features are not yet implemented:

1. Column names specification. There is an assertion failure at core because
   of an absent column order when translating it like for the `PgSelect`.

2. `RECURSIVE` is postponed. There a more sophisticated translation with
   `YqlSelf` callable is required.

Also there was a potential defect because of an empty `Id` result not expected.
commit_hash:759676d8a9d369f7eedd9b87f79455b2f8a9fcff
</content>
</entry>
<entry>
<title>YQL-21321 don't check for persistable in agg traits typecheck</title>
<updated>2026-06-17T14:11:06Z</updated>
<author>
<name>vvvv</name>
<email>vvvv@yandex-team.com</email>
</author>
<published>2026-06-17T13:18:16Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=1dc1af5ba71b39a84ce19c531754c2ff6ab40f4c'/>
<id>urn:sha1:1dc1af5ba71b39a84ce19c531754c2ff6ab40f4c</id>
<content type='text'>
#### `YQL-21321`: Adjust type checking for aggregate traits ✎

- Replaced persistable type check with computable type check during aggregate trait validation to allow more flexible type handling
- Added new test cases to verify the behavior of unused aggregate types and ensure proper error reporting
- Updated canonical data and test artifacts to reflect the changes in type checking logic and error messages

&lt;a href="https://nda.ya.ru/t/qa0kX64r7DqvtN"&gt;&lt;font size="2"&gt;Autodescription by Yandex Code Assistant&lt;/font&gt;&lt;/a&gt;
commit_hash:e14b06e4a135d9aef8ae78a75c3fb23d983365a6
</content>
</entry>
<entry>
<title>Use Cons! in translator instead of Nth</title>
<updated>2026-06-17T10:32:02Z</updated>
<author>
<name>udovichenko-r</name>
<email>udovichenko-r@yandex-team.com</email>
</author>
<published>2026-06-17T09:58:18Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=d99b446e78afeb6e40e8d3bee4ad2ac25a2c9450'/>
<id>urn:sha1:d99b446e78afeb6e40e8d3bee4ad2ac25a2c9450</id>
<content type='text'>
commit_hash:ec28efb62da755bd372bba274c8eaa0f3f5233f3
</content>
</entry>
<entry>
<title>YQL-21321 deep error check for EnsurePersistable</title>
<updated>2026-06-16T18:49:43Z</updated>
<author>
<name>vvvv</name>
<email>vvvv@yandex-team.com</email>
</author>
<published>2026-06-16T18:30:14Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=d679a4ab25b8cbb1467dce648a9c986488f3f3b8'/>
<id>urn:sha1:d679a4ab25b8cbb1467dce648a9c986488f3f3b8</id>
<content type='text'>
#### Deep error checking for EnsurePersistable ✎

- Replaced shallow error checking with comprehensive error detection in `EnsurePersistable` functions to ensure all type annotation errors are properly identified
- Introduced new `HasAnyError` function that performs thorough error traversal to catch nested or indirect type errors
- Updated test cases to verify error handling behavior and ensure proper error reporting for incompatible types in SQL operations
- Enhanced type annotation validation to provide more reliable persistence checks for expression nodes

&lt;a href="https://nda.ya.ru/t/qa0kX64r7DqvtN"&gt;&lt;font size="2"&gt;Autodescription by Yandex Code Assistant&lt;/font&gt;&lt;/a&gt;
commit_hash:019e5924e7d6bdfea7fa46be3da3615b17727b76
</content>
</entry>
<entry>
<title>Fix PayloadRenameOverWindow in overwrite case</title>
<updated>2026-06-11T11:41:03Z</updated>
<author>
<name>aneporada</name>
<email>aneporada@yandex-team.com</email>
</author>
<published>2026-06-11T10:38:19Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=8356c1b439ac6fd7dc59f701ac87f097dcdfc0d6'/>
<id>urn:sha1:8356c1b439ac6fd7dc59f701ac87f097dcdfc0d6</id>
<content type='text'>
commit_hash:867eb4209058a877aa60f86931daddf1e25ac600
</content>
</entry>
<entry>
<title>YQL-21297: Handle Interval64 in aggregate/window</title>
<updated>2026-06-10T17:56:59Z</updated>
<author>
<name>vitya-smirnov</name>
<email>vitya-smirnov@yandex-team.com</email>
</author>
<published>2026-06-10T17:03:20Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=d1f00dc0bfb1793999bfd784fa4f4c85b6e0aa4f'/>
<id>urn:sha1:d1f00dc0bfb1793999bfd784fa4f4c85b6e0aa4f</id>
<content type='text'>
commit_hash:10c8d54083c7064e63989ad9c341711fe84409b4
</content>
</entry>
</feed>
