Pārlūkot izejas kodu

HUE-6660 [optimizer] Limit the number of columns we send stats for

It is one call by column with Hive so far, which is too much with hundreds of columns, several tables
Romain Rigaux 8 gadi atpakaļ
vecāks
revīzija
d3c3eab9f3
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      desktop/libs/metadata/src/metadata/optimizer_api.py

+ 1 - 1
desktop/libs/metadata/src/metadata/optimizer_api.py

@@ -423,7 +423,7 @@ def upload_table_stats(request):
       })
 
       if with_columns:
-        for col in full_table_stats['columns']:
+        for col in full_table_stats['columns'][:25]:
           col_stats = json.loads(get_table_stats(request, database=path['database'], table=path['table'], column=col).content)['stats']
           col_stats = dict([(key, val) for col_stat in col_stats for key, val in col_stat.iteritems()])