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

Imran Rashid commented on SPARK-12313:
--------------------------------------

There is another metastore api, {{getPartitions(..., partitionSpec)}}, that we 
could use instead.  I haven't tested this out, but I hear that it works better 
when there are lots of partitions, and furthermore that is what hive itself 
uses more often.  However, it doesn't support < or > constraints, as near as I 
can tell, so we can't always use.

I'm just going to submit a PR that demonstrates how we would do this -- however 
I'm really uncertain whether this is really the right thing to do here, its 
more just a proof of concept to gather input.

> getPartitionsByFilter doesnt handle predicates on all / multiple Partition 
> Columns
> ----------------------------------------------------------------------------------
>
>                 Key: SPARK-12313
>                 URL: https://issues.apache.org/jira/browse/SPARK-12313
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.5.1
>            Reporter: Gobinathan SP
>            Assignee: Harsh Gupta
>            Priority: Critical
>
> When enabled spark.sql.hive.metastorePartitionPruning, the 
> getPartitionsByFilter is used
> For a table partitioned by p1 and p2, when triggered hc.sql("select col.... 
> from tabl1 where p1='p1V' and p2= 'p2V' ")
> The HiveShim identifies the Predicates and ConvertFilters returns p1='p1V' 
> and col2= 'p2V' . The same is passed to the getPartitionsByFilter method as 
> filter string.
> On these cases the partitions are not returned from Hive's 
> getPartitionsByFilter method. As a result, for the sql, the number of 
> returned rows is always zero. 
> However, filter on a single column always works. Probalbly  it doesn't come 
> through this route
> I'm using Oracle for Metstore V0.13.1



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to