Closed hkrutzer closed 1 year ago
No, #126 wouldn't change the internals of Ch
Ecto type, it's mostly about queries that use type/2
macro.
Can you please share more of your code? Ideally as a failing test case.
I think I understand.
You have defined a column with type SimpleAggregateFunction(groupArrayArray, Array(Map(String, UInt8)))
but from Elixir you want to inserts booleans there. You can do that with a custom Ecto type, ecto_ch
doesn't handle type mismatches automatically (mostly because basic Ecto types like booleans don't do it automatically either).
There is a similar type mismatch in Plausible:
But yours is more complicated :)
Thanks, I also found a mistake on my end so it doesn't seem to be an issue with ecto_ch, or I can fix it with a custom type 🙂
I am having an issue where I have a field like this:
and I insert data like this:
[%{"foo"=> true}, %{"bar" => false}]
. This causes an error:true
is of course not a UInt8 so I suspect that is what is causing the error.But when I make it a
Bool
, I getPerhaps https://github.com/plausible/ecto_ch/pull/126 happens to address this? But I thought I'd make an issue anyway.