فهرست منبع

HUE-7 [importer] Varchar numbers do not need to casted to numbers

Romain Rigaux 8 سال پیش
والد
کامیت
f779c812c0
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      desktop/libs/indexer/src/indexer/templates/gen/create_table_statement.mako

+ 2 - 2
desktop/libs/indexer/src/indexer/templates/gen/create_table_statement.mako

@@ -23,9 +23,9 @@ def col_type(col):
   elif col["type"] == "map":
     return "map <%s, %s>" % (col["nested"][0]["keyType"], '%s' % col_type(col["nested"][0]) if col["type"] in ('array', 'struct', 'map') else col["type"])
   elif col["type"] == "char":
-    return "char(%d)" % col["length"]
+    return "char(%s)" % col["length"]
   elif col["type"] == "varchar":
-    return "varchar(%d)" % col["length"]
+    return "varchar(%s)" % col["length"]
   return col["type"]
 
 %>