[ 
https://issues.apache.org/jira/browse/TRAFODION-762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15313483#comment-15313483
 ] 

ASF GitHub Bot commented on TRAFODION-762:
------------------------------------------

Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/496#discussion_r65648854
  
    --- Diff: core/sql/executor/ExExeUtilGet.cpp ---
    @@ -4940,6 +4946,41 @@ Lng32 
ExExeUtilHiveMDaccessTcb::getLengthFromHiveColType(const char* hiveType)
       if ( !strcmp(hiveType, "timestamp"))
         return 26; //Is this internal or display length? REC_DATETIME;
     
    +  if ( !strcmp(hiveType, "date"))
    +    return 10; //Is this internal or display length? REC_DATETIME;
    +  
    +  if ( !strncmp(hiveType, "varchar",7) )
    +  {
    +    //try to get the length
    +    char maxLen[32];
    +    memset(maxLen, 0, 32);
    +    int i=0,j=0;
    +    short copyit = 0;
    +
    +    if(strlen(hiveType) > 39)  return -1;  
    + 
    +    for(i = 0; i < strlen(hiveType) ; i++)
    --- End diff --
    
    Not sure if the compiler would optimize it to avoid calling strlen 
everytime.


> LP Bug: 1392452 - Support new Hive data types such as CHAR
> ----------------------------------------------------------
>
>                 Key: TRAFODION-762
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-762
>             Project: Apache Trafodion
>          Issue Type: Wish
>          Components: sql-cmp
>            Reporter: Hans Zeller
>            Assignee: liu ming
>            Priority: Minor
>
> Hive now seems to support data types that match Trafodion types very well.
> According to 
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Create/Drop/TruncateTable
> Hive 0.11 supports DECIMAL
> Hive 0.12 supports VARCHAR
> Hive 0.13 supports CHAR, DECIMAL(precision, scale)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to