Browse Source

HUE-3450 [metastore] Require at least 3 columns for the top columns

Romain Rigaux 9 years ago
parent
commit
94b5256aa1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/metastore/src/metastore/static/metastore/js/metastore.ko.js

+ 1 - 1
apps/metastore/src/metastore/static/metastore/js/metastore.ko.js

@@ -463,7 +463,7 @@
                   
                   // Bump the most important columns first
                   var topCol = self.optimizerDetails().table_donut.topColumns().slice(0, 5);
-                  if (self.favouriteColumns().length > 0) { 
+                  if (topCol.length >= 3 && self.favouriteColumns().length > 0) { 
                     self.favouriteColumns($.grep(self.columns(), function(col) {
                         return topCol.indexOf(col.name()) != -1;
                       })