-
Notifications
You must be signed in to change notification settings - Fork 93
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
Map types are being scanned unnecessarily #119
Comments
Yep, I'd like to add Map type support once we finish with the current bugs. See #98 |
Hi Folks any news on this, especially around disabling the scanning for Will my following proposal to stop Metabase from scanning
|
@nilaymk |
@nilaymk, do you think the If not, could you tell me how I can reliably trigger a query like the one reported in the OP, so I can verify that the I couldn't see it in my CH server logs when hitting "Sync database schema now" or "Re-scan fields values now", even using the driver without an explicit type mapping for Maps. |
Regarding the arrays, is it the same issue? Currently, they have |
I clarified a bit about the field scanning. Regarding the query:
@nilaymk, are you sure this is coming from the Metabase itself? |
Could you try 1.1.3 (Map base type is |
Hi @slvrtrn , Thanks for looking into this. Sorry I am away for a few days. I'll try and respond asap. I'll try the new and old plugin. |
My SetupClickhouse: 22.7.1.2484Database schema:
Metabase: 0.45.3Testing Method
With metabase-clickhouse-driver v1.1.2Re-scan field values now attempts to scan Query log shows following queries:
So field types scanned are
With metabase-clickhouse-driver v1.1.3Re-scan field values now attempts to scan Query log shows following queries:
So field types scanned are
FindingSo it looks like in
And reporting Is this something that the folks from Metabase can shed a light on perhaps? |
@slvrtrn some of my quick experiments and findings above... I will do more when I'm back next week if needed. |
@slvrtrn I had to recreate my database connection in Metabase 🤔 again. For schema scans you should see queries like:
And for Field value scans the queries look like:
Also the strangeness in column name |
Hey @slvrtrn sorry for so many messages on this thread 😄 OK here's my latest finding ... Good and bad news 😞 GOOD NEWS: Resolving However, the BAD NEWS it only works on new database connections (i.e. connections created with the v1.1.3 driver), or for For database connections created with v1.1.2 and older drivers, where the So two workarounds exists:
I think this issue can be closed, but it might beneficial for others if the above workaround is put in the release notes. Thanks for the fix btw 👍 |
@nilaymk, thanks for the testing! Glad that it worked in the end. |
See thread here: https://discourse.metabase.com/t/scanning-of-map-types-in-clickhouse/23106
The issue I think is that the driver doesn't provide the MHTS
baseType
for clickhouseMap
types. This makes Metabase assume it is a category type that should be with the following query which is very inefficient for colums with hugeMap
s.Of course, for
Map
types it doesn't make sense as it is unlikely to be used for field filters directly.So my proposal is to simple translate clickhouse
Map
type to MHTStypes/Collection
baseType
Would this work?
The text was updated successfully, but these errors were encountered: