feat(chdb): implement chdb - the embedded clickhouse - backend#8497
feat(chdb): implement chdb - the embedded clickhouse - backend#8497kszucs wants to merge 11 commits into
Conversation
|
|
||
| """ | ||
| with contextlib.suppress(AttributeError): | ||
| query = query.sql(dialect="clickhouse", pretty=True) |
There was a problem hiding this comment.
| query = query.sql(dialect="clickhouse", pretty=True) | |
| query = query.sql(dialect=self.dialect, pretty=True) |
| names = table.column("name").to_pylist() | ||
| types = table.column("type").to_pylist() |
There was a problem hiding this comment.
| names = table.column("name").to_pylist() | |
| types = table.column("type").to_pylist() | |
| names = table["name"].to_pylist() | |
| types = table["type"].to_pylist() |
| if external_tables: | ||
| raise NotImplementedError("External tables are not yet supported") | ||
|
|
||
| df = self.con.query(sql, "arrowtable").to_pandas() |
There was a problem hiding this comment.
| df = self.con.query(sql, "arrowtable").to_pandas() | |
| df = self.con.query(sql, fmt="arrowtable").to_pandas() |
| if external_tables: | ||
| raise NotImplementedError("External tables are not yet supported") | ||
|
|
||
| table = self.con.query(sql, "arrowtable") |
There was a problem hiding this comment.
| table = self.con.query(sql, "arrowtable") | |
| table = self.con.query(sql, fmt="arrowtable") |
| # [(value,)] = self.connection.con.query("SELECT true").result_set | ||
| # return isinstance(value, bool) |
There was a problem hiding this comment.
| # [(value,)] = self.connection.con.query("SELECT true").result_set | |
| # return isinstance(value, bool) |
We definitely will not be supporting versions of chdb that don't support native booleans.
| def ddl_script(self) -> Iterable[str]: | ||
| parquet_dir = self.data_dir / "parquet" | ||
| for sql in super().ddl_script: | ||
| yield sql.format(parquet_dir=parquet_dir) |
There was a problem hiding this comment.
I'd rather not introduce templating if we can avoid it. How about hard coding the path to ci/ibis-testing-data/... like we do with everything else?
| """ | ||
| con = self.connection.con | ||
|
|
||
| con.query(f"CREATE DATABASE {database} ENGINE = Atomic") |
There was a problem hiding this comment.
Does this work with our process-based parallel testing setup (i.e., pytest-xdist)?
| default_backend: Optional[Any] = None | ||
| context_adjustment: ContextAdjustment = ContextAdjustment() | ||
| sql: SQL = SQL() | ||
| chdb: Optional[Config] = None |
|
I won't have time to keep working on this in the near future, so closing it. |
|
Going to reclose this for now. Can always reopen if we want to continue the work, but no need to keep it open if we're not hacking on it proactively. |
A big chunk of the backends testing suite is already passing, but there is still work to do:
Test suite is currently at
247 failed, 1067 passed, 28 skipped, 29854 deselected, 131 xfailed, 6 errors