Skip to content

Commit 80aedb4

Browse files
authored
Fix olap reads in data query (#12463)
1 parent 239068a commit 80aedb4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ydb/core/kqp/executer_actor/kqp_data_executer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,7 +2007,7 @@ class TKqpDataExecuter : public TKqpExecuterBase<TKqpDataExecuter, EExecType::Da
20072007
default:
20082008
YQL_ENSURE(false, "unknown source type");
20092009
}
2010-
} else if (StreamResult && stageInfo.Meta.IsOlap() && stage.SinksSize() == 0) {
2010+
} else if ((AllowOlapDataQuery || StreamResult) && stageInfo.Meta.IsOlap() && stage.SinksSize() == 0) {
20112011
BuildScanTasksFromShards(stageInfo);
20122012
} else if (stageInfo.Meta.IsSysView()) {
20132013
BuildSysViewScanTasks(stageInfo);
@@ -2161,7 +2161,7 @@ class TKqpDataExecuter : public TKqpExecuterBase<TKqpDataExecuter, EExecType::Da
21612161
void HandleResolve(TEvKqpExecuter::TEvTableResolveStatus::TPtr& ev) {
21622162
if (!TBase::HandleResolve(ev)) return;
21632163

2164-
if (StreamResult) {
2164+
if (StreamResult || AllowOlapDataQuery) {
21652165
TSet<ui64> shardIds;
21662166
for (auto& [stageId, stageInfo] : TasksGraph.GetStagesInfo()) {
21672167
if (stageInfo.Meta.IsOlap()) {

ydb/core/kqp/ut/olap/kqp_olap_ut.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,10 +1867,10 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
18671867
ORDER BY CounterID, WatchID
18681868
)";
18691869

1870-
auto it = tableClient.StreamExecuteScanQuery(query).GetValueSync();
1870+
auto it = session.ExecuteDataQuery(query, TTxControl::BeginTx(TTxSettings::SerializableRW()).CommitTx()).GetValueSync();
18711871

18721872
UNIT_ASSERT_C(it.IsSuccess(), it.GetIssues().ToString());
1873-
TString result = StreamResultToYson(it);
1873+
TString result = FormatResultSetYson(it.GetResultSet(0));
18741874
Cout << result << Endl;
18751875
CompareYson(result, R"([[15;0];[15;1]])");
18761876
}

0 commit comments

Comments
 (0)