aboutsummaryrefslogtreecommitdiffstats
path: root/yt/yql/providers
diff options
context:
space:
mode:
authorvvvv <vvvv@yandex-team.com>2024-12-09 14:29:21 +0300
committervvvv <vvvv@yandex-team.com>2024-12-09 14:45:05 +0300
commitcd83d367ca7edd078dd5eb9a97fda32212b5f3e8 (patch)
tree23e739e9fe607edf8858aaa6c786e66a947e1977 /yt/yql/providers
parentd4510c40056498c21c4185bc678c4eed3ab89cea (diff)
downloadydb-cd83d367ca7edd078dd5eb9a97fda32212b5f3e8.tar.gz
Introduced two stages mode for type annotation, a FailMe callable to simulate optimization failures
В обычном select 1 \|\| 2 теперь выдается ошибка в InitialTypeAnnotation stage А ошибка на RepeatTypeAnnotation stage эскалируется до Severity=Fatal commit_hash:fb09693b4baf9e14bfe7dae9a8a9cd4b9e0e0142
Diffstat (limited to 'yt/yql/providers')
-rw-r--r--yt/yql/providers/yt/gateway/file/ya.make1
-rw-r--r--yt/yql/providers/yt/gateway/file/yql_yt_file.cpp4
-rw-r--r--yt/yql/providers/yt/gateway/file/yql_yt_file_services.cpp3
-rw-r--r--yt/yql/providers/yt/gateway/lib/yt_helpers.cpp4
4 files changed, 9 insertions, 3 deletions
diff --git a/yt/yql/providers/yt/gateway/file/ya.make b/yt/yql/providers/yt/gateway/file/ya.make
index 2957d7703b..454419e0fd 100644
--- a/yt/yql/providers/yt/gateway/file/ya.make
+++ b/yt/yql/providers/yt/gateway/file/ya.make
@@ -16,6 +16,7 @@ PEERDIR(
yql/essentials/core/file_storage
yql/essentials/core/file_storage/proto
yql/essentials/core/file_storage/http_download
+ yql/essentials/core/issue
yql/essentials/minikql/comp_nodes
yql/essentials/public/udf
yql/essentials/utils
diff --git a/yt/yql/providers/yt/gateway/file/yql_yt_file.cpp b/yt/yql/providers/yt/gateway/file/yql_yt_file.cpp
index 5eff2bc247..c742d4f06b 100644
--- a/yt/yql/providers/yt/gateway/file/yql_yt_file.cpp
+++ b/yt/yql/providers/yt/gateway/file/yql_yt_file.cpp
@@ -438,6 +438,8 @@ public:
if (exists) {
try {
LoadTableMetaInfo(req, path, *metaData);
+ } catch (const TErrorException& e) {
+ throw TErrorException(e.GetCode()) << "Error loading " << req.Cluster() << '.' << req.Table() << " table metadata: " << e.what();
} catch (const yexception& e) {
throw yexception() << "Error loading " << req.Cluster() << '.' << req.Table() << " table metadata: " << e.what();
}
@@ -450,6 +452,8 @@ public:
if (metaData->SqlView.empty()) {
try {
LoadTableStatInfo(path, *statData);
+ } catch (const TErrorException& e) {
+ throw TErrorException(e.GetCode()) << "Error loading " << req.Cluster() << '.' << req.Table() << " table stat: " << e.what();
} catch (const yexception& e) {
throw yexception() << "Error loading " << req.Cluster() << '.' << req.Table() << " table stat: " << e.what();
}
diff --git a/yt/yql/providers/yt/gateway/file/yql_yt_file_services.cpp b/yt/yql/providers/yt/gateway/file/yql_yt_file_services.cpp
index cc8458ce0d..30f3792c33 100644
--- a/yt/yql/providers/yt/gateway/file/yql_yt_file_services.cpp
+++ b/yt/yql/providers/yt/gateway/file/yql_yt_file_services.cpp
@@ -1,6 +1,7 @@
#include "yql_yt_file_services.h"
#include <yql/essentials/providers/common/provider/yql_provider_names.h>
+#include <yql/essentials/core/issue/yql_issue.h>
#include <util/system/guard.h>
#include <util/system/fs.h>
@@ -45,7 +46,7 @@ TString TYtFileServices::GetTablePath(TStringBuf cluster, TStringBuf table, bool
if (auto dirPtr = TablesDirMapping.FindPtr(tablePrefix)) {
return TFsPath(*dirPtr) / TString(table).append(".txt");
}
- ythrow yexception() << "Table \"" << table << "\" does not exist";
+ throw TErrorException(TIssuesIds::YT_TABLE_NOT_FOUND) << "Table \"" << table << "\" does not exist";
}
void TYtFileServices::LockPath(const TString& path, const TString& fullTableName) {
diff --git a/yt/yql/providers/yt/gateway/lib/yt_helpers.cpp b/yt/yql/providers/yt/gateway/lib/yt_helpers.cpp
index 1f20fc7dae..494bce164e 100644
--- a/yt/yql/providers/yt/gateway/lib/yt_helpers.cpp
+++ b/yt/yql/providers/yt/gateway/lib/yt_helpers.cpp
@@ -629,7 +629,7 @@ void FillResultFromOperationError(NCommon::TOperationResult& result, const NYT::
} else {
TString errorDescription = failedJob.Error.ShortDescription();
if (uniqueErrors.insert(errorDescription).second) {
- rootIssue.AddSubIssue(MakeIntrusive<TIssue>(YqlIssue(pos, TIssuesIds::UNEXPECTED, errorDescription)));
+ rootIssue.AddSubIssue(MakeIntrusive<TIssue>(YqlIssue(pos, TIssuesIds::DEFAULT_ERROR, errorDescription)));
}
}
}
@@ -658,7 +658,7 @@ void FillResultFromCurrentException(NCommon::TOperationResult& result, TPosition
} catch (const std::exception& e) {
result.SetException(e, pos);
} catch (const NKikimr::TMemoryLimitExceededException&) {
- result.SetStatus(TIssuesIds::UNEXPECTED);
+ result.SetStatus(TIssuesIds::DEFAULT_ERROR);
result.AddIssue(TIssue(pos, "Memory limit exceeded in MKQL runtime"));
} catch (...) {
result.SetStatus(TIssuesIds::UNEXPECTED);