Skip to content

Commit 6c442ab

Browse files
authored
Fix sink with several CTAS test (#15806)
1 parent a2db51c commit 6c442ab

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

ydb/core/kqp/executer_actor/kqp_executer_impl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,6 @@ class TKqpExecuterBase : public TActor<TDerived> {
566566
}
567567

568568
if (BufferActorId && Request.LocksOp == ELocksOp::Rollback) {
569-
YQL_ENSURE(Request.Transactions.empty());
570569
static_cast<TDerived*>(this)->Finalize();
571570
return;
572571
}

ydb/core/kqp/session_actor/kqp_session_actor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2004,7 +2004,6 @@ class TKqpSessionActor : public TActorBootstrapped<TKqpSessionActor> {
20042004
size_t trailingResultsCount = 0;
20052005
for (size_t i = 0; i < phyQuery.ResultBindingsSize(); ++i) {
20062006
if (QueryState->IsStreamResult()) {
2007-
20082007
if (QueryState->QueryData->HasTrailingTxResult(phyQuery.GetResultBindings(i))) {
20092008
auto ydbResult = QueryState->QueryData->GetYdbTxResult(
20102009
phyQuery.GetResultBindings(i), response->GetArena(), {});

ydb/core/kqp/ut/service/kqp_qs_queries_ut.cpp

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3496,9 +3496,10 @@ Y_UNIT_TEST_SUITE(KqpQueryService) {
34963496
}
34973497
}
34983498

3499-
Y_UNIT_TEST(SeveralCTAS) {
3499+
Y_UNIT_TEST_TWIN(SeveralCTAS, UseSink) {
35003500
NKikimrConfig::TAppConfig appConfig;
35013501
appConfig.MutableTableServiceConfig()->SetEnableAstCache(true);
3502+
appConfig.MutableTableServiceConfig()->SetEnableOltpSink(UseSink);
35023503
appConfig.MutableTableServiceConfig()->SetEnableOlapSink(true);
35033504
appConfig.MutableTableServiceConfig()->SetEnableCreateTableAs(true);
35043505
appConfig.MutableTableServiceConfig()->SetEnablePerStatementQueryExecution(true);
@@ -3523,19 +3524,12 @@ Y_UNIT_TEST_SUITE(KqpQueryService) {
35233524
CREATE TABLE Table3 (
35243525
PRIMARY KEY (Key)
35253526
) AS SELECT * FROM Table2 UNION ALL SELECT * FROM Table1;
3526-
SELECT * FROM Table1 ORDER BY Key;
3527-
SELECT * FROM Table2 ORDER BY Key;
3528-
SELECT * FROM Table3 ORDER BY Key;
35293527
)", TTxControl::NoTx(), TExecuteQuerySettings()).ExtractValueSync();
35303528
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
3531-
UNIT_ASSERT_VALUES_EQUAL(result.GetResultSets().size(), 3);
3532-
// Results are empty. Snapshot was taken before tables were created, so we don't see changes after snapshot.
3533-
// This will be fixed in future, for example, by implicit commit before/after each ddl statement.
3534-
CompareYson(R"([])", FormatResultSetYson(result.GetResultSet(0)));
3535-
CompareYson(R"([])", FormatResultSetYson(result.GetResultSet(1)));
3536-
CompareYson(R"([])", FormatResultSetYson(result.GetResultSet(2)));
3529+
}
35373530

3538-
result = db.ExecuteQuery(R"(
3531+
{
3532+
auto result = db.ExecuteQuery(R"(
35393533
SELECT * FROM Table1 ORDER BY Key;
35403534
SELECT * FROM Table2 ORDER BY Key;
35413535
SELECT * FROM Table3 ORDER BY Key;

0 commit comments

Comments
 (0)