summaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql
Commit message (Collapse)AuthorAgeFilesLines
* YQL-19616: Generate Vim SQL syntax highlightingvitya-smirnov2025-07-153-5/+10
| | | | | | | | | | Introduced a Vim syntax highlighting for YQL. This is a replacement for an existing almost manually written conguration. It uses regexes generated from the original ANTLR4 grammar. Now only Default lexer mode is supported. commit_hash:85fa094593bd9d80373754a492b46ede1a50148d
* YQL-20171: Fix aggregation joining keyvitya-smirnov2025-07-155-11/+63
| | | | | | | | | | | | | | | | There was a bug with a aggregation deduplication by a column at the translator. For a single column the system joining all aggregations using the generic key. The generic key was just a column name without source name what leads to collision when aggregating multiple different sources with same column names. This patch fixes the generic key by adding a data source name there. Also tests are added. commit_hash:1c0a9da512f68c58d2830e096de76b769b733cb2
* YQL-17269: Fix UNION/EXCEPT/INTERSECT precedencevitya-smirnov2025-07-134-15/+22
| | | | | | | There was a mistake, because actually EXCEPT has the same precedence as UNION. INTERSECT has higher precedence than. commit_hash:20375ef498861c6704571161fa3c4eebf54e895c
* Fixed grammar of the transfertesseract2025-07-104-11/+9
| | | | commit_hash:98f460965618cdddf9fc25373b20741b4e85a303
* YQL-19747: Complete table functionsvitya-smirnov2025-07-1014-45/+200
| | | | | | | | | | | | - Added table functions completion. - Also fixed a bug when USEd cluster was not added to table context at table function argument. - Complete folder names at `prefix` of `LIKE`, `RANGE`, etc. commit_hash:26be383be728796e8431f906e2815acd77645ad4
* YQL-20170 fixvvvv2025-07-091-3/+5
| | | | commit_hash:2c408c6ee755878a488f1591510d196d1bf5fba1
* YQL-19747: Fix query parameters parsingvitya-smirnov2025-07-092-1/+2
| | | | | | I missed that a query parameter key starts with '$'. commit_hash:1a24953b4f837da31db2201b9a9ffd0eef0c6b34
* YQL-17269: Support UNION/INTERSECT/EXCEPT combinationsvitya-smirnov2025-07-098-126/+295
| | | | | | | | | | | | Introduce `UNION` and `INTERSECT/EXCEPT` grammar rules for precedence. Rewrote `Build` procedure into `BuildStmt`, `BuildUnion`, `BuildIntersection`. Added tests, modify format. It took a lot of time trying to adapt the existing `Build` procedure. The I noticed that the logic for `union` and `intersection` is different, since `union` groups arguments into bundles, but `intersection` is a strictly binary operation. commit_hash:70008ae3c2603364b6dfbeeb189fdc7f5237433d
* YQL-19747: Fix binding precence at ID_QUOTEDvitya-smirnov2025-07-093-1/+20
| | | | commit_hash:a497dfe8863a864913c1d6df4b28edbe7d8e4bba
* YQL-19747: Fix FilterText for a named expressionvitya-smirnov2025-07-083-0/+19
| | | | | | Related to <https://nda.ya.ru/t/DMAUQona7GBKMA>. There was a problem with a binding ranking. commit_hash:6dbd96ec883562c4e03778a8487b2843be189ce7
* YQL-20112: Support experimental documentationvitya-smirnov2025-07-049-3/+147
| | | | | | | | | | | | | | | | | | | | LSP supports the following propoerty of the completion item, that supports Markdown format: ``` /** * A human-readable string that represents a doc-comment. */ documentation?: string | MarkupContent; ``` I added docs only for a few items just to check a look in the UI. Also some docs are shortened. Documentation is opt-in decorator for a NameService. Because it is not needed in the YDB CLI, for example. commit_hash:b400ed1224be2906b7fb1da29e9c97aa7578d710
* YQL-19747: Fix small TODOsvitya-smirnov2025-07-0421-174/+163
| | | | | | | | | | | | | - YQL-19747: Remove unused header - YQL-19747: Remove NameSet alias - YQL-19747: Fix identifier typo - YQL-19747: Cosmetics - YQL-19747: Receive NameRequest as const ref - YQL-19747: Remove string_util.h - YQL-19747: Change engine.Complete - YQL-19747: Remove configuration typedef - YQL-19747: Rename context to local commit_hash:451a6ba7c08e670a492222a29463be40a627c867
* YQL-19747: Support LSP FilterTextvitya-smirnov2025-07-035-7/+20
| | | | | | | | | | | | | | | | | | | LSP protocol has a property ``` /** * A string that should be used when filtering a set of * completion items. When omitted the label is used as the * filter text for this item. */ filterText?: string; ``` It is useful, e.g. when we prepend some punctuation at a candidate content, but still want to filter by prefix, ignoring that punctuation. Related to https://nda.ya.ru/t/KCkzjhXS7G3Epg. commit_hash:01f258218d312eef764350bd4d78da15acb8c9ea
* YQL-19747: Support named subquery columnsvitya-smirnov2025-07-033-11/+125
| | | | commit_hash:79ad481a8734a11e954d4a38e1218b17e116700c
* YQL-19747: Respect WITHOUT at schema synthesisvitya-smirnov2025-07-0313-30/+203
| | | | | | | | | Also fixed a bug when the same table used with and without an alias produced duplicated column names. This is incorrect at translator, but anyway we need to handle it gracefully. Also refactored some utility methods like context union. commit_hash:45a12675e865bb9d929e5e5178e16239a763d1f5
* YQL-19747: Respect quotable columnsvitya-smirnov2025-07-037-3/+78
| | | | | | Table can have not `ID_PLAIN` columns and we should return them as `ID_QUOTED`. commit_hash:f5850228a3191ab84e3740fc1c36cf8882b08c40
* YQL-19747: Support JOIN ON, WHERE, GROUP/ORDER BYvitya-smirnov2025-07-025-10/+100
| | | | | | | Before this patch we completed columns only at SELECT projection. Now we complete it at these constructions. Also it respects visibility rules. commit_hash:aa1e6d4900e9b032801ddbf3bcd347750c2939b1
* KIKIMR-23548: Fix sql/v1/reflect for Windowspnv12025-07-011-0/+5
| | | | | Fix sql reflect for windows commit_hash:86917fd6c5887d21e342f6df4ed1fa8700266a9a
* YQL-17269: restrict multiple INTERSECT and EXCEPTkndrvt2025-06-302-23/+69
| | | | commit_hash:635c8def3bba6890d2d80b418fca9bec6cbd4b73
* YQL-19747: Refactor SQL completion enginevitya-smirnov2025-06-2624-297/+336
| | | | | | | | | | | Some refactorings to compact the code: - YQL-19747: Pass TParsedInput to visitor - YQL-19747: Add TParsedInput - YQL-19747: Cosmetics - YQL-19747: Refactor configuration - YQL-19747: Refactor name to candidate mapping commit_hash:44dfe7dc7bcc627ef9c20696077f2d962a3014f6
* YQL-19747: Support qualified asteriskvitya-smirnov2025-06-256-21/+145
| | | | | Support `SELECT x.* FROM t AS x`. commit_hash:64693f65281f385d6c0d3541fb2874b0153aa88c
* YQL-19747: Hack parsing when at an empty idvitya-smirnov2025-06-254-3/+33
| | | | | | | | | | | There was a problem with parsing a query like `SELECT # FROM t`, as it parsed `FROM` as if it is an expeceted column name, so we failed to parse a table name after `FROM` and therefore can not complete column names, while the are so useful at this position. Also this hack improved parsing other queries, according to changed tests. commit_hash:f5a657022a164d1d4bbf906db4bd2ad67bbcd956
* YQL-19747: Fix self-join completionvitya-smirnov2025-06-258-80/+90
| | | | | | | | Fixed a bug on self-join, as table path was used as a key to match columns with tables instead of an alias. commit_hash:0f9735a4c5ba0b2b88efc764bc5e7f5d41633fd8
* YQL-19747: Synthesise subquery columnsvitya-smirnov2025-06-2421-37/+431
| | | | commit_hash:40a2de243a67135e44505619fb766954ba24e2e8
* YQL-17269: support PositionalUnionAll for INTERSECT and EXCEPTkndrvt2025-06-232-20/+62
| | | | commit_hash:4c68311d9e875b6643dd49aae1c385aace4ca978
* YQL-19747: Complete columns from JOINvitya-smirnov2025-06-239-29/+125
| | | | | | | Collect tables with aliases during global analysis and send a multiple requests to a schema provider. commit_hash:51cbc40cee6cda09d5bfe256a0425e7c809c04f5
* YQL-19747: Set cursor shift at completion itemvitya-smirnov2025-06-232-116/+158
| | | | | | | | Set `TCandidate::Shift` for functions and generic types. So now brackets are balanced and UI should adopt it. YDB CLI is ready for the update and just cut off symbols after an expected cursor position. commit_hash:9efc1110869af7be618b841c6c132572b61046a1
* YQL-19747: Fix case sensivityvitya-smirnov2025-06-235-16/+22
| | | | | | | Bug was that titlecase columns are not completed on lowercase prefix, e.g. `SELECT a# FROM x`, where `x = {Age}`. commit_hash:e48f73176e94bcf16671af56d232450e368c9909
* Intermediate changesrobot-piglet2025-06-2310-21/+188
| | | | commit_hash:70eea6b3e17f4aafae5eadb49724ba9036a55372
* YQL-17269: support INTERSECT and EXCEPT without PositionalUnionAllkndrvt2025-06-205-20/+145
| | | | commit_hash:632e24794e8bcf6ef0502b7e8c031e964d28d36a
* Intermediate changesrobot-piglet2025-06-206-37/+103
| | | | commit_hash:67576d4a9e4a1f4bbbb204bcb0b98c255009b1da
* YQL-19747: Load schema from JSON for CLIvitya-smirnov2025-06-191-1/+0
| | | | | | Now it is possible to pass clusters schema via a JSON file using `-s` flag. commit_hash:fd579430968881627c77d4586464952176134dc5
* YQL-19747: Auto-close backtick on not foldervitya-smirnov2025-06-196-19/+39
| | | | | | | | When table `folder/table` exists. On prefix ``` SELECT * FROM `folder/ ``` users want to accept ``` table` ``` rather than just `table`. This patch is about it. commit_hash:12d36cbf037db91f49136ab8e013b160a28b5b1b
* Intermediate changesrobot-piglet2025-06-188-36/+180
| | | | commit_hash:56c7deefce71a95f10a4738b0a51e6ba384dd983
* YQL-19747: Support table aliasesvitya-smirnov2025-06-1811-20/+176
| | | | commit_hash:6d67ec1fa5023083debd89aaa99950019ca37c90
* YQL-20086 sqlvvvv2025-06-1857-8995/+8995
| | | | commit_hash:b06f3d2f5fa81e2073966eb172758758bd94fdf2
* YQL-19747: Support token ignoring patternsvitya-smirnov2025-06-1710-21/+161
| | | | | Added support for token filtration. It is needed because YQL grammar supports multiple systems with various capabilities. For example, some of those do not support `INTERSECT ALL` and therefore `ALL` after `INTERSECT` should be *disabled*. Another example is a support of an only `EVALUATE FOR`, so `FOR` is *forced* to be precendenced by `EVALUATE`. commit_hash:a926c8d3911f8dd025ab58eb7f81e2370fcd9376
* YQL-19747: Complete columns at simple selectvitya-smirnov2025-06-1726-30/+421
| | | | | Added support for a columns completion at a simple select. For example, `` SELECT # FROM hahn.`home/yql/tutorial/users` `` и `` USE hahn; SELECT $ FROM `home/yql/tutorial/users` ``. commit_hash:2254449e91255c19792a1dc521825e44dda7d63b
* YQL-19747: Improve types completionvitya-smirnov2025-06-176-83/+125
| | | | | Instead of relying on keyword sequences provided by C3 and using hacks like pattern matching on keyword sequences (`format.cpp`), emit composite types manually. commit_hash:999d8d4b514433fbdf7885aa0122b2010e985efb
* Intermediate changesrobot-piglet2025-06-162-13/+21
| | | | commit_hash:6e56cbea6a1c12b4f9e6b065eedf177763a329d2
* Intermediate changesrobot-piglet2025-06-1110-36/+23
| | | | commit_hash:6db0e8f89d5131fe035c10bdaa61312e2a3a72db
* Intermediate changesrobot-piglet2025-06-116-48/+9
| | | | commit_hash:c8d74820e197343a1019edeff4f8c21fc5805244
* YQL-19747: Support table completion at CONCATvityaman2025-06-1111-13/+141
| | | | | | | | | | | | --- - Related to `YQL-19747` - Related to https://github.com/vityaman/ydb/issues/62 --- Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1323 commit_hash:ebab6c3290ba984174c85bba35eeb066b53af5aa
* YQL-20068 backport modevvvv2025-06-101-0/+1
| | | | commit_hash:4ad0e146a3e92836d6aec7eaac00ae0225484b09
* Intermediate changesrobot-piglet2025-06-0914-0/+507
| | | | commit_hash:a5cf347a0fdbf87672444c86b9acad24d4ab956a
* YQL-19747: Extract analysis/localvityaman2025-06-0914-14/+40
| | | | | | | | | | | - Related to `YQL-19747` - Related to https://github.com/ydb-platform/ydb/issues/9056 - Related to https://github.com/vityaman/ydb/issues/52 --- Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1321 commit_hash:ef8af2fa618e6fc316d7a6cf348b7f737bb0cfb4
* YQL-19747: Fix some TODOs and Clang Tidy checksvityaman2025-06-0624-48/+49
| | | | | | | | | | | | | | | | | | | Clang Tidy is cool, but too slow ;(. Btw, should we respect `misc-include-cleaner` check? ```bash ya dump compile-commands > /tmp/cc/compile_commands.json find . -type f \( -name "*.cpp" -o -name "*.h" \) -exec clang-tidy {} -p /tmp/cc {} -checks="misc-*" \; ``` --- - Related to `YQL-19747` - Related to https://github.com/ydb-platform/ydb/issues/9056 --- Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1305 commit_hash:c2ecf638062dcdd0730fed3381da4a230f5352c3
* YQL-20053 fix & clarify warningvvvv2025-06-051-2/+2
| | | | commit_hash:98cd4d4370d009f6e71e69219f5b9d89ab3eca9e
* support database settings in ALTER DATABASEdeminds2025-06-0410-17/+208
| | | | | | | | The main goal is to enable setting SchemeLimits (ShardsLimit and PathsLimit) via YQL. Issue: - https://github.com/ydb-platform/ydb/issues/16742 commit_hash:e873849e3b4bb494e349ccebbb1ff6d51655c5d1
* New CHANGEFEED's option: SCHEMA_CHANGESilnaz2025-06-035-0/+29
| | | | commit_hash:23ba332ac8979f2e4e62231fb47414233ee4043e