Skip to content

Commit

Permalink
Clickhouse integration (georgia-tech-db#1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
Preethi1609 authored and a0x8o committed Nov 22, 2023
1 parent 21b7597 commit 6bfedcf
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 9 additions & 0 deletions evadb/third_party/databases/clickhouse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,30 @@
<<<<<<< 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"""
========
"""user defined test functions operating on ndarrays functions"""
>>>>>>>> 2dacff69 (feat: sync master staging (#1050)):test/integration_tests/long/functions/ndarray/__init__.py
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
"""Clickhouse integrations"""
>>>>>>> df079bda (Clickhouse integration (#1281))
=======
>>>>>>> 9fe75f29 (feat: sync master staging (#1050))
=======
>>>>>>> b87af508 (feat: sync master staging (#1050))
=======
=======
"""Clickhouse integrations"""
>>>>>>> df079bda (Clickhouse integration (#1281))
>>>>>>> a378db4a (Clickhouse integration (#1281))
2 changes: 2 additions & 0 deletions evadb/third_party/databases/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
19 changes: 19 additions & 0 deletions test/third_party_tests/test_native_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6bfedcf

Please # to comment.