File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
ydb/core/kqp/session_actor Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1605,7 +1605,12 @@ class TKqpSessionActor : public TActorBootstrapped<TKqpSessionActor> {
1605
1605
auto stats = QueryState->QueryStats .ToProto ();
1606
1606
if (QueryState->GetStatsMode () >= Ydb::Table::QueryStatsCollection::STATS_COLLECTION_FULL) {
1607
1607
response->SetQueryPlan (SerializeAnalyzePlan (stats, QueryState->UserRequestContext ->PoolId ));
1608
- response->SetQueryAst (QueryState->CompileResult ->PreparedQuery ->GetPhysicalQuery ().GetQueryAst ());
1608
+ if (QueryState->CompileResult ) {
1609
+ auto preparedQuery = QueryState->CompileResult ->PreparedQuery ;
1610
+ if (preparedQuery) {
1611
+ response->SetQueryAst (preparedQuery->GetPhysicalQuery ().GetQueryAst ());
1612
+ }
1613
+ }
1609
1614
}
1610
1615
response->MutableQueryStats ()->Swap (&stats);
1611
1616
}
@@ -2216,11 +2221,6 @@ class TKqpSessionActor : public TActorBootstrapped<TKqpSessionActor> {
2216
2221
Y_ENSURE (QueryState);
2217
2222
if (QueryState->CompileResult ) {
2218
2223
AddQueryIssues (*response, QueryState->CompileResult ->Issues );
2219
-
2220
- auto preparedQuery = QueryState->CompileResult ->PreparedQuery ;
2221
- if (preparedQuery && QueryState->ReportStats () && QueryState->GetStatsMode () >= Ydb::Table::QueryStatsCollection::STATS_COLLECTION_FULL) {
2222
- response->SetQueryAst (preparedQuery->GetPhysicalQuery ().GetQueryAst ());
2223
- }
2224
2224
}
2225
2225
2226
2226
FillStats (&QueryResponse->Record .GetRef ());
You can’t perform that action at this time.
0 commit comments