diff options
author | Harel Ben-Attia <harelba@gmail.com> | 2017-04-23 10:26:56 +0300 |
---|---|---|
committer | Harel Ben-Attia <harelba@gmail.com> | 2017-04-23 10:26:56 +0300 |
commit | ab509c7bcba8e2aa20cb9b3234124fabd39b7d30 (patch) | |
tree | 54ca5c98e7d109810dc0afa491319e6d308cacc0 /bin | |
parent | a81a493bcee35177d5fbdb17e72209723bf91bb1 (diff) |
Added proper error messages when having duplicate column names
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/q | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -525,6 +525,13 @@ class TableColumnInferer(object): column_name_errors.append( (v, "Column name must be UTF-8 Compatible")) continue + # We're checking for column duplication for each field in order to be able to still provide it along with other errors + if len(filter(lambda x: x == v,value_list)) > 1: + entry = (v, "Column name is duplicated") + # Don't duplicate the error report itself + if entry not in column_name_errors: + column_name_errors.append(entry) + continue nul_index = v.find("\x00") if nul_index >= 0: column_name_errors.append( |