TRIVIAL add test

This commit is contained in:
Itai Shirav 2020-05-28 19:38:51 +03:00
parent 113ac7ad4a
commit 6702cffe72

View File

@ -2,11 +2,7 @@ from __future__ import unicode_literals
import unittest import unittest
import datetime import datetime
from infi.clickhouse_orm.system_models import SystemPart from infi.clickhouse_orm import *
from infi.clickhouse_orm.database import Database, DatabaseException, ServerError
from infi.clickhouse_orm.models import Model, MergeModel, DistributedModel
from infi.clickhouse_orm.fields import *
from infi.clickhouse_orm.engines import *
import logging import logging
logging.getLogger("requests").setLevel(logging.WARNING) logging.getLogger("requests").setLevel(logging.WARNING)
@ -38,6 +34,11 @@ class EnginesTestCase(_EnginesHelperTestCase):
engine = MergeTree('date', ('date', 'event_id', 'event_group', 'intHash32(event_id)'), sampling_expr='intHash32(event_id)') engine = MergeTree('date', ('date', 'event_id', 'event_group', 'intHash32(event_id)'), sampling_expr='intHash32(event_id)')
self._create_and_insert(TestModel) self._create_and_insert(TestModel)
def test_merge_tree_with_sampling__funcs(self):
class TestModel(SampleModel):
engine = MergeTree('date', ('date', 'event_id', 'event_group', F.intHash32(SampleModel.event_id)), sampling_expr=F.intHash32(SampleModel.event_id))
self._create_and_insert(TestModel)
def test_merge_tree_with_granularity(self): def test_merge_tree_with_granularity(self):
class TestModel(SampleModel): class TestModel(SampleModel):
engine = MergeTree('date', ('date', 'event_id', 'event_group'), index_granularity=4096) engine = MergeTree('date', ('date', 'event_id', 'event_group'), index_granularity=4096)