diff options
| author | vityaman <[email protected]> | 2025-04-10 17:08:20 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2025-04-10 17:35:51 +0300 |
| commit | 473f2869597653cf26c8582095d1d9a805cb66fb (patch) | |
| tree | f6afcec18b8aa4615143870629a54490640c0bdd /yql/essentials/sql/v1/complete/sql_complete_ut.cpp | |
| parent | ad6f8c8e4e2fa19203ed9f28d4eb74827e937d3e (diff) | |
YQL-19747 Complete read hints on PROCESS and REDUCE
Forgot to support it.
- Related to https://github.com/ydb-platform/ydb/issues/9056
- Related to https://github.com/vityaman/ydb/issues/24
---
Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1195
commit_hash:a2f5937dbca5712f3ecbfccdf66662ce99e70619
Diffstat (limited to 'yql/essentials/sql/v1/complete/sql_complete_ut.cpp')
| -rw-r--r-- | yql/essentials/sql/v1/complete/sql_complete_ut.cpp | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/yql/essentials/sql/v1/complete/sql_complete_ut.cpp b/yql/essentials/sql/v1/complete/sql_complete_ut.cpp index 4e3b84be617..dd7145169c1 100644 --- a/yql/essentials/sql/v1/complete/sql_complete_ut.cpp +++ b/yql/essentials/sql/v1/complete/sql_complete_ut.cpp @@ -477,14 +477,29 @@ Y_UNIT_TEST_SUITE(SqlCompleteTests) { } Y_UNIT_TEST(SelectTableHintName) { - TVector<TCandidate> expected = { - {Keyword, "COLUMNS"}, - {Keyword, "SCHEMA"}, - {HintName, "XLOCK"}, - }; - auto engine = MakeSqlCompletionEngineUT(); - UNIT_ASSERT_VALUES_EQUAL(Complete(engine, {"SELECT key FROM my_table WITH "}), expected); + { + TVector<TCandidate> expected = { + {HintName, "XLOCK"}, + }; + UNIT_ASSERT_VALUES_EQUAL(Complete(engine, {"PROCESS my_table USING $udf(TableRows()) WITH "}), expected); + } + { + TVector<TCandidate> expected = { + {Keyword, "COLUMNS"}, + {Keyword, "SCHEMA"}, + {HintName, "XLOCK"}, + }; + UNIT_ASSERT_VALUES_EQUAL(Complete(engine, {"REDUCE my_table WITH "}), expected); + } + { + TVector<TCandidate> expected = { + {Keyword, "COLUMNS"}, + {Keyword, "SCHEMA"}, + {HintName, "XLOCK"}, + }; + UNIT_ASSERT_VALUES_EQUAL(Complete(engine, {"SELECT key FROM my_table WITH "}), expected); + } } Y_UNIT_TEST(InsertTableHintName) { @@ -587,6 +602,13 @@ Y_UNIT_TEST_SUITE(SqlCompleteTests) { }; UNIT_ASSERT_VALUES_EQUAL(Complete(engine, {"PRAGMA yson"}), expected); } + { + TVector<TCandidate> expected = { + {HintName, "IGNORE_TYPE_V3"}, + {HintName, "IGNORETYPEV3"}, + }; + UNIT_ASSERT_VALUES_EQUAL(Complete(engine, {"REDUCE a WITH ig"}), expected); + } } Y_UNIT_TEST(OnFailingNameService) { |
