Skip to content

Add QueryType to QueryContext in event listener API #25005

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

infvg
Copy link
Contributor

@infvg infvg commented Apr 29, 2025

Description

Enhance event listener API by adding QueryType to QueryContext

Motivation and Context

Resolvers #25004

Impact

Adds QueryType to QueryContext

Test Plan

UTs

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

SPI Changes
* Add query type to QueryContext in event listener API

@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Apr 29, 2025
@infvg infvg marked this pull request as ready for review April 29, 2025 11:45
@infvg infvg requested a review from ZacBlanco April 29, 2025 11:45
@prestodb-ci prestodb-ci requested review from a team, sh-shamsan and pdabre12 and removed request for ZacBlanco and a team April 29, 2025 11:45
Copy link
Contributor

@ZacBlanco ZacBlanco left a comment

Choose a reason for hiding this comment

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

I know you have another PR to add the query type to the session. I actually am not sure if it really belongs in the session. If it does end up in the session, we should add it to the SessionRepresentation object here instead

@@ -335,7 +335,7 @@ private static QueryContext createDummyQueryContext()
Optional<String> catalog = Optional.of("dummyCatalog");
Optional<String> schema = Optional.of("dummySchema");
Optional<ResourceGroupId> resourceGroupId = Optional.of(new ResourceGroupId("dummyGroupId"));

Optional<QueryType> queryType = Optional.of(QueryType.CONTROL);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Optional<QueryType> queryType = Optional.of(QueryType.CONTROL);
Optional<QueryType> queryType = Optional.of(CONTROL);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@infvg infvg force-pushed the querytypecontext branch from 5d47719 to 64542fe Compare April 29, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from:IBM PR from IBM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants