hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Min Zhou (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-577) return correct comment of a column from ThriftHiveMetastore.Iface.get_fields
Date Tue, 30 Jun 2009 05:31:48 GMT

    [ https://issues.apache.org/jira/browse/HIVE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725475#action_12725475
] 

Min Zhou commented on HIVE-577:
-------------------------------

see MetaStoreUtils.java: 437-457
{code:java}
  public static String getDDLFromFieldSchema(String structName, List<FieldSchema> fieldSchemas)
{
    StringBuilder ddl = new StringBuilder();
    ddl.append("struct ");
    ddl.append(structName);
    ddl.append(" { ");
    boolean first = true;
    for (FieldSchema col: fieldSchemas) {
      if (first) {
        first = false;
      } else {
        ddl.append(", ");
      }
      ddl.append(typeToThriftType(col.getType()));
      ddl.append(' ');
      ddl.append(col.getName());
    }
    ddl.append("}");
    
    LOG.info("DDL: " + ddl);
    return ddl.toString();
  }
{code}

That method return a DDL struct{ type1 col1, type2 col2, ...} ,  which should be struct{ struct{type1
col1, string comment1}, struct{type2 col2, string comment2}, ...} for retrieving comments
of those columns.  but PlanUtils.getBinarySortableTableDesc() who also call that method  don't
need any comments .

> return correct comment of a column from ThriftHiveMetastore.Iface.get_fields
> ----------------------------------------------------------------------------
>
>                 Key: HIVE-577
>                 URL: https://issues.apache.org/jira/browse/HIVE-577
>             Project: Hadoop Hive
>          Issue Type: Sub-task
>            Reporter: Min Zhou
>            Assignee: Min Zhou
>         Attachments: HIVE-577.1.patch, HIVE-577.2.patch
>
>
> comment of each column hasnot been retrieved correct right now , 
> FieldSchema.getComment() will return a string "from derserializer".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message