1

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?

leftjoin
  • 36,950
  • 8
  • 57
  • 116
theotheo
  • 145
  • 2
  • 9

1 Answers1

0

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.

leftjoin
  • 36,950
  • 8
  • 57
  • 116