[ 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