Skip to content

Commit 6c244f7

Browse files
authored
Returning upsert test (#10195)
1 parent 86516c4 commit 6c244f7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ydb/core/kqp/ut/opt/kqp_returning_ut.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,17 @@ Y_UNIT_TEST(ReturningSerial) {
229229
CompareYson(R"([[2;[4];[3]]])", FormatResultSetYson(result.GetResultSet(0)));
230230
}
231231

232+
{
233+
const auto query = Q_(R"(
234+
--!syntax_v1
235+
UPSERT INTO ReturningTableExtraValue (value, value2) VALUES (4, 5) RETURNING key;
236+
)");
237+
238+
auto result = session.ExecuteDataQuery(query, TTxControl::BeginTx().CommitTx()).GetValueSync();
239+
UNIT_ASSERT(result.IsSuccess());
240+
CompareYson(R"([[3]])", FormatResultSetYson(result.GetResultSet(0)));
241+
}
242+
232243
{
233244
const auto query = Q_(R"(
234245
--!syntax_v1

0 commit comments

Comments
 (0)