aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpereskokova <mpereskokova@yandex-team.com>2023-12-15 23:18:42 +0300
committermpereskokova <mpereskokova@yandex-team.com>2023-12-16 00:29:15 +0300
commit341849f5d448ac6e7362551e08f40533bbfb0ffb (patch)
tree55b629fe3734139b23c367d763cea23ec3255b7e
parentfc639245d659f8a4b177331d606fe0bda06b5dae (diff)
downloadydb-341849f5d448ac6e7362551e08f40533bbfb0ffb.tar.gz
Fix yson parsing in yql_agent
-rw-r--r--ydb/library/yql/providers/yt/gateway/native/yql_yt_native.cpp1
-rw-r--r--ydb/library/yql/providers/yt/lib/res_pull/res_or_pull.cpp6
2 files changed, 3 insertions, 4 deletions
diff --git a/ydb/library/yql/providers/yt/gateway/native/yql_yt_native.cpp b/ydb/library/yql/providers/yt/gateway/native/yql_yt_native.cpp
index 71fabca7d07..751d1929311 100644
--- a/ydb/library/yql/providers/yt/gateway/native/yql_yt_native.cpp
+++ b/ydb/library/yql/providers/yt/gateway/native/yql_yt_native.cpp
@@ -2982,7 +2982,6 @@ private:
execCtx->Options_.OptLLVM()),
&columns,
execCtx->Options_.FillSettings().Format);
- break;
default:
YQL_LOG_CTX_THROW yexception() << "Invalid result type: " << execCtx->Options_.FillSettings().Format;
}
diff --git a/ydb/library/yql/providers/yt/lib/res_pull/res_or_pull.cpp b/ydb/library/yql/providers/yt/lib/res_pull/res_or_pull.cpp
index ada1131e5b7..f8da0dbb913 100644
--- a/ydb/library/yql/providers/yt/lib/res_pull/res_or_pull.cpp
+++ b/ydb/library/yql/providers/yt/lib/res_pull/res_or_pull.cpp
@@ -134,9 +134,9 @@ bool TSkiffExecuteResOrPull::WriteNext(const NYT::TNode& item) {
}
TStringStream err;
- auto value = NCommon::ParseYsonNode(HolderFactory, item, Specs.Outputs[0].RowType, &err);
+ auto value = NCommon::ParseYsonNodeInResultFormat(HolderFactory, item, Specs.Outputs[0].RowType, &err);
if (!value) {
- throw yexception() << "Could not parse yson node";
+ throw yexception() << "Could not parse yson node with error: " << err.Str();
}
SkiffWriter.AddRow(*value);
@@ -169,7 +169,7 @@ bool TSkiffExecuteResOrPull::WriteNext(TMkqlIOCache& specsCache, const NYT::TNod
TStringStream err;
auto value = NCommon::ParseYsonNode(specsCache.GetHolderFactory(), rec, Specs.Outputs[tableIndex].RowType, &err);
if (!value) {
- throw yexception() << "Could not parse yson node";
+ throw yexception() << "Could not parse yson node with error: " << err.Str();
}
SkiffWriter.AddRow(*value);