Exemplo n.º 1
0
import os

import pytest
from helpers.cluster import ClickHouseCluster
from helpers.dictionary import Field, Row, Dictionary, DictionaryStructure, Layout
from helpers.external_sources import SourceRedis

cluster = None
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
dict_configs_path = os.path.join(SCRIPT_DIR, 'configs/dictionaries')
node = None

KEY_FIELDS = {
    "simple":
    [Field("KeyField", 'UInt64', is_key=True, default_value_for_get=9999999)],
    "complex": [
        Field("KeyField1",
              'UInt64',
              is_key=True,
              default_value_for_get=9999999),
        Field("KeyField2",
              'String',
              is_key=True,
              default_value_for_get='xxxxxxxxx'),
    ]
}

KEY_VALUES = {"simple": [[1], [2]], "complex": [[1, 'world'], [2, 'qwerty2']]}

FIELDS = [
    Field("UInt8_", 'UInt8', default_value_for_get=55),
Exemplo n.º 2
0
import os
import shutil
import pytest
import logging
from helpers.cluster import ClickHouseCluster
from helpers.dictionary import Field, Row, Dictionary, DictionaryStructure, Layout
from helpers.external_sources import SourceRedis

cluster = ClickHouseCluster(__file__)
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
dict_configs_path = os.path.join(SCRIPT_DIR, "configs/dictionaries")

KEY_FIELDS = {
    "simple": [Field("KeyField", "UInt64", is_key=True, default_value_for_get=9999999)],
    "complex": [
        Field("KeyField1", "UInt64", is_key=True, default_value_for_get=9999999),
        Field("KeyField2", "String", is_key=True, default_value_for_get="xxxxxxxxx"),
    ],
}

KEY_VALUES = {"simple": [[1], [2]], "complex": [[1, "world"], [2, "qwerty2"]]}

FIELDS = [
    Field("UInt8_", "UInt8", default_value_for_get=55),
    Field("UInt16_", "UInt16", default_value_for_get=66),
    Field("UInt32_", "UInt32", default_value_for_get=77),
    Field("UInt64_", "UInt64", default_value_for_get=88),
    Field("Int8_", "Int8", default_value_for_get=-55),
    Field("Int16_", "Int16", default_value_for_get=-66),
    Field("Int32_", "Int32", default_value_for_get=-77),
    Field("Int64_", "Int64", default_value_for_get=-88),
Exemplo n.º 3
0
import os
import shutil

from helpers.dictionary import Field, Row, Dictionary, DictionaryStructure, Layout

KEY_FIELDS = {
    "simple":
    [Field("KeyField", 'UInt64', is_key=True, default_value_for_get=9999999)],
    "complex": [
        Field("KeyField1",
              'UInt64',
              is_key=True,
              default_value_for_get=9999999),
        Field("KeyField2",
              'String',
              is_key=True,
              default_value_for_get='xxxxxxxxx')
    ],
    "ranged": [
        Field("KeyField1", 'UInt64', is_key=True),
        Field("KeyField2", 'Date', is_range_key=True)
    ]
}

START_FIELDS = {
    "simple": [],
    "complex": [],
    "ranged": [
        Field("StartDate", 'Date', range_hash_type='min'),
        Field("EndDate", 'Date', range_hash_type='max')
    ]
Exemplo n.º 4
0
import os
import shutil

from helpers.dictionary import Field, Row, Dictionary, DictionaryStructure, Layout

KEY_FIELDS = {
    "simple": [Field("KeyField", "UInt64", is_key=True, default_value_for_get=9999999)],
    "complex": [
        Field("KeyField1", "UInt64", is_key=True, default_value_for_get=9999999),
        Field("KeyField2", "String", is_key=True, default_value_for_get="xxxxxxxxx"),
    ],
    "ranged": [
        Field("KeyField1", "UInt64", is_key=True),
        Field("KeyField2", "Date", is_range_key=True),
    ],
}

START_FIELDS = {
    "simple": [],
    "complex": [],
    "ranged": [
        Field("StartDate", "Date", range_hash_type="min"),
        Field("EndDate", "Date", range_hash_type="max"),
    ],
}

MIDDLE_FIELDS = [
    Field("UInt8_", "UInt8", default_value_for_get=55),
    Field("UInt16_", "UInt16", default_value_for_get=66),
    Field("UInt32_", "UInt32", default_value_for_get=77),
    Field("UInt64_", "UInt64", default_value_for_get=88),