Project

General

Profile

« Previous | Next » 

Revision 5888

sql_io.py: put_table(): ensure_cond(): is_function: Fixed bug where can't replace out_table_cols with NULL because out_table is a function, not a table

View differences:

lib/sql_io.py
472 472
            elif failed: remove_all_rows()
473 473
            else: raise NotImplementedError()
474 474
        else:
475
            out_table_cols = sql_gen.ColDict(db, out_table)
476
            out_table_cols.update(util.dict_subset_right_join({},
477
                sql.table_col_names(db, out_table)))
475
            if not is_function:
476
                out_table_cols = sql_gen.ColDict(db, out_table)
477
                out_table_cols.update(util.dict_subset_right_join({},
478
                    sql.table_col_names(db, out_table)))
478 479
            
479 480
            in_cols = []
480 481
            orig_cond = cond
481 482
            cond = sql_gen.map_expr(db, cond, mapping, in_cols)
482
            cond = sql_gen.map_expr(db, cond, out_table_cols)
483
            if not is_function:
484
                cond = sql_gen.map_expr(db, cond, out_table_cols)
483 485
            
484 486
            not_cond = sql_gen.NotCond(sql_gen.CustomCode(cond))
485 487
            log_debug('Ignoring rows that do not satisfy '+strings.as_tt(cond))

Also available in: Unified diff