summaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql
Commit message (Collapse)AuthorAgeFilesLines
* YQL-19747 Complete Function Namesvityaman2025-03-2832-291/+517
| | | | | | | | | | | - Function names are suggested now - Changed the module structure - Checking ruleIndex independence on mode (ansi | default) via unit tests --- Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1163 commit_hash:1b1a27d2cff8db663c5c7e8efb57896476823315
* YQL-19747 sql functionsvvvv2025-03-282-394/+437
| | | | commit_hash:9f628fe1894ee7dcdcbdd161855b668ca6e7380f
* YQL-19616 Convert YQL lexer grammar to regexesvityaman2025-03-2820-64/+1263
| | | | | | | | | | | | | | | | | - [x] Parse YQL grammar to extract lexer grammar into `TLexerGrammar`. - [x] Translate `TLexerGrammar` into regexes. - [x] Implement a lexer via regexes `TRegexLexer` to test generated regexes validity. - [x] Test on `Default` syntax mode. - [x] Test on `ANSI` syntax mode. --- - Related to https://github.com/ydb-platform/ydb/issues/15129 - Requirement for https://github.com/ytsaurus/ytsaurus/pull/1112 --- Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1127 commit_hash:03ffffe81cdafe7f93a4d3fd9a3212fe67f1c72d
* YQL-19747 Complete a simple type namevityaman2025-03-2819-38/+544
| | | | | | | | | - Related to https://github.com/ydb-platform/ydb/issues/9056 --- Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1151 commit_hash:6e1e429a2ea805016bf00a1e60b501b7fc8dc8de
* YQL-19747 Split statementsvityaman2025-03-279-32/+127
| | | | | | | | | | | | When we run completion engine on multi-statement query, where preceding statements are syntactically incorrect, `antlr4-c3` does not return candidates. Running engine only on a current statement provides a best-effort attempt to provide candidates. - Related to https://github.com/ydb-platform/ydb/issues/9056 - Depends on https://github.com/ytsaurus/ytsaurus/pull/1127 (`ELexerFlavor`) --- Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1144 commit_hash:0ced9443a9712191f5420246531f781ca4bc5f42
* YQL-19716: Fix Block Readermrlolthe1st2025-03-211-1/+6
| | | | commit_hash:61891dc030f4c526542b5e7e070d1660880e6c08
* YQL-19746 fixvvvv2025-03-204-6/+17
| | | | commit_hash:49e5e33ed38f7fd623cef80d2765d464a353ff9c
* YQL-19616 Implement ILexer via antlr_astVictor Smirnov2025-03-1917-23/+172
| | | | | | | | | | | | | - [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 [[email protected]] Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1128 commit_hash:e08785c3408ef813505bdc7511560e9536f4ab79
* Added settings of create transfer statement: flush_interval, batch_size, ↵tesseract2025-03-191-1/+12
| | | | | | | consumer_name <https://github.com/ydb-platform/ydb/pull/15770> commit_hash:f9e7a01a29938b4bec4aacdaa4e116101326f7da
* YQL fix complete logicvityaman2025-03-182-23/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Why these changes are proposed? I figured out that all this time I did not understand how `antlr4-c3` really works. It is configured with ```ts ignoredTokens: Set<number> preferredRules: Set<number> ``` On completion, it returns ```ts class CandidatesCollection { tokens: Map<number, TokenList> rules: Map<number, ICandidateRule> } class ICandidateRule { startTokenIndex: number ruleList: RuleList } type TokenList = number[] type RuleList = number[] ``` I thought that `rules` is a mapping from a `TokenId` to a `ParserCallStack`, but it totally is not true, as `rules` key is in fact a `RuleId`. The documentation says > Whenever the c3 engine hits a __lexer token__ ... it will check the call stack for it and, if that contains any of the **preferred rules**, will select that **instead** of the __lexer token__. > [Preferred] Rules which replace any candidate token they contain. So when we add the rule `X` to `preferredRules`, then when `C3` hits a lexer token with a `Parser Call Stack` containing the rule `X`, it will not add it to `CandidatesCollection::tokens`, but instead it will add an entry to `CandidatesCollection::rules` with a `Parser Call Stack`. It used when we have `ID_PLAIN` in a grammar, but this `ID_PLAIN` has different meaning depending on the context (`Parser Call Stack`), e.g. it can be a Table Name, Column Name and so on... So we can ask C3 not to include `ID_PLAIN` in `CandidatesCollection::tokens`, but instead emit `rules` like `table_id`, `column_id` and so on into the `CandidatesCollection::rules`. So we have a `Parser Call Stack` for `rules`, but not for `tokens`. ## How it works correctly now then? Described in the comments section. ## How to live on? - [BAD ] Make a rule for each token to capture keywords at `CandidatesCollection::rules`. - [GOOD] Extend `antlr4-c3` to include `Parser Call Stack` for `CandidatesCollection::tokens`. --- Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1131 commit_hash:1a954f55098b9c090ab87e88f8bee61d9ff319ed
* YQL-19712 RuntimeLogLevel setting, mrjob loggervvvv2025-03-183-0/+23
| | | | | init commit_hash:6178c9e20a737d499b13f1b38fdfb621f2d8db2f
* YQL-19701 linter extension for unknown clustersvvvv2025-03-132-3/+7
| | | | commit_hash:79c042af0cf2c51389b5a22bd866cd211b6acf64
* view: use parent context for query AST buildingdeminds2025-03-114-69/+70
| | | | | | | | | | | | | | | | | | Issues: * <HIDDEN_URL> * <https://github.com/ydb-platform/ydb/issues/14709> Previously it was impossible to create a simple view like the following: ```sql CREATE VIEW demo_view WITH (security_invoker = TRUE) AS SELECT "bbb" LIKE Unwrap("aaa") ``` The problem was caused by the fact that a separate parsing context was used to build a view select AST for later validation. The list of UDFs is global for the whole parsing process to optimize the calculations. This global list was lost in the separate context and the view validation failed in such cases. We fix the issue by using the same context for the view query validation in which the `CREATE VIEW` statement is executed. Moreover, we have started capturing all the statements in the view query text that can affect the compilation (see the `NeedUseForAllStatements` function). commit_hash:f84d54ff1688fb43af7170a4db35f6729f2c4f10
* YQL-19212 more fixes to translator for case insensitive udf namesvvvv2025-03-101-12/+18
| | | | commit_hash:b73ddecc5bdf4eb52cb62f9ba551c72e2d2d3e73
* Fix bug in ALTER USER with set null passwordflown4qqqq2025-03-064-24/+106
| | | | | До этого, при любом запросе ALTER USER без опции PASSWORD выставлялось значение Null Password как дефолтовое - это баг, потому что при модификации пользователя не надо выставлять вообще никакого значения. commit_hash:3cb3d5bb3e9487439787deb9102cd0105b6b9e82
* ignore wildcard warning policy during replayvvvv2025-03-032-0/+2
| | | | commit_hash:2632b064e7883e55cb1876761b7404ace9e77590
* Change the text of error for create user with password.flown4qqqq2025-03-024-20/+78
| | | | commit_hash:6631b600dda026c616983f0b08daa912beb0f5db
* Intermediate changesrobot-piglet2025-02-2816-0/+991
| | | | commit_hash:5fc851d2c72810067fe0d407b66535b17de63129
* Intermediate changesrobot-piglet2025-02-284-16320/+8363
| | | | commit_hash:6de10ee070edbce022e46ebcc3c5740ed2f84b10
* refine Antlr depsvvvv2025-02-2720-201/+83
| | | | | refine Antlr deps commit_hash:71b99424edb283bf56be6e79c9c9a19d805ce2ce
* Switch to library/cpp/charset/lite to avoid dependency on libiconvaneporada2025-02-272-2/+2
| | | | commit_hash:787f4898632b0109fb15fa3f6bbd993430f47616
* YQL-19626 reexport of symbols, better issues from librariesvvvv2025-02-251-4/+0
| | | | commit_hash:051b3854a032e0f7803ad23c03dfbf7f71590cc2
* YQL-18303: Introduce Parse64 functionimunkin2025-02-251-2/+0
| | | | commit_hash:f2068081a3ddfb16f531239f3e0dcc923084d3b0
* YQL-19129 soft WITHOUTvvvv2025-02-216-11/+22
| | | | commit_hash:563aebc32ae87bc18e5e3e38babc034e5e89e2c1
* YQL-19594 Explicit lexers & parsers 2vvvv2025-02-2112-24/+124
| | | | commit_hash:2aa733486a55a04c39ff8bb1c7eaca3a85719647
* Drop internal v0 depsvvvv2025-02-203-63/+4
| | | | commit_hash:d5e60311a1b50570d1c9eb4a7a1620e9881c1a4e
* YQL-19594 Explicit lexers & parsersvvvv2025-02-1918-57/+212
| | | | commit_hash:6be543b7c5bff6ee474ee606c920197fb2569767
* Introduced lexer & parser interfacesvvvv2025-02-1832-154/+685
| | | | commit_hash:fee365c90a176dd33a967cee20994b21d530080c
* YQL-19612 format for value_constructorvvvv2025-02-182-0/+63
| | | | commit_hash:d31d086ec6fffa8aff47fc22a3921e2a15cd9008
* refactor SQL translators YQL-19594vvvv2025-02-166-18/+42
| | | | commit_hash:401d21dd23ee9bb7ee52b2fc42e596cb3e4bdda7
* MR: support projection of aggregations in MEASURESvokayndzop2025-02-144-142/+167
| | | | commit_hash:33457c2eb4b38c16a6b4c7dc3c2a90c588275f2f
* Introduced SQL ITranslatorvvvv2025-02-1413-34/+326
| | | | commit_hash:f58b2fb436f14fc4a11ce2e315f10d71e6d1ec77
* Fix bugs with parsing alter database (+add ut on compiling)flown4qqqq2025-02-115-8/+6
| | | | commit_hash:7e6d742dce448b1c5f815abebd781049e7b22b46
* Support SHOW CREATE TABLE statementshumkovnd2025-02-1110-1/+150
| | | | commit_hash:01d41da47d238ae4a86642bd8cdb8c245d9c503a
* Antlr4 by defaultvvvv2025-02-111-5/+1
| | | | commit_hash:4bb3d1eae5900487d115a0fab098dd0b7b240641
* YQL-19553 CLI for yql lintervvvv2025-02-103-9/+9
| | | | | init commit_hash:a21a71769ad2095e40909c69255a3cf38eabc179
* YQL-19553 initial implementation of YQL lintersvvvv2025-02-076-7/+8
| | | | commit_hash:70690bcdabf0bcfe095fb10e9e58717281d11d53
* Introduce ytflow providerngc2242025-02-063-0/+52
| | | | commit_hash:58d01c10ee3254aa66a6f5f68e1563faeb70cc0b
* init commitflown4qqqq2025-02-0511-0/+159
| | | | commit_hash:0564ecb94145bde9e411b0f6786c93e4e5d1d503
* YQL-19545 fixed indents for ??vvvv2025-02-042-4/+14
| | | | commit_hash:ab832f6789d55200e094cc4fdfd75499e58d62c1
* YQL-19530 pass cpu & mem settings to Udf/ScriptUdfvvvv2025-02-035-41/+169
| | | | commit_hash:21577e2038f1d80c16e671d74e0c9e1e00b6c448
* Fix comment line count calculationzhvv1172025-01-312-5/+19
| | | | commit_hash:b18a35e909cfd6662088765125b0d6f3dcf83c15
* YQL-19496 fixed INode clonevvvv2025-01-303-20/+22
| | | | commit_hash:3433b67a9455f9f7388eb5079f752d4a745bc2bc
* Do not remove newlines from type description in table hintszhvv1172025-01-302-1/+3
| | | | commit_hash:583776586a8abaa44b1dd77e7dd2bd9e7c1c5031
* MR: aggregation in MEASURESvokayndzop2025-01-2914-658/+958
| | | | commit_hash:5357736eed7a221ff5844d4351abe23e65930632
* EXISTS with tables YQL-19496vvvv2025-01-293-2/+21
| | | | commit_hash:76639a66853d8a9d514e4b11f47e14e2d26e26c4
* fix bug in Create/Alter user parserflown4qqqq2025-01-291-4/+2
| | | | commit_hash:9351f0faef5a7f2aa19d90fd5a8f4fbb843719c5
* more tests YQL-19494vvvv2025-01-281-0/+1
| | | | commit_hash:b84e0c56b3f112416d4d0e6bfa8f6997f59e9d70
* DynamicVariant YQL-19499vvvv2025-01-241-0/+1
| | | | commit_hash:b609442fce4217e33f5d5421582e4a145afde95d
* Add option 'HASH' into CREATE USERflown4qqqq2025-01-2410-181/+331
| | | | | | | | | | | | | Need for: <https://github.com/ydb-platform/ydb-rfc/blob/main/backup_fstek.md> ``` CREATE USER my_user HASH ' {"hash": "p4ffeMugohqyBwyckYCK1TjJfz3LIHbKiGL+t+oEhzw=", "salt": "U+tzBtgo06EBQCjlARA6Jg==", "type": "argon2id" }' ``` commit_hash:a0c695c2e2f7f794e5c4db978fe33a7bfea59e2c