You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "rohithsharma (JIRA)" <ji...@apache.org> on 2012/08/31 08:44:07 UTC

[jira] [Created] (HIVE-3419) drop partition does not work for non-equality oprator.

rohithsharma created HIVE-3419:
----------------------------------

             Summary: drop partition does not work for non-equality oprator.
                 Key: HIVE-3419
                 URL: https://issues.apache.org/jira/browse/HIVE-3419
             Project: Hive
          Issue Type: Bug
          Components: Metastore, Query Processor
    Affects Versions: 0.10.0, 0.9.1
         Environment: Hive -0.9.1
postgres-9.0.7 as metastore.
            Reporter: rohithsharma


Drop partition query failes when below query is executed with postgres as metastore.Whereas when derby is used, drop partition query is pased.

create table ptestfilter (a string, b int) partitioned by (c string);
alter table ptestfilter1 add partition (c='1');
alter table ptestfilter1 add partition (c='2');
"alter table ptestfilter1 drop partition (c!='2');"--> failed


--
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

[jira] [Commented] (HIVE-3419) drop partition does not work for non-equality oprator.

Posted by "Edward Capriolo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446541#comment-13446541 ] 

Edward Capriolo commented on HIVE-3419:
---------------------------------------

I am somewhat scared to let people drop by non-quality. It seems like potential 'rm -rf' situation.
                
> drop partition does not work for non-equality oprator.
> ------------------------------------------------------
>
>                 Key: HIVE-3419
>                 URL: https://issues.apache.org/jira/browse/HIVE-3419
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>    Affects Versions: 0.10.0, 0.9.1
>         Environment: Hive -0.9.1
> postgres-9.0.7 as metastore.
>            Reporter: rohithsharma
>
> Drop partition query failes when below query is executed with postgres as metastore.Whereas when derby is used, drop partition query is pased.
> create table ptestfilter (a string, b int) partitioned by (c string);
> alter table ptestfilter1 add partition (c='1');
> alter table ptestfilter1 add partition (c='2');
> "alter table ptestfilter1 drop partition (c!='2');"--> failed

--
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

[jira] [Commented] (HIVE-3419) drop partition does not work for non-equality oprator.

Posted by "rohithsharma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445818#comment-13445818 ] 

rohithsharma commented on HIVE-3419:
------------------------------------

I think it looks like problem with datanuclues.I found another issue HIVE-2609 with same cause for the problem.
                
> drop partition does not work for non-equality oprator.
> ------------------------------------------------------
>
>                 Key: HIVE-3419
>                 URL: https://issues.apache.org/jira/browse/HIVE-3419
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>    Affects Versions: 0.10.0, 0.9.1
>         Environment: Hive -0.9.1
> postgres-9.0.7 as metastore.
>            Reporter: rohithsharma
>
> Drop partition query failes when below query is executed with postgres as metastore.Whereas when derby is used, drop partition query is pased.
> create table ptestfilter (a string, b int) partitioned by (c string);
> alter table ptestfilter1 add partition (c='1');
> alter table ptestfilter1 add partition (c='2');
> "alter table ptestfilter1 drop partition (c!='2');"--> failed

--
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

[jira] [Commented] (HIVE-3419) drop partition does not work for non-equality oprator.

Posted by "rohithsharma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445726#comment-13445726 ] 

rohithsharma commented on HIVE-3419:
------------------------------------

JDO throws NullPointerException for above partitions.

{noformat}
2012-08-31 12:13:26,466 DEBUG metastore.ObjectStore (ObjectStore.java:listMPartitionsByFilter(1680)) - Executing listMPartitionsByFilter
2012-08-31 12:13:26,474 DEBUG metastore.ObjectStore (ObjectStore.java:makeQueryFilterString(1636)) - jdoFilter =  partitionName.substring(partitionName.indexOf("c=")+2) != hive_filter_param_0
2012-08-31 12:13:26,475 DEBUG metastore.ObjectStore (ObjectStore.java:listMPartitionsByFilter(1701)) - Filter specified is c <> '2', JDOQL filter is table.tableName == t1 && table.database.name == t2 && ( partitionName.substring(partitionName.indexOf("c=")+2) != hive_filter_param_0 )
2012-08-31 12:13:26,478 ERROR ql.Driver (SessionState.java:printError(400)) - FAILED: Error in semantic analysis: Partition not found c <> '2'
org.apache.hadoop.hive.ql.parse.SemanticException: Partition not found c <> '2'
	at org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.addTableDropPartsOutputs(DDLSemanticAnalyzer.java:2249)
	at org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTableDropParts(DDLSemanticAnalyzer.java:1818)
	at org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:300)
	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:244)
...
...
...
Caused by: java.lang.NullPointerException
	at org.datanucleus.store.mapped.mapping.MappingHelper.getMappingIndices(MappingHelper.java:35)
	at org.datanucleus.store.mapped.expression.StatementText.applyParametersToStatement(StatementText.java:194)
	at org.datanucleus.store.rdbms.query.RDBMSQueryUtils.getPreparedStatementForQuery(RDBMSQueryUtils.java:233)
	at org.datanucleus.store.rdbms.query.legacy.SQLEvaluator.evaluate(SQLEvaluator.java:115)
	at org.datanucleus.store.rdbms.query.legacy.JDOQLQuery.performExecute(JDOQLQuery.java:288)
	at org.datanucleus.store.query.Query.executeQuery(Query.java:1657)
	at org.datanucleus.store.rdbms.query.legacy.JDOQLQuery.executeQuery(JDOQLQuery.java:245)
	at org.datanucleus.store.query.Query.executeWithMap(Query.java:1526)
	at org.datanucleus.jdo.JDOQuery.executeWithMap(JDOQuery.java:334)
	at org.apache.hadoop.hive.metastore.ObjectStore.listMPartitionsByFilter(ObjectStore.java:1711)
	at org.apache.hadoop.hive.metastore.ObjectStore.getPartitionsByFilter(ObjectStore.java:1586)
{noformat}
                
> drop partition does not work for non-equality oprator.
> ------------------------------------------------------
>
>                 Key: HIVE-3419
>                 URL: https://issues.apache.org/jira/browse/HIVE-3419
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore, Query Processor
>    Affects Versions: 0.10.0, 0.9.1
>         Environment: Hive -0.9.1
> postgres-9.0.7 as metastore.
>            Reporter: rohithsharma
>
> Drop partition query failes when below query is executed with postgres as metastore.Whereas when derby is used, drop partition query is pased.
> create table ptestfilter (a string, b int) partitioned by (c string);
> alter table ptestfilter1 add partition (c='1');
> alter table ptestfilter1 add partition (c='2');
> "alter table ptestfilter1 drop partition (c!='2');"--> failed

--
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