-
Notifications
You must be signed in to change notification settings - Fork 598
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
feat(chdb): implement chdb - the embedded clickhouse - backend #8497
Conversation
ibis/backends/chdb/__init__.py
Outdated
|
||
""" | ||
with contextlib.suppress(AttributeError): | ||
query = query.sql(dialect="clickhouse", pretty=True) |
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.
query = query.sql(dialect="clickhouse", pretty=True) | |
query = query.sql(dialect=self.dialect, pretty=True) |
ibis/backends/chdb/__init__.py
Outdated
names = table.column("name").to_pylist() | ||
types = table.column("type").to_pylist() |
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.
names = table.column("name").to_pylist() | |
types = table.column("type").to_pylist() | |
names = table["name"].to_pylist() | |
types = table["type"].to_pylist() |
ibis/backends/chdb/__init__.py
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
df = self.con.query(sql, "arrowtable").to_pandas() | |
df = self.con.query(sql, fmt="arrowtable").to_pandas() |
ibis/backends/chdb/__init__.py
Outdated
if external_tables: | ||
raise NotImplementedError("External tables are not yet supported") | ||
|
||
table = self.con.query(sql, "arrowtable") |
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.
table = self.con.query(sql, "arrowtable") | |
table = self.con.query(sql, fmt="arrowtable") |
ibis/backends/chdb/tests/conftest.py
Outdated
# [(value,)] = self.connection.con.query("SELECT true").result_set | ||
# return isinstance(value, bool) |
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.
# [(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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work with our process-based parallel testing setup (i.e., pytest-xdist
)?
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.
Not there yet :)
@@ -175,6 +175,7 @@ class Options(Config): | |||
default_backend: Optional[Any] = None | |||
context_adjustment: ContextAdjustment = ContextAdjustment() | |||
sql: SQL = SQL() | |||
chdb: Optional[Config] = None |
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.
Do we really need this?
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