-
-
Notifications
You must be signed in to change notification settings - Fork 44
[Store] Add support for ClickHouse #244
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
base: main
Are you sure you want to change the base?
Conversation
ef38fe0
to
af54406
Compare
Indeed 👍🏼 The current StoreInterface is a bit limited, but I eventually managed to do what I need to POC something.
Yes!
|
af54406
to
c45e8aa
Compare
return $this | ||
->httpClient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return $this | |
->httpClient | |
return $this->httpClient |
$httpClient = $this->createMock(HttpClientInterface::class); | ||
$response = $this->createMock(ResponseInterface::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use MockHttpClient?
We already have ClickHouse in our infrastructure, So I'm benchmarkin it.
And, let's share my code 🎉
As you can see, I let some extension points (for the metadata). AFAIK, it's not possible to
store structured / indexed JSON in CH. We have to store it as
String
instead.We could instead use better typed structure, but Symfony cannot know the type, obviously.
So with string, if we want to filter the results, we need to use
[JSONExtractString](https://clickhouse.com/docs/sql-reference/functions/json-functions#jsonextractstring)
.And It's slow!
So with the current extensions points, I could write the following code:
And then:
If the PR could be accepted, I'll write tests