logica icon indicating copy to clipboard operation
logica copied to clipboard

Support clickhouse

Open mgilbir opened this issue 3 years ago • 4 comments

Clickhouse is a columnar store that can be queried with SQL.

mgilbir avatar May 01 '21 01:05 mgilbir

It's interesting idea but Logica uses UDFs (user defined functions) which ClickHouse doesn't support at this moment.
The ClickHouse roadmap for 2021 hinted they are considering UDF as executable script over pipe. I think we can take advantage of this feature when it's ready.

https://presentations.clickhouse.tech/percona2021/#27

knoguchi avatar Jul 22 '21 01:07 knoguchi

Logica compiles to UDFs only predicates defined with --> notation. It's not a huge burgen on the user willing to use Clickhouse not to use such notation. Furthermore, it's not too hard to turn off UDF compilation based on the engine. So I don't think this limitation is substantial.

EvgSkv avatar Jul 22 '21 06:07 EvgSkv

Recent ClickHouse added UDF. We may be able to use the new functionality while I understand UDF is not a substantial limitation.

knoguchi avatar Mar 01 '22 17:03 knoguchi

Yeah, that's right, UDFs were not a limitation. I didn't work with Clickhouse, so I don't know what would be challenges. Biggest challenge with full support of Postgres is that you can't use structs without defining their types. And Logic relies on records quite a bit. I don't know if this would be applicable to Clickhouse. I'm happy to help with understanding Logica compiler to whomever wants to work on this :-)

EvgSkv avatar Mar 01 '22 19:03 EvgSkv