Skip to content

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.

5 participants