Revision 2895
Added by Aaron Marcuse-Kubitza about 12 years ago
sql.py | ||
---|---|---|
1235 | 1235 |
def ignore(in_col, value, e): |
1236 | 1236 |
track_data_error(db, errors_table_, in_col.srcs, value, e.cause.pgcode, |
1237 | 1237 |
e.cause.pgerror) |
1238 |
|
|
1239 |
in_col_str = strings.as_tt(repr(in_col)) |
|
1240 |
db.log_debug('Adding index on '+in_col_str+' to enable fast filtering', |
|
1241 |
level=2.5) |
|
1242 |
add_index(db, in_col) |
|
1243 |
|
|
1244 |
log_debug('Ignoring rows with '+in_col_str+' = ' |
|
1238 |
log_debug('Ignoring rows with '+strings.as_tt(repr(in_col))+' = ' |
|
1245 | 1239 |
+strings.as_tt(repr(value))) |
1240 |
|
|
1246 | 1241 |
def remove_rows(in_col, value, e): |
1247 | 1242 |
ignore(in_col, value, e) |
1248 | 1243 |
cond = (in_col, sql_gen.CompareCond(value, '!=')) |
1249 | 1244 |
assert cond not in conds # avoid infinite loops |
1250 | 1245 |
conds.add(cond) |
1246 |
|
|
1251 | 1247 |
def invalid2null(in_col, value, e): |
1252 | 1248 |
ignore(in_col, value, e) |
1253 | 1249 |
update(db, in_table, [(in_col, None)], |
Also available in: Unified diff
sql.py: put_table(): Don't add index on columns that will have values filtered out, because indexes have already been added on all columns in the iteration's input table by flatten()