Browse Source

[metastore] Fix table/column terms call

Enrico Berti 10 năm trước cách đây
mục cha
commit
d0e6f7ac95

+ 4 - 4
desktop/core/src/desktop/static/desktop/js/assist/tableStats.js

@@ -144,16 +144,16 @@
 
   TableStats.prototype.fetchTerms = function () {
     var self = this;
-    if (self.column == null || (self.isComplexType && self.sourceType == "impala")) {
+    if ((ko.isObservable(self.column) && self.column() == null) || self.column == null || (self.isComplexType && self.sourceType == "impala")) {
       return;
     }
 
     self.loadingTerms(true);
     self.assistHelper.fetchTerms({
       sourceType: self.sourceType === "hive" ? "beeswax" : self.sourceType,
-      databaseName: self.database,
-      tableName: self.table,
-      columnName: self.column,
+      databaseName: ko.isObservable(self.database) ? self.database() : self.database,
+      tableName: ko.isObservable(self.table) ? self.table() : self.table,
+      columnName: ko.isObservable(self.column) ? self.column() : self.column,
       prefixFilter: self.prefixFilter(),
       successCallback: function (data) {
         if (data && data.status == 0) {