diff options
author | grigoriypisar <grigoriypisar@yandex-team.com> | 2023-09-26 20:19:19 +0300 |
---|---|---|
committer | grigoriypisar <grigoriypisar@yandex-team.com> | 2023-09-26 21:02:15 +0300 |
commit | 77f117e80302824bfc6b08d713f0d5d53d1e878e (patch) | |
tree | 367e0190e26389048f645acfe7790c5f4ca2eb48 | |
parent | 1926a317d030d1206db4252943011a528bc8cb4c (diff) | |
download | ydb-77f117e80302824bfc6b08d713f0d5d53d1e878e.tar.gz |
show AST in case of error
Passed AST in case of error
-rw-r--r-- | ydb/core/kqp/session_actor/kqp_session_actor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ydb/core/kqp/session_actor/kqp_session_actor.cpp b/ydb/core/kqp/session_actor/kqp_session_actor.cpp index 089dbdf9a6..bb75714385 100644 --- a/ydb/core/kqp/session_actor/kqp_session_actor.cpp +++ b/ydb/core/kqp/session_actor/kqp_session_actor.cpp @@ -1857,6 +1857,11 @@ public: Y_ENSURE(QueryState); if (QueryState->CompileResult) { AddQueryIssues(*response, QueryState->CompileResult->Issues); + + auto preparedQuery = QueryState->CompileResult->PreparedQuery; + if (preparedQuery && QueryState->ReportStats() && QueryState->GetStatsMode() >= Ydb::Table::QueryStatsCollection::STATS_COLLECTION_FULL) { + response->SetQueryAst(preparedQuery->GetPhysicalQuery().GetQueryAst()); + } } if (issues) { |