Browse Source

HUE-4726 [core] Update parquet-python to use Python 2.6 compatible dict comprehension

Jenny Kim 9 years ago
parent
commit
1d414c3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      desktop/core/ext-py/parquet-1.1/parquet/__init__.py

+ 1 - 1
desktop/core/ext-py/parquet-1.1/parquet/__init__.py

@@ -470,7 +470,7 @@ def _dump(fo, options, out=sys.stdout):
             writer.writeheader()
         if options.limit != -1 and total_count >= options.limit:
             return
-        row_unicode = {k: v.decode("utf-8") if type(v) is bytes else v for k, v in row.items()}
+        row_unicode = dict((k, (v.decode("utf-8") if type(v) is bytes else v)) for k, v in row.items())
         writer.writerow(row_unicode)
         total_count += 1