

def test_create_table_with_partition_column(self):
    schema = ibis.schema([('year', 'int32'), ('month', 'string'), ('day', 'int8'), ('value', 'double')])
    name = _tmp_name()
    self.con.create_table(name, schema=schema, database=self.tmp_db, partition=['year', 'month'])
    self.temp_tables.append(name)
    ex_schema = ibis.schema([('day', 'int8'), ('value', 'double'), ('year', 'int32'), ('month', 'string')])
    table_schema = self.con.get_schema(name, database=self.tmp_db)
    assert_equal(table_schema, ex_schema)
    partition_schema = self.db.table(name).partition_schema()
    expected = ibis.schema([('year', 'int32'), ('month', 'string')])
    assert_equal(partition_schema, expected)

dataset/ETHPy150Open cloudera/ibis/ibis/impala/tests/test_partition.py TestPartitioning.test_create_table_with_partition_column/original