aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgalaxycrab <UgnineSirdis@ydb.tech>2023-03-25 12:08:58 +0300
committergalaxycrab <UgnineSirdis@ydb.tech>2023-03-25 12:08:58 +0300
commit5b26d92fe660e0f35a368aeeb7087bfcfe82c1ee (patch)
tree6233b3695ad96dc621436cb6b3e54c39029a1dde
parentf60764b94c031a4de74405922773a8076ac173ef (diff)
downloadydb-5b26d92fe660e0f35a368aeeb7087bfcfe82c1ee.tar.gz
Fix test and sdk
Тест ещё пока не должен полностью работать, поэтому я поставил там досрочный выход из него. Но, как оказалось, тест был зелёный для debug-сборки и красный для release. Пофиксил проблемы в sdk, вызвавшие это поведение и сам тест.
-rw-r--r--ydb/core/kqp/ut/federated_query/kqp_federated_query_ut.cpp7
-rw-r--r--ydb/public/sdk/cpp/client/draft/ydb_query/client.cpp20
2 files changed, 18 insertions, 9 deletions
diff --git a/ydb/core/kqp/ut/federated_query/kqp_federated_query_ut.cpp b/ydb/core/kqp/ut/federated_query/kqp_federated_query_ut.cpp
index 4a5ea87a19..69471a059a 100644
--- a/ydb/core/kqp/ut/federated_query/kqp_federated_query_ut.cpp
+++ b/ydb/core/kqp/ut/federated_query/kqp_federated_query_ut.cpp
@@ -83,13 +83,18 @@ Y_UNIT_TEST_SUITE(KqpFederatedQuery) {
Sleep(TDuration::MilliSeconds(50));
TAsyncFetchScriptResultsResult future = db.FetchScriptResults(executeScrptsResult.Metadata().ExecutionId);
results.ConstructInPlace(future.ExtractValueSync());
+ ////////////////////////////////////////////////////////////////////////// tmp return; // YQ-1636
+ if (results->GetStatus() == NYdb::EStatus::INTERNAL_ERROR) {
+ UNIT_ASSERT_STRING_CONTAINS(results->GetIssues().ToOneLineString(), "unsupported source type");
+ return;
+ }
+ ////////////////////////////////////////////////////////////////////////// tmp return; // YQ-1636
if (!results->IsSuccess()) {
UNIT_ASSERT_C(results->GetStatus() == NYdb::EStatus::BAD_REQUEST, results->GetStatus() << ": " << results->GetIssues().ToString());
UNIT_ASSERT_STRING_CONTAINS(results->GetIssues().ToOneLineString(), "Results are not ready");
}
} while (!results->HasResultSet());
TResultSetParser resultSet(results->ExtractResultSet());
- return;
UNIT_ASSERT_VALUES_EQUAL(resultSet.ColumnsCount(), 1);
UNIT_ASSERT_VALUES_EQUAL(resultSet.RowsCount(), 1);
UNIT_ASSERT(resultSet.TryNextRow());
diff --git a/ydb/public/sdk/cpp/client/draft/ydb_query/client.cpp b/ydb/public/sdk/cpp/client/draft/ydb_query/client.cpp
index b8c5c4f118..bc3d30c7e5 100644
--- a/ydb/public/sdk/cpp/client/draft/ydb_query/client.cpp
+++ b/ydb/public/sdk/cpp/client/draft/ydb_query/client.cpp
@@ -84,14 +84,18 @@ public:
NYql::IssuesFromMessage(response->issues(), opIssues);
TStatus st(static_cast<EStatus>(response->status()), std::move(opIssues));
- promise.SetValue(
- TFetchScriptResultsResult(
- std::move(st),
- TResultSet(std::move(*response->mutable_result_set())),
- response->result_set_index(),
- response->next_fetch_token()
- )
- );
+ if (st.IsSuccess()) {
+ promise.SetValue(
+ TFetchScriptResultsResult(
+ std::move(st),
+ TResultSet(std::move(*response->mutable_result_set())),
+ response->result_set_index(),
+ response->next_fetch_token()
+ )
+ );
+ } else {
+ promise.SetValue(TFetchScriptResultsResult(std::move(st)));
+ }
} else {
TStatus st(std::move(status));
promise.SetValue(TFetchScriptResultsResult(std::move(st)));