Skip to content

Feat!: Tag queries with their plan id #4832

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
merged 1 commit into from
Jul 1, 2025
Merged

Conversation

VaggelisD
Copy link
Contributor

This PR enhances the SnapshotEvaluator such that it appends a comment containing the plan_id at each query generated under it.

This can help associate historical queries with a plan after the fact and paves the way for tagging queries with labels/tags in engines like BigQuery and Snowflake.

Copy link
Contributor

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

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

Nice work, looks good. Is the next step to manually intercept the adapter instantiations elsewhere (e.g., unit tests), to ensure the IDs are properly generated in their execute as well?

@VaggelisD
Copy link
Contributor Author

VaggelisD commented Jun 27, 2025

Is the next step to manually intercept the adapter instantiations elsewhere (e.g., unit tests), to ensure the IDs are properly generated in their execute as well?

That's right, the first iteration covers only the snapshot evaluator for now. Subsequent iterations can also include the engine adapters in state_sync, testing_connection etc.

EDIT: Actually, intercepting the unit test queries may not be straightforward because they've ran well before the plan id has been generated.

@VaggelisD VaggelisD changed the title Feat: Tag queries with their plan id Feat!: Tag queries with their plan id Jun 27, 2025
@VaggelisD VaggelisD force-pushed the vaggelisd/track_plan branch from b5424e8 to 640ef92 Compare July 1, 2025 07:40
@VaggelisD VaggelisD merged commit e91e467 into main Jul 1, 2025
27 checks passed
@VaggelisD VaggelisD deleted the vaggelisd/track_plan branch July 1, 2025 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants