POC clickhouse implementation#214
Open
shirkevich wants to merge 5 commits into
Open
Conversation
Member
|
@shirkevich thanks so much for your work on this! We discussed this PR a bit in today's working group meeting #256. The consensus was that so far this looks a bit too ClickHouse-specific, and overall the series of tasks for making things pluggable should probably be broken down a bit more into smaller chunks/more iterative PRs. I know we have a bunch of related issues opened: It'd probably be most helpful next to chat with other contributors like @haileyok to determine the specific steps/how things can be broken down into iterative PRs. That's probably best done on #51, in the #osprey Discord channel, or in the next working group (two weeks from today). |
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
References #51 and #188.
This PR introduces a pluggable event-query backend abstraction and a ClickHouse reference implementation alongside the existing Druid path.
The main change is a backend-neutral filter IR and shared event-query contract. Druid now renders through the IR, and ClickHouse implements the same API shape for scan, timeseries, approximate group count, top-N, and CSV export.
Why
This makes backend work explicit instead of Druid-specific by default.
It also improves local development and backend evaluation:
linux/amd64emulation, while ClickHouse does notWhat changed
EventQueryBackendabstraction and plugin hook400action_idtie-breakermake testruns in the same Docker test stackValidation
make clickhouse-testmake druid-test PYTEST_ARGS='osprey_worker/src/osprey/worker/ui_api/osprey/views/tests/test_events_druid_integration.py'make testmake testagain without resetLocal timing notes
ClickHouse remains materially faster and simpler to iterate on locally than the Druid stack.
The cold-start timing picture on local macOS/Apple Silicon is still uneven enough that I do not want to overstate a single Druid number in the PR body. The more important point for this POC is that the backend-specific suites stay isolated behind dedicated
maketargets, while the defaultmake testpath remains fast and repeatable.Rationale
This is a POC for a pluggable backend model, with ClickHouse as the first non-Druid reference implementation.
The immediate value is simpler local setup and a more practical path for production installations that do not want to carry a full Druid stack just to support the event query surface.
Follow-ups / known gaps