Browse Source

HUE-49. create table syntax error for partition table

bc Wong 15 years ago
parent
commit
506761f92e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      apps/beeswax/src/beeswax/templates/create_table_statement.mako

+ 4 - 4
apps/beeswax/src/beeswax/templates/create_table_statement.mako

@@ -40,7 +40,7 @@ def col_type(col):
 %   endif
   `${col["column_name"]|n}` ${col_type(col)|n} \
 %   if col.get("comment"):
-   COMMENT "${col["comment"]|n}" \
+COMMENT "${col["comment"]|n}" \
 %   endif
 % endfor
 ) \
@@ -52,12 +52,12 @@ EXTERNAL \
 % endif
 TABLE `${ table["name"] | n }`
 ${column_list(columns)|n}
+% if table["comment"]:
+COMMENT "${table["comment"] | n}"
+% endif
 % if len(partition_columns) > 0:
 PARTITIONED BY ${column_list(partition_columns)|n}
 % endif
-% if table["comment"]:
-  COMMENT "${table["comment"] | n}"
-% endif
 ## TODO: CLUSTERED BY here
 ## TODO: SORTED BY...INTO...BUCKETS here
 ROW FORMAT \