-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Always fire QueryCompletedEvent for DDL queries #24651
Always fire QueryCompletedEvent for DDL queries #24651
Conversation
c9ee13b
to
3fe314c
Compare
It is needed to test the query execution without reading the final query info which triggers the QueryCompletedEvent
3fe314c
to
644161f
Compare
Well, there's #24354 too :) |
Yeah, I mentioned this in the description. This is a slightly refactored version. We can go with your PR too if you want., |
Oh, you did indeed. I guess I only read the first section. (But the code did look familiar!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
try (StandaloneQueryRunner queryRunner = new StandaloneQueryRunner(testSession())) { | ||
queryRunner.installPlugin(new MemoryPlugin()); | ||
queryRunner.createCatalog("memory", "memory"); | ||
Set<String> queryCompletedQueryIds = new HashSet<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be synchronized somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should. Good catch.
644161f
to
973ea75
Compare
Previously the event was fired because client protocol is reading the final query info. That is brittle and theoretically could be removed making DDL queries fail to trigger query completed event.
973ea75
to
95f4b16
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine by me, FWIW
Description
Previously the event was fired because client protocol
is reading the final query info. That is brittle and theoretically
could be removed making DDL queries fail to trigger query completed event.
Additional context and related issues
A slightly changed version of #24354
Release notes
( X) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: