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

Aihua Xu commented on HIVE-10454:
---------------------------------

That condition doesn't check how many partitions will be involved. It's just 
reminding you that you need to provide predicates. 

We will always have such issue  with nondeterministic UDF like unix_timstamp(), 
even with the query like:

select * from t1 where t1.c2 = to_date(date_add(from_unixtime( unix_timestamp() 
),1));

For predicate with nondeterministic UDF, the predicate won't be pushed down to 
TableScanOperator, but currently we only check if TableScanOperator has 
predicate.

So we need not only check if TableScanOperator has predicates but also the 
child ops (e.g., FilterOperator) to determine if the table has predicate.  

> Query against partitioned table in strict mode failed with "No partition 
> predicate found" even if partition predicate is specified.
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-10454
>                 URL: https://issues.apache.org/jira/browse/HIVE-10454
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>
> The following queries fail:
> {noformat}
> create table t1 (c1 int) PARTITIONED BY (c2 string);
> set hive.mapred.mode=strict;
> select * from t1 where t1.c2 < to_date(date_add(from_unixtime( 
> unix_timestamp() ),1));
> {noformat}
> The query failed with "No partition predicate found for alias t1".



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

Reply via email to