diff --git a/docs/_toc.yml b/docs/_toc.yml index 2c5b62ac8..04466d632 100644 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -614,6 +614,7 @@ parts: >>>>>>> 8c5b63dc (release: merge staging into master (#1032)) ======= - file: source/reference/databases/mariadb + - file: source/reference/databases/clickhouse - file: source/reference/databases/github <<<<<<< HEAD diff --git a/evadb/third_party/databases/clickhouse/__init__.py b/evadb/third_party/databases/clickhouse/__init__.py index 4fd5b7e27..78545c300 100644 --- a/evadb/third_party/databases/clickhouse/__init__.py +++ b/evadb/third_party/databases/clickhouse/__init__.py @@ -15,10 +15,13 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 9fe75f29 (feat: sync master staging (#1050)) ======= >>>>>>> b87af508 (feat: sync master staging (#1050)) +======= +>>>>>>> a378db4a (Clickhouse integration (#1281)) <<<<<<<< HEAD:evadb/third_party/databases/clickhouse/__init__.py """Clickhouse integrations""" ======== @@ -26,6 +29,7 @@ >>>>>>>> 2dacff69 (feat: sync master staging (#1050)):test/integration_tests/long/functions/ndarray/__init__.py <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= """Clickhouse integrations""" >>>>>>> df079bda (Clickhouse integration (#1281)) @@ -33,3 +37,8 @@ >>>>>>> 9fe75f29 (feat: sync master staging (#1050)) ======= >>>>>>> b87af508 (feat: sync master staging (#1050)) +======= +======= +"""Clickhouse integrations""" +>>>>>>> df079bda (Clickhouse integration (#1281)) +>>>>>>> a378db4a (Clickhouse integration (#1281)) diff --git a/evadb/third_party/databases/interface.py b/evadb/third_party/databases/interface.py index f73cbc0ad..417c5eba0 100644 --- a/evadb/third_party/databases/interface.py +++ b/evadb/third_party/databases/interface.py @@ -240,6 +240,8 @@ def _get_database_handler(engine: str, **kwargs): ======= elif engine == "mariadb": return mod.MariaDbHandler(engine, **kwargs) + elif engine == "clickhouse": + return mod.ClickHouseHandler(engine, **kwargs) elif engine == "github": return mod.GithubHandler(engine, **kwargs) >>>>>>> 40a10ce1 (Bump v0.3.4+ dev) diff --git a/test/third_party_tests/test_native_executor.py b/test/third_party_tests/test_native_executor.py index d05b6824e..9fa3e868d 100644 --- a/test/third_party_tests/test_native_executor.py +++ b/test/third_party_tests/test_native_executor.py @@ -577,6 +577,25 @@ def test_should_run_query_in_mariadb(self): self._execute_native_query() self._execute_evadb_query() + def test_should_run_query_in_clickhouse(self): + # Create database. + params = { + "user": "eva", + "password": "password", + "host": "localhost", + "port": "9000", + "database": "evadb", + } + query = f"""CREATE DATABASE test_data_source + WITH ENGINE = "clickhouse", + PARAMETERS = {params};""" + execute_query_fetch_all(self.evadb, query) + + # Test executions. + self._execute_native_query() + self._execute_evadb_query() + + def test_should_run_query_in_sqlite(self): # Create database. import os