소스 검색

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

Romain Rigaux 8 년 전
부모
커밋
f779c81
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"]
 
 %>