Эх сурвалжийг харах

HUE-4516 [indexer] Switching file types doesn't update fields properly in the indexer wizard

peddle 9 жил өмнө
parent
commit
fa56692

+ 2 - 2
desktop/libs/indexer/src/indexer/file_format.py

@@ -464,9 +464,9 @@ class HiveFormat(CSVFormat):
     "BIGINT_TYPE": "long",
     "FLOAT_TYPE": "double",
     "DOUBLE_TYPE": "double",
-    "STRING_TYPE":"string",
+    "STRING_TYPE": "string",
     "TIMESTAMP_TYPE": "date",
-    "BINARY_TYPE": "long",
+    "BINARY_TYPE": "string",
     "DECIMAL_TYPE": "double",
     "DATE_TYPE": "date",
   }

+ 2 - 0
desktop/libs/indexer/src/indexer/templates/indexer.mako

@@ -516,6 +516,8 @@ ${ assist.assistPanel() }
       if (self.fileFormat().format().type) {
         self.fileFormat().format().type.subscribe(function (newType) {
           self.fileFormat().format(new FileType(newType));
+          self.fileFormat().columns.removeAll();
+          self.guessFieldTypes();
         });
       }
     });