Răsfoiți Sursa

HUE-5991 [metastore] New table with Date time works with Hive but not
with Impala

jdesjean 8 ani în urmă
părinte
comite
6f05306d43

+ 3 - 3
desktop/libs/indexer/src/indexer/fields.py

@@ -75,9 +75,9 @@ class Field(object):
 FIELD_TYPES = [
   FieldType('text_en', "^[\\s\\S]*$", heuristic_regex="^[\\s\\S]{101,}$"),
   FieldType('string', "^[\\s\\S]*$", heuristic_regex="^[\\s\\S]{1,100}$"),
-  FieldType('double', "^([+-]?[0-9]+(\\.[0-9]+)?)?$"),
-  FieldType('long', "^(?:[+-]?(?:[0-9]+))?$"),
-  FieldType('date', "^([0-9]+-[0-9]+-[0-9]+T[0-9]+:[0-9]+:[0-9]+(\\.[0-9]*)?Z)?$")
+  FieldType('double', "^([+-]?[0-9]+(\.[0-9]+)?(E[+-]?[0-9]+)?)$"),
+  FieldType('long', "^(?:[+-]?(?:[0-9]+))$"),
+  FieldType('date', "^([0-9]+-[0-9]+-[0-9]+(\s+|T)[0-9]+:[0-9]+:[0-9]+(\.[0-9]*)?Z?)$")
 ]
 
 def get_field_type(type_name):

+ 1 - 1
desktop/libs/indexer/src/indexer/templates/importer.mako

@@ -1013,7 +1013,7 @@ ${ assist.assistPanel() }
         "string": "string",
         "long": "bigint",
         "double": "double",
-        "date": "date"
+        "date": "timestamp"
       },
       HIVE_TO_SOLR: {
         "bigint": "long"