feat(tools): updated experiment infra to run experiemnts against Clickhouse using different strategies such as using materialized views, or using sketches#495
Draft
milindsrivastava1997 wants to merge 3 commits into
Conversation
…khouse using different strategies such as using materialized views, or using sketches
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Issue #491 needs ClickHouse benchmarked using its own precompute mechanisms (sketch functions, materialized views, materialized views + sketches) as additional comparison arms against ASAPQuery, alongside the existing exact
baselineandsketchdbarms. Each new arm needs different SQL (and in some cases a different schema) thanbaseline, not just a different protocol/server.This PR lays the config plumbing for that:
baseline_sketch,baseline_mv,baseline_mv_sketch(asap-tools/experiments/constants.py).generate_clickhouse_client_configsnow resolves each query group's SQL per mode, inside the mode loop, instead of building one shared query list once and reusing it for every mode (which is whybaselineandsketchdbalways got identical queries today).sketchdbalways resolves its SQL through thebaselineentry — ASAP's SQL-mode planner needs to see the exact same SQL text asbaselineto pattern-match it against available sketches; it can't understand ClickHouse-specific functions or MV-backedFROMclauses.sql_fileformat change (breaking)query_groups[i].sql_fileis now a dict keyed by mode name instead of a single shared path, since each precompute arm may query different SQL/schema (e.g.baseline_mvreads from a materialized view instead of the raw table).Old — one path shared by every mode:
New — dict keyed by mode name:
For a
baseline+sketchdb-only experiment (today's common case), the new format only needs abaselineentry:Existing local configs need to be updated to the dict format to keep working.
Out of scope (left for follow-up)