Ejemplo n.º 1
0
def impl(context, tablename, schemaname):
    if not check_schema_exists(context, schemaname, context.dbname):
        raise Exception("Schema %s does not exist in database %s" % (schemaname, context.dbname))
    drop_table_if_exists(context, '.'.join([schemaname, tablename]), context.dbname)
    dbconn.execSQL(context.conn, CREATE_MULTI_PARTITION_TABLE_SQL % (schemaname, tablename))
    context.conn.commit()
    check_table_exists(context, context.dbname, '.'.join([schemaname, tablename]), table_type = 'ao')
Ejemplo n.º 2
0
def impl(context, storage_type, tablename, col_name_list, col_type_list, schemaname):
    schemaname_no_quote = schemaname
    if '"' in schemaname:
        schemaname_no_quote = schemaname[1:-1]
    if not check_schema_exists(context, schemaname_no_quote, context.dbname):
        raise Exception("Schema %s does not exist in database %s" % (schemaname_no_quote, context.dbname))
    drop_table_if_exists(context, '.'.join([schemaname, tablename]), context.dbname)
    create_table_with_column_list(context.conn, storage_type, schemaname, tablename, col_name_list, col_type_list)
    check_table_exists(context, context.dbname, '.'.join([schemaname, tablename]), table_type = storage_type)
Ejemplo n.º 3
0
def impl(context, tablename, schemaname):
    if not check_schema_exists(context, schemaname, context.dbname):
        raise Exception("Schema %s does not exist in database %s" %
                        (schemaname, context.dbname))
    drop_table_if_exists(context, '.'.join([schemaname, tablename]),
                         context.dbname)
    dbconn.execSQL(context.conn,
                   CREATE_MULTI_PARTITION_TABLE_SQL % (schemaname, tablename))
    context.conn.commit()
    check_table_exists(context,
                       context.dbname,
                       '.'.join([schemaname, tablename]),
                       table_type='ao')
Ejemplo n.º 4
0
def impl(context, storage_type, tablename, col_name_list, col_type_list,
         schemaname):
    if not check_schema_exists(context, schemaname, context.dbname):
        raise Exception("Schema %s does not exist in database %s" %
                        (schemaname, context.dbname))
    drop_table_if_exists(context, '.'.join([schemaname, tablename]),
                         context.dbname)
    create_table_with_column_list(context.conn, storage_type, schemaname,
                                  tablename, col_name_list, col_type_list)
    check_table_exists(context,
                       context.dbname,
                       '.'.join([schemaname, tablename]),
                       table_type=storage_type)
Ejemplo n.º 5
0
def impl(context, rel_name, db_name):
    drop_table_if_exists(context, rel_name, db_name)