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 5af9ad0 commit 0c5efce
Show file tree
Hide file tree
Showing 4 changed files with 26 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 @@ -263,6 +263,7 @@ parts:
=======
=======
- file: source/reference/databases/mariadb
- file: source/reference/databases/clickhouse
- file: source/reference/databases/github
<<<<<<< HEAD

Expand Down
4 changes: 4 additions & 0 deletions evadb/third_party/databases/clickhouse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
<<<<<<< HEAD
<<<<<<<< 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
=======
"""Clickhouse integrations"""
>>>>>>> df079bda (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 @@ -89,6 +89,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 @@ -340,6 +340,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 0c5efce

Please # to comment.