Browse Source

[metastore] Do not check for valid number of columns

Depending on the size of 2 records, it might truncate the data
and some columns will be missing.
Romain Rigaux 12 years ago
parent
commit
6582441ca4
1 changed files with 0 additions and 5 deletions
  1. 0 5
      apps/beeswax/src/beeswax/create_table.py

+ 0 - 5
apps/beeswax/src/beeswax/create_table.py

@@ -193,11 +193,6 @@ def import_wizard(request, database='default'):
                 column_name='col_%s' % (i,),
                 column_name='col_%s' % (i,),
                 column_type='string',
                 column_type='string',
             ))
             ))
-          col_length = map(len, fields_list)
-          if col_length != [n_cols] * len(fields_list):
-            raise PopupException(_('Some rows do not have %s columns. Delimiter "%s" is probably not escaped properly.') %
-                                 (n_cols, DELIMITER_READABLE.get(s2_delim_form['delimiter'].data[0], s2_delim_form['delimiter'].data[1])),
-                                 detail='Number of columns by row: %s' % col_length)
           s3_col_formset = ColumnTypeFormSet(prefix='cols', initial=columns)
           s3_col_formset = ColumnTypeFormSet(prefix='cols', initial=columns)
         return render('define_columns.mako', request, {
         return render('define_columns.mako', request, {
           'action': reverse(app_name + ':import_wizard', kwargs={'database': database}),
           'action': reverse(app_name + ':import_wizard', kwargs={'database': database}),