Revision 3174
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_io.py | ||
---|---|---|
137 | 137 |
|
138 | 138 |
# Add column |
139 | 139 |
new_typed_col = sql_gen.TypedCol(new_col.name, type_) |
140 |
sql.add_col(db, table, new_typed_col, comment='src: '+repr(col))
|
|
140 |
sql.add_col(db, table, new_typed_col, comment=repr(col)+'::'+type_)
|
|
141 | 141 |
new_col.name = new_typed_col.name # propagate any renaming |
142 | 142 |
|
143 | 143 |
sql.update(db, table, [(new_col, expr)], in_place=True, recover=True) |
Also available in: Unified diff
sql_io.py: cast_temp_col(): add_col()'s distinguishing comment param: Add the type in case the same input column is being cast to different types, and both types have the same first word (causing their new column names to be the same)