Пример #1
0
def create(temp, name, schema, spec):
    ops = TestTableOperations(name, temp)
    if ops.current() is not None:
        raise AlreadyExistsException(
            "Table %s already exists at location: %s" % (name, temp))
    ops.commit(None,
               TableMetadata.new_table_metadata(ops, schema, spec, str(temp)))
    return TestTable(ops, name)
Пример #2
0
def expected():
    return TableMetadata.new_table_metadata(None, SCHEMA,
                                            PartitionSpec.unpartitioned(),
                                            "file://tmp/db/table")