Skip to content

YQ fixed ast output for ctas #20673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

GrigoriyPA
Copy link
Collaborator

Changelog entry

Fixed ast output for ctas

Changelog category

  • Bugfix

Description for reviewers

@GrigoriyPA GrigoriyPA requested a review from nikvas0 July 5, 2025 13:12
@GrigoriyPA GrigoriyPA requested a review from a team as a code owner July 5, 2025 13:13
@github-actions github-actions bot added the bugfix label Jul 5, 2025
Copy link

github-actions bot commented Jul 5, 2025

🔴 2025-07-05 13:14:44 UTC The validation of the Pull Request description has failed. Please update the description.

Bugfix requires a linked issue in the changelog entry

Copy link

github-actions bot commented Jul 5, 2025

2025-07-05 13:16:42 UTC Pre-commit check linux-x86_64-relwithdebinfo for c9429fe has started.
2025-07-05 13:16:53 UTC Artifacts will be uploaded here
2025-07-05 13:20:18 UTC ya make is running...
2025-07-05 13:31:37 UTC Check cancelled

Copy link

github-actions bot commented Jul 5, 2025

2025-07-05 13:17:05 UTC Pre-commit check linux-x86_64-release-asan for c9429fe has started.
2025-07-05 13:17:18 UTC Artifacts will be uploaded here
2025-07-05 13:20:33 UTC ya make is running...
2025-07-05 13:32:03 UTC Check cancelled

@GrigoriyPA GrigoriyPA requested a review from a team as a code owner July 5, 2025 13:31
Copy link

github-actions bot commented Jul 5, 2025

2025-07-05 13:35:43 UTC Pre-commit check linux-x86_64-relwithdebinfo for 815f0f0 has started.
2025-07-05 13:35:54 UTC Artifacts will be uploaded here
2025-07-05 13:39:15 UTC ya make is running...
🟡 2025-07-05 14:41:10 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
29667 28248 0 4 1372 43

2025-07-05 14:43:44 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-07-05 14:54:24 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
281 (only retried tests) 242 0 0 2 37

🟢 2025-07-05 14:54:32 UTC Build successful.
🟢 2025-07-05 14:54:51 UTC ydbd size 2.2 GiB changed* by +6.3 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: c59858d merge: 815f0f0 diff diff %
ydbd size 2 387 865 384 Bytes 2 387 871 848 Bytes +6.3 KiB +0.000%
ydbd stripped size 499 603 048 Bytes 499 603 432 Bytes +384 Bytes +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Jul 5, 2025

2025-07-05 13:36:18 UTC Pre-commit check linux-x86_64-release-asan for 815f0f0 has started.
2025-07-05 13:36:29 UTC Artifacts will be uploaded here
2025-07-05 13:39:47 UTC ya make is running...
🟡 2025-07-05 15:21:31 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14280 13869 0 184 197 30

🟢 2025-07-05 15:22:44 UTC Build successful.
🟢 2025-07-05 15:23:11 UTC ydbd size 3.9 GiB changed* by +9.9 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: c59858d merge: 815f0f0 diff diff %
ydbd size 4 200 002 176 Bytes 4 200 012 336 Bytes +9.9 KiB +0.000%
ydbd stripped size 1 455 233 272 Bytes 1 455 234 424 Bytes +1.1 KiB +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@GrigoriyPA GrigoriyPA requested review from Copilot and yumkam July 5, 2025 14:38
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures that AST output is correctly captured and returned for CTAS (Create Table As Select) operations by enabling stats profiling in tests and accumulating ASTs in the session actor.

  • Tests now run queries and scripts with StatsMode::Profile and assert that ASTs are present.
  • The session actor collects per-statement ASTs into a vector and sets the combined AST on the final response.
  • A new QueryAsts member was added to track ASTs across statements.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
ydb/core/kqp/ut/federated_query/s3/kqp_federated_query_ut.cpp Enabled Profile stats in test utilities and added assertions for GetAst() presence.
ydb/core/kqp/session_actor/kqp_session_actor.cpp Collected GetQueryAst() results into QueryAsts and set joined AST string on response.
ydb/core/kqp/session_actor/kqp_query_state.h Introduced TVector<TString> QueryAsts to store AST fragments across statements.

Copy link

github-actions bot commented Jul 7, 2025

2025-07-07 07:05:52 UTC Pre-commit check linux-x86_64-release-asan for 9963a93 has started.
2025-07-07 07:06:04 UTC Artifacts will be uploaded here
2025-07-07 07:09:28 UTC ya make is running...
🟡 2025-07-07 08:57:37 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14280 13924 0 122 202 32

🟢 2025-07-07 08:58:55 UTC Build successful.
🟢 2025-07-07 08:59:25 UTC ydbd size 3.9 GiB changed* by +3.9 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 0297d5d merge: 9963a93 diff diff %
ydbd size 4 200 005 664 Bytes 4 200 009 688 Bytes +3.9 KiB +0.000%
ydbd stripped size 1 455 234 488 Bytes 1 455 235 064 Bytes +576 Bytes +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Jul 7, 2025

2025-07-07 07:06:07 UTC Pre-commit check linux-x86_64-relwithdebinfo for 9963a93 has started.
2025-07-07 07:06:18 UTC Artifacts will be uploaded here
2025-07-07 07:09:31 UTC ya make is running...
🟡 2025-07-07 08:09:24 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
29667 28261 0 2 1360 44

2025-07-07 08:12:00 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-07-07 08:22:45 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
249 (only retried tests) 209 0 0 2 38

🟢 2025-07-07 08:22:52 UTC Build successful.
🟢 2025-07-07 08:23:11 UTC ydbd size 2.2 GiB changed* by +2.3 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 0297d5d merge: 9963a93 diff diff %
ydbd size 2 387 867 992 Bytes 2 387 870 304 Bytes +2.3 KiB +0.000%
ydbd stripped size 499 603 752 Bytes 499 604 008 Bytes +256 Bytes +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@GrigoriyPA GrigoriyPA merged commit e615d9b into ydb-platform:main Jul 8, 2025
13 checks passed
@GrigoriyPA GrigoriyPA deleted the YQ-fixed-ast-output-for-ctas branch July 8, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants