hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dai (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-5098) Fix metastore for SQL Server
Date Thu, 15 Aug 2013 17:55:48 GMT

     [ https://issues.apache.org/jira/browse/HIVE-5098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Dai updated HIVE-5098:
-----------------------------

    Attachment: HIVE-5098-2.patch

One bug fix included in HIVE-5098-2.patch.
                
> Fix metastore for SQL Server
> ----------------------------
>
>                 Key: HIVE-5098
>                 URL: https://issues.apache.org/jira/browse/HIVE-5098
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore, Windows
>            Reporter: Daniel Dai
>            Assignee: Daniel Dai
>             Fix For: 0.12.0
>
>         Attachments: HIVE-5098-1.patch, HIVE-5098-2.patch
>
>
> We found one problem in testing SQL Server metastore. In Hive code, we use substring
function with single parameter in datanucleus query (Expressiontree.java):
> {code}
> if (partitionColumnIndex == (partitionColumnCount - 1)) {
>         valString = "partitionName.substring(partitionName.indexOf(\"" + keyEqual + "\")+"
+ keyEqualLength + ")";
>       }
>       else {
>         valString = "partitionName.substring(partitionName.indexOf(\"" + keyEqual + "\")+"
+ keyEqualLength + ").substring(0, partitionName.substring(partitionName.indexOf(\"" + keyEqual
+ "\")+" + keyEqualLength + ").indexOf(\"/\"))";
>       }
> {code}
> SQL server does not support single parameter substring and datanucleus does not fill
the gap.
> In the attached patch:
> 1. creates a new jar hive-datanucleusplugin.jar in $HIVE_HOME/lib
> 2. hive-datanucleusplugin.jar is a datanucleus plugin (include plugin.xml, MANIFEST.MF)
> 3. The plugin write a specific version of "substring" implementation for sqlserver (which
avoid using single param SUBSTRING, which is not supported in SQLSever)
> 4. The plugin code only kicks in when the rmdb is sqlserver

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message