diff options
author | vityaman <[email protected]> | 2025-05-12 21:05:25 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2025-05-12 21:16:38 +0300 |
commit | 53b15a5b87b078a27ee071b8ab93458f1a3bcd81 (patch) | |
tree | 6fb88295e8bf4ee279d06a9fed992bfcec9a9b56 /yql/essentials/sql/v1/complete/sql_complete_ut.cpp | |
parent | b336ad5ec16dd1f541c55b7944fc9e6b5bba57a2 (diff) |
YQL-19747: Complete camel case type names
---
- Related to `YQL-19747`
- Related to https://github.com/vityaman/ydb/issues/8
---
Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1268
commit_hash:76e4e2c8b225994cc842c1ee00a0ec8e6eed5c05
Diffstat (limited to 'yql/essentials/sql/v1/complete/sql_complete_ut.cpp')
-rw-r--r-- | yql/essentials/sql/v1/complete/sql_complete_ut.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/yql/essentials/sql/v1/complete/sql_complete_ut.cpp b/yql/essentials/sql/v1/complete/sql_complete_ut.cpp index 10afd08f827..dd083c5a301 100644 --- a/yql/essentials/sql/v1/complete/sql_complete_ut.cpp +++ b/yql/essentials/sql/v1/complete/sql_complete_ut.cpp @@ -452,28 +452,28 @@ Y_UNIT_TEST_SUITE(SqlCompleteTests) { {Keyword, "CURRENT_DATE"}, {Keyword, "CURRENT_TIME"}, {Keyword, "CURRENT_TIMESTAMP"}, - {Keyword, "DICT<"}, + {Keyword, "Dict<"}, {Keyword, "DISTINCT"}, {FunctionName, "DateTime::Split("}, {Keyword, "EMPTY_ACTION"}, {Keyword, "ENUM"}, {Keyword, "EXISTS("}, {Keyword, "FALSE"}, - {Keyword, "FLOW<"}, + {Keyword, "Flow<"}, {Keyword, "JSON_EXISTS("}, {Keyword, "JSON_QUERY("}, {Keyword, "JSON_VALUE("}, - {Keyword, "LIST<"}, + {Keyword, "List<"}, {Keyword, "NOT"}, {Keyword, "NULL"}, - {Keyword, "OPTIONAL<"}, + {Keyword, "Optional<"}, {FunctionName, "Python::__private("}, - {Keyword, "RESOURCE<"}, - {Keyword, "SET<"}, + {Keyword, "Resource<"}, + {Keyword, "Set<"}, {Keyword, "STREAM"}, {Keyword, "STRUCT"}, {FunctionName, "StartsWith("}, - {Keyword, "TAGGED<"}, + {Keyword, "Tagged<"}, {Keyword, "TRUE"}, {Keyword, "TUPLE"}, {Keyword, "VARIANT"}, @@ -628,27 +628,27 @@ Y_UNIT_TEST_SUITE(SqlCompleteTests) { {Keyword, "CURRENT_DATE"}, {Keyword, "CURRENT_TIME"}, {Keyword, "CURRENT_TIMESTAMP"}, - {Keyword, "DICT<"}, + {Keyword, "Dict<"}, {FunctionName, "DateTime::Split("}, {Keyword, "EMPTY_ACTION"}, {Keyword, "ENUM"}, {Keyword, "EXISTS("}, {Keyword, "FALSE"}, - {Keyword, "FLOW<"}, + {Keyword, "Flow<"}, {Keyword, "JSON_EXISTS("}, {Keyword, "JSON_QUERY("}, {Keyword, "JSON_VALUE("}, - {Keyword, "LIST<"}, + {Keyword, "List<"}, {Keyword, "NOT"}, {Keyword, "NULL"}, - {Keyword, "OPTIONAL<"}, + {Keyword, "Optional<"}, {FunctionName, "Python::__private("}, - {Keyword, "RESOURCE<"}, - {Keyword, "SET<"}, - {Keyword, "STREAM<"}, + {Keyword, "Resource<"}, + {Keyword, "Set<"}, + {Keyword, "Stream<"}, {Keyword, "STRUCT"}, {FunctionName, "StartsWith("}, - {Keyword, "TAGGED<"}, + {Keyword, "Tagged<"}, {Keyword, "TRUE"}, {Keyword, "TUPLE"}, {Keyword, "VARIANT"}, @@ -692,28 +692,28 @@ Y_UNIT_TEST_SUITE(SqlCompleteTests) { Y_UNIT_TEST(TypeName) { TVector<TCandidate> expected = { - {Keyword, "CALLABLE<("}, - {Keyword, "DECIMAL("}, - {Keyword, "DICT<"}, - {Keyword, "ENUM<"}, - {Keyword, "FLOW<"}, - {Keyword, "LIST<"}, - {Keyword, "OPTIONAL<"}, - {Keyword, "RESOURCE<"}, - {Keyword, "SET<"}, - {Keyword, "STREAM<"}, + {Keyword, "Callable<("}, + {Keyword, "Decimal("}, + {Keyword, "Dict<"}, + {Keyword, "Enum<"}, + {Keyword, "Flow<"}, + {Keyword, "List<"}, + {Keyword, "Optional<"}, + {Keyword, "Resource<"}, + {Keyword, "Set<"}, + {Keyword, "Stream<"}, {Keyword, "STRUCT"}, - {Keyword, "TAGGED<"}, + {Keyword, "Tagged<"}, {Keyword, "TUPLE"}, {TypeName, "Uint64"}, - {Keyword, "VARIANT<"}, + {Keyword, "Variant<"}, }; auto engine = MakeSqlCompletionEngineUT(); UNIT_ASSERT_VALUES_EQUAL(Complete(engine, "CREATE TABLE table (id "), expected); UNIT_ASSERT_VALUES_EQUAL(Complete(engine, "SELECT CAST (1 AS "), expected); - UNIT_ASSERT_VALUES_EQUAL(Complete(engine, "SELECT OPTIONAL<"), expected); - UNIT_ASSERT_VALUES_EQUAL(Complete(engine, "SELECT OPTIONAL<#>"), expected); + UNIT_ASSERT_VALUES_EQUAL(Complete(engine, "SELECT Optional<"), expected); + UNIT_ASSERT_VALUES_EQUAL(Complete(engine, "SELECT Optional<#>"), expected); } Y_UNIT_TEST(TypeNameAsArgument) { @@ -726,7 +726,7 @@ Y_UNIT_TEST_SUITE(SqlCompleteTests) { } { TVector<TCandidate> expected = { - {Keyword, "OPTIONAL<"}, + {Keyword, "Optional<"}, }; UNIT_ASSERT_VALUES_EQUAL(Complete(engine, "SELECT Nothing(Option"), expected); } @@ -985,7 +985,7 @@ Y_UNIT_TEST_SUITE(SqlCompleteTests) { {TypeName, "Unit"}, {TypeName, "Uint16"}, }; - UNIT_ASSERT_VALUES_EQUAL(Complete(engine, "SELECT OPTIONAL<U"), expected); + UNIT_ASSERT_VALUES_EQUAL(Complete(engine, "SELECT Optional<U"), expected); } { TVector<TCandidate> expected = { @@ -1009,7 +1009,7 @@ Y_UNIT_TEST_SUITE(SqlCompleteTests) { auto service = MakeIntrusive<TFailingNameService>(); auto engine = MakeSqlCompletionEngine(MakePureLexerSupplier(), std::move(service)); UNIT_ASSERT_EXCEPTION(Complete(engine, ""), TDummyException); - UNIT_ASSERT_EXCEPTION(Complete(engine, "SELECT OPTIONAL<U"), TDummyException); + UNIT_ASSERT_EXCEPTION(Complete(engine, "SELECT Optional<U"), TDummyException); UNIT_ASSERT_EXCEPTION(Complete(engine, "SELECT CAST (1 AS ").size(), TDummyException); } @@ -1077,7 +1077,7 @@ Y_UNIT_TEST_SUITE(SqlCompleteTests) { {TypeName, "Int16"}, {TypeName, "Int8"}, }; - UNIT_ASSERT_VALUES_EQUAL(Complete(engine, "SELECT OPTIONAL<I"), expected); + UNIT_ASSERT_VALUES_EQUAL(Complete(engine, "SELECT Optional<I"), expected); } { TVector<TCandidate> expected = { |