Browse Source

HUE-7702 [editor] Marker map lat and lon column section fields are always empty

Enrico Berti 8 years ago
parent
commit
2026612247

+ 7 - 3
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -131,15 +131,19 @@ var EditorViewModel = (function() {
     });
     });
 
 
     function isNumericColumn(type) {
     function isNumericColumn(type) {
-      return $.inArray(type, ['TINYINT_TYPE', 'SMALLINT_TYPE', 'INT_TYPE', 'BIGINT_TYPE', 'FLOAT_TYPE', 'DOUBLE_TYPE', 'DECIMAL_TYPE']) > -1;
+      return $.inArray(type, ['tinyint', 'smallint', 'int', 'bigint', 'float', 'double', 'decimal', 'real']) > -1;
     }
     }
 
 
     function isDateTimeColumn(type) {
     function isDateTimeColumn(type) {
-      return $.inArray(type, ['TIMESTAMP_TYPE', 'DATE_TYPE']) > -1;
+      return $.inArray(type, ['timestamp', 'date']) > -1;
+    }
+
+    function isComplexColumn(type) {
+      return $.inArray(type, ['array', 'map', 'struct']) > -1;
     }
     }
 
 
     function isStringColumn(type) {
     function isStringColumn(type) {
-      return !isNumericColumn(type) && !isDateTimeColumn(type);
+      return !isNumericColumn(type) && !isDateTimeColumn(type) && !isComplexColumn(type);
     }
     }
 
 
     self.cleanedNumericMeta = ko.computed(function () {
     self.cleanedNumericMeta = ko.computed(function () {