0

For example, I have a table partitioned by column ym (202001).

Now, there is a SQL converting ym to other time format:

select * from table 
where from_unixtime(unix_timestamp(`table`.ym , 'yyyyMM'))  >= '2020-01-01 00:00:00')
AND from_unixtime(unix_timestamp(`table`.ym , 'yyyyMM'))  < '2020-01-05 00:00:00');

does it still have partition effect while the partition column is not as the original value?

Whether Hive scan only the 202001 partition range or the whole table range?

is there any official document for this? Thanks.

DennisLi
  • 3,915
  • 6
  • 30
  • 66

1 Answers1

0

you can explain and see the plan. But ideally, since you are using functions to convert left side of the expression, it should evaluate with the right side value and prune the necessary partitions.

user3327034
  • 395
  • 3
  • 13