Exemple #1
0
        class TestTable(self.base):
            date = Column(types.Date, primary_key=True)
            x = Column(types.Int32)
            y = Column(types.String)

            __table_args__ = (engines.MergeTree(date, (date, x),
                                                index_granularity=4096), )
Exemple #2
0
        class TestTable(self.base):
            date = Column(types.Date, primary_key=True)
            x = Column(types.Int32)
            y = Column(types.String)

            __table_args__ = (engines.MergeTree('date',
                                                ('date', func.intHash32(x)),
                                                sampling=func.intHash32(x)), )
Exemple #3
0
    def test_text_engine_columns(self):
        table = Table(
            't1',
            self.metadata(),
            Column('date', types.Date, primary_key=True),
            Column('x', types.Int32),
            Column('y', types.String),
            engines.MergeTree('date', ('date', 'x')),
        )

        self.assertEqual(
            self.compile(CreateTable(table)),
            'CREATE TABLE t1 (date Date, x Int32, y String) '
            'ENGINE = MergeTree(date, (date, x), 8192)')
Exemple #4
0
        class TestTable(self.base):
            date = Column(types.Date, primary_key=True)
            x = Column(types.Int32)
            y = Column(types.String)

            __table_args__ = (engines.MergeTree('date', ('date', 'x')), )