summaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/sql_translation.cpp
diff options
context:
space:
mode:
authorkungasc <[email protected]>2025-09-23 19:02:29 +0300
committerkungasc <[email protected]>2025-09-23 19:22:34 +0300
commitca6a4519ce8972481aa637055e8af16874b0c736 (patch)
tree431a78fa0840dca13d39d7b02e2b877d5723e8e4 /yql/essentials/sql/v1/sql_translation.cpp
parent61748dcf22ae75c2d56e64c29bac001a711cd2fc (diff)
YQL support fulltext index type
part of https://github.com/ydb-platform/ydb/issues/23384 commit_hash:dc3c331d4054a7739ca632ddce312c985d4b8a13
Diffstat (limited to 'yql/essentials/sql/v1/sql_translation.cpp')
-rw-r--r--yql/essentials/sql/v1/sql_translation.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/yql/essentials/sql/v1/sql_translation.cpp b/yql/essentials/sql/v1/sql_translation.cpp
index 0f6efde9dc0..8f24599cfae 100644
--- a/yql/essentials/sql/v1/sql_translation.cpp
+++ b/yql/essentials/sql/v1/sql_translation.cpp
@@ -699,13 +699,19 @@ bool TSqlTranslation::CreateTableIndex(const TRule_table_index& node, TVector<TI
if (node.GetRule_table_index_type3().HasBlock2()) {
const TString subType = to_upper(IdEx(node.GetRule_table_index_type3().GetBlock2().GetRule_index_subtype2().GetRule_an_id1(), *this).Name) ;
- if (subType == "VECTOR_KMEANS_TREE") {
+ if (subType == "VECTOR_KMEANS_TREE" || subType == "FULLTEXT") {
if (indexes.back().Type != TIndexDescription::EType::GlobalSync) {
Ctx_.Error() << subType << " index can only be GLOBAL [SYNC]";
return false;
}
- indexes.back().Type = TIndexDescription::EType::GlobalVectorKmeansTree;
+ if (subType == "VECTOR_KMEANS_TREE") {
+ indexes.back().Type = TIndexDescription::EType::GlobalVectorKmeansTree;
+ } else if (subType == "FULLTEXT") {
+ indexes.back().Type = TIndexDescription::EType::GlobalFulltext;
+ } else {
+ Y_ABORT("Unreachable");
+ }
} else {
Ctx_.Error() << subType << " index subtype is not supported";
return false;
@@ -716,7 +722,7 @@ bool TSqlTranslation::CreateTableIndex(const TRule_table_index& node, TVector<TI
if (node.HasBlock10()) {
//const auto& with = node.GetBlock4();
auto& index = indexes.back();
- if (index.Type == TIndexDescription::EType::GlobalVectorKmeansTree) {
+ if (index.Type == TIndexDescription::EType::GlobalVectorKmeansTree || index.Type == TIndexDescription::EType::GlobalFulltext) {
if (!FillIndexSettings(node.GetBlock10().GetRule_with_index_settings1(), index.IndexSettings)) {
return false;
}