Will HIVE do a full table query with both partition conditions and not partition conditions?

292 Views Asked by At

I have a hive table partitioned by one date column name datetime
If I do a query like

select *
from table
where datetime = "2021-05-01"
    and id in (1,2)

with extra and id in (1,2) condition, will hive do a full table search?
Is it possible to determine it by explainresult?

1

There are 1 best solutions below

0
On BEST ANSWER

Partition pruning should work fine. To verify use EXPLAIN DEPENDENCY command, it will print input partitions in JSON array {"input_partitions":[...]}

See EXPLAIN DEPENDENCY docs.

EXPLAIN EXTENDED also prints used partitions.