| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current `SQLv1` translation produces relatively low level `YQLs`
constructions that are hard to match during later optimizations, for
example, subqueries unnesting. Also it assumes that expressions are only
depend on corresponding source row, which is not true for correlated
subqueries. Both limitations blocks currelated subqueries implementation.
Although the problem exists for `SQLv1`, it is already solved for `PG`
syntax. There PostgreSQL-produced AST is converted to special `YQLs`
"bulk select" node called `PgSelect`. It is more declarative and
expanded later than translation. This fact helped to support correlated
subqueries, which with `PgSelect` are type-checkable and decorrelatable
(not generally, but heuristically).
This patch is the first step forward to "bulk select" translation
for `SQLv1`. As there are a lot of code already written for `PgSelect`
and `PG` and `SQLv1` relatively similar, I decided to rebrand `PgSelect`
into more general `SqlSelect` node. It seems that for some near future
goals `PgSelect` should be enough.
There was 2 problems solved:
1. `PgSelect` comes with `OrderedColumns` by default and its
implementation tightly coupled with it.
2. `PgSelect` does Pg type casts.
This patch contains following changes:
- Added pragma `YqlSelect = 'disable' | 'auto' | 'force'`
- Added `YqlSelect` (`PgSelect` alias) translation
- Changed `PgSelect` wrappers to support `YqlSelect`
- Changed `PgSelect` expanders to support `YqlSelect`
commit_hash:8a55d63e06c22592b2029dd260bbd259194e92dc
|
|
|
|
| |
commit_hash:cbb6bbe39c72e2322d57a38ded86cda07c68a419
|
|
|
|
| |
commit_hash:a6b640bc576263b62884a0b4187ba79c893e13d9
|
|
|
|
| |
commit_hash:9199da15c695cf5c8a492750a8bcfbb0f31c0b34
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pragma
Новая кост-функция для cbo. Под флагом чтобы удобнее сравнивать со старой.
2 изменения:
- Для оценки размера входных таблиц используется поколоночный dataweight (если есть), а не таблица целиком
- В самой кост-функции убран outputSize, чтобы он не учитывался дважды: он неявно учтен в каждом следующем джоине как левый либо правый inputSize, а размер результата последнего джоина не зависит от перестановки джоинов
commit_hash:d130848393114b1b4383035381dba7767aac62fb
|
|
|
|
| |
commit_hash:edf72fd8386c41f858f677152612bd58680506a6
|
|
|
|
| |
commit_hash:19bbcd26d46a4ca8d18f0dbae605b48ac823c614
|
|
|
|
| |
commit_hash:55bc611cdaa0d8a0fc3c4c7708ed9f17cc4976cf
|
|
|
|
|
| |
KIKIMR-24054
commit_hash:b7c840d6f25ec732f818f8760e8ce8819393901e
|
|
|
|
|
|
| |
- Ignored 2 known ambiguities.
- Tested tools.
commit_hash:9e29bb2f876dabc68293b3e5c26a470d373506ae
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a style check for `yql/essentials/sql/v1`.
To format use `ya style`.
To test use `ya test ya test --test-type clang_format`.
To enable style checking in a module, need to add:
`ENABLE(YQL_STYLE_CPP)`. So in a such way we gradually will
format all YQL modules, expect those, where fluent YQL-builders
are used. Then we will revert activation macro, so switch from
`ENABLE(YQL_STYLE_CPP)` to`ENABLE(YQL_STYLE_CPP_XFAIL)`.
Guide: <https://nda.ya.ru/t/XzkoRIGg7KjXmq>.
commit_hash:fa758a214e094c74821fe896184f30483dd18c55
|
|
|
|
|
|
|
|
|
|
|
| |
- Alter grammar to support inline subqueries.
- Support inline subqueries in `sql/v1` (translator).
- Introduce `sql/v1/proto_ast/parse_tree.h` for reusable parse tree predicates.
- Support inline subqueries in `sql/v1/format`.
- Support inline subqueries in `sql/v1/complete`.
- Add some SQL-tests.
- Pass all tests.
commit_hash:075b2240778d071e1c7542f912d3cc83019ef849
|
|
|
|
| |
commit_hash:dba6cae7baee068a70013da4dc3377a10f2d4d22
|
|
|
|
|
|
|
| |
Monarch regex engine is so slow on regexes like
`([A-Z]|[a-z]|_|[0-9])*`, but works well on
`([A-Za-z_0-9])*`. So such optimization is added.
commit_hash:b749e59818a20d7fd1d1ba21b233e1467e9d6ced
|
|
|
|
|
| |
So now both `AsTable` and `AS_TABLE` work.
commit_hash:ae8c33f44e7b10de02a9d979373f4b0602ff0b12
|
|
|
|
|
|
|
| |
If you think that this pr has broken something for you, roll it back
If the problem is not trivial, come to [support](https://nda.ya.ru/t/a1JIzEbo78mtfQ)
Original errors you can see [here](https://nda.ya.ru/t/pFJQM0ho7KSaTN
commit_hash:77d426cfbc646733517e14e69ac61a1afedaf82f
|
|
|
|
|
| |
part of https://github.com/ydb-platform/ydb/issues/23384
commit_hash:dc3c331d4054a7739ca632ddce312c985d4b8a13
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Проблема в следующем.
Есть запрос:
```sql
CREATE TABLE series_with_families (
series_id Uint64,
title Utf8,
series_info Utf8 NOT NULL FAMILY family_large,
release_date Uint64,
PRIMARY KEY (series_id),
FAMILY default (
DATA = "ssd",
COMPRESSION = "off"
),
FAMILY family_large (
DATA = "rot",
COMPRESSION = "lz4"
)
);
```
Такой запрос является на данный момент неверным на уровне грамматики. Ругается на строку \``series_info Utf8 NOT NULL FAMILY family_large`\` Однако запрос, в котором NOT NULL и FAMILY поменяны местами, отрабатывает корректно:
```sql
CREATE TABLE series_with_families (
series_id Uint64,
title Utf8,
series_info Utf8 FAMILY family_large NOT NULL,
release_date Uint64,
PRIMARY KEY (series_id),
FAMILY default (
DATA = "ssd",
COMPRESSION = "off"
),
FAMILY family_large (
DATA = "rot",
COMPRESSION = "lz4"
)
);
```
В этом Pull Request'е я меняю грамматику таким образом, чтобы была возможность задавать "опции" колонки (DEFAULT, NOT NULL, FAMILY).
Особое внимание стоит обратить внимание на тест `CreateTableDefaultAndNotNullInOrderSpace`: в нем показывается, что можно использовать синтаксис
```sql
CREATE TABLE tbl (
k Uint64,
v Bool DEFAULT false NOT NULL,
PRIMARY KEY (k)
);
```
И такое поведение означает именно DEFAULT (false NOT NULL), то есть DEFAULT true. Дело в том, что выражение "false NOT NULL" эквивалентно "false IS NOT NULL", что является, безусловно, истиной. Ровно для того, чтобы была вообще возможность одновременно указать и default, и not null, было добавлено расширение синтаксиса: теперь можно указывать скобки для указания опций столбца, а сами опции внутри них можно перечислять через запятую:
```sql
CREATE TABLE tbl (
k Uint64,
v Bool (DEFAULT false, NOT NULL),
PRIMARY KEY (k)
);
```
Запрос выше означает, что столбец должен по умолчанию заполняться false'ами, но при этом он должен быть NOT NULL.
commit_hash:67cc27a5fe6ae73f8725b051b232c2ca0d1ec54f
|
|
|
|
|
| |
init
commit_hash:479f16e9cd255b616573d811910403290f9ef656
|
|
|
|
| |
commit_hash:0241dcec17f0a9b9cf2abfc955a4af169084c387
|
|
|
|
|
| |
init
commit_hash:ededd246fa929931de6e89fd5f809157d9fe4d16
|
|
|
|
|
| |
без langver, т.к. может быть использована для починки оптимизаторов, где при раскрытии List-ов из воздуха рождается Iterator а потом все заканчивается Collect
commit_hash:21cb9b9454cb255b476d50bdb8c5db150cd773fd
|
|
|
|
| |
commit_hash:3d0e8bfb46470e6ac36b0d198cfa1723c665f643
|
|
|
|
|
| |
init
commit_hash:1c72053b3785a26cfde418f28a9d054b5a624627
|
|
|
|
|
|
|
| |
Related to
- https://github.com/ydb-platform/ydb/pull/25090
- https://github.com/ydb-platform/ydb/issues/21470
commit_hash:f97a6414f95b706c34a086d4431367909dfd35a4
|
|
|
|
|
|
|
| |
It seems that there is no much sence in parsing (vector) index settings, and it is much easier to pass them as is
It will much help in adding fulltext index with dozens of parameters
commit_hash:ba3d7b32d60f54dd6c8f0aba116a10450455d68b
|
|
|
|
| |
commit_hash:95bd6eff4013fca11cfe9e941b6175d93c310bdd
|
|
|
|
| |
commit_hash:c2440ce49cc8c7637134ddf8081b32251ff75fd4
|
|
|
|
| |
commit_hash:05d53dee40119ad1d756d90775e6056fbebd99d2
|
|
|
|
|
|
|
| |
Thet top-level source was always selected for
column inference, even when the cursor is at a
subquery.
commit_hash:c0eb00b98b23d52079aea5eb8d646887ff2fbbdd
|
|
|
|
| |
commit_hash:b3270397329599800d4e7b1f92b8e0f18e94cfd6
|
|
|
|
|
|
|
| |
перенос валидации параметров векторного индекса из YQL в YDB (https://github.com/ydb-platform/ydb/pull/23204), потому что аналогичные создания индекса могут происходить и из SDK, и делать бы две разных валидации было бы странно
соответственно тут остался только фикс параметров не того типа, а валидация убрана совсем (все параметры опциональные, провалидируются дальше)
commit_hash:5418e97f75e30ea8acdfe99243c0a96ef79be5d1
|
|
|
|
|
|
|
|
|
|
|
| |
Also added tests for:
- max_by
- agg_list
- some
- avg_if
- sum_if
- count_if
commit_hash:0da4f3b9b1767850e65c914b727bc362cf4cc125
|
|
|
|
| |
commit_hash:3b74a89e67fd29fdced780847365861db726b687
|
|
|
|
|
| |
Follows up ydb-platform/ydb@34fcd78a2d18d9846fd68339c8e240702857e1e5
commit_hash:08520ae8b837c69f6b92e575882da4786aa441fd
|
|
|
|
|
|
|
| |
Cleared world dependency for streaming queries
Supported top level pragmas for streaming queries
commit_hash:2bf7256ee9ff7bba724c76acf7086db014a96afd
|
|
|
|
| |
commit_hash:a8645f7215087df3309048de31a7f0b3dc802a11
|
|
|
|
| |
commit_hash:7007950c8dbbf4d1c8edd5c275eaea723e29e56b
|
|
|
|
|
|
|
| |
Добавлена возможность отключения отложенного применения '\\n' и '\\r' в TextWalker, чтобы позиции генерируемые им были в точности равны позициям токенов от antlr4 лексера:
<https://nda.ya.ru/t/hmKq_iWN7JVCGe>
commit_hash:15049d23b9ac1232b9e1d281d86d6b51d5822f85
|
|
|
|
| |
commit_hash:39b07bbc84e57d9df02c839273366c28442b789f
|
|
|
|
|
|
| |
There was an issue that a query with warnings
as errors passed translation.
commit_hash:890d18853380b5ad669e9684553cdb6991827cff
|
|
|
|
| |
commit_hash:27dc40f323e5d24af0dae4f3917a63248f8f8386
|
|
|
|
|
|
| |
Added absent checks for `langVer` at `EXCEPT/INTERSECT/DISTINCT`
translation. In next PR will get rid of `.sqlx` file extensions.
commit_hash:699cc8f6084d1d2fc19ecd53c35a56496dc842f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Добавлен синтаксис (переиспользован код для inline action):
```
CREATE [OR REPLACE] STREAMING QUERY [IF NOT EXISTS] query_name [WITH (
key = value
...
)] AS DO BEGIN
...
END DO;
ALTER STREAMING QUERY [IF EXISTS] query_name [SET(
key = value
...
)] [AS DO BEGIN
...
END DO];
DROP STREAMING QUERY [IF EXISTS] query_name;
```
commit_hash:29fa6aa7e61ecf45112480fe3c1df8fab542354e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an improvement for column suggestions.
Even when user made a source aliased, he still is
able to reference a column with both unqualified
and qualified name, so we should provide both
candidates, but with unqualified more relevant.
As this patch required non trivial `NameResponse`
modifications at the `CompletionEngine`, ranking
should be used properly, so a way to pass it to
the engine was introduced.
commit_hash:1f2b90e2f6fbb7d33d9fc8479f43349a7f08c320
|
|
|
|
| |
commit_hash:2fc8e4b885a4426726d34aa7a80bb62e747462e2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Can I use your `soroka` for push YQL part of a new feature for YDB, please?
[There](https://github.com/ydb-platform/ydb/pull/21672) is the original PR approved by Fomichev an Puchin which can't be committed directly to YDB github.
Type: feature
Component: yql
---
Co-authored-by: Tony-Romanov [[email protected]]
Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1414
commit_hash:c98a7b656a050b09976f22f1470ba0ab5bbb52c2
|
|
|
|
|
|
| |
RFC: https://nda.ya.ru/t/vPsncOoC7HttdF
GitHub Issue: https://github.com/ydb-platform/ydb/issues/18695
commit_hash:96445a9aef7b1fede372b9e4c60b30eb9ef5fdc1
|
|
|
|
|
|
|
| |
Fixed an absence of candidates at `$x = (sel#)`
as of `subselect_stmt` ignorance at the
`YQLConfiguration`.
commit_hash:5a841d63fad104599a791953f2f89b8791816115
|
|
|
|
|
|
| |
- Collect only named node definitions
- Fix qualified column after WHERE
commit_hash:641977921329199e645c3ac45ae8053a5d0e8b13
|