I have the following query:
select count(1)
from `some_catalogue.some_table_with_partitions`
WHERE date_trunc(period,week(MONDAY)) >= (select max(date_trunc(period,week(MONDAY))) from `some_catalogue.some_table_with_partitions` where period >= date_add(current_date('Asia/Jakarta'),interval -1 day) )
some_table_with_partitions
is a table using period
column as partition field. The error message that i get is:
Cannot query over table
‘some_project.some_catalogue.some_table_with_partitions’ without a
filter over column(s) ‘period’ that can be used for partition
elimination.
i thought i already hit the partition field as follows:
WHERE date_trunc(period,week(MONDAY)) >= (select max(date_trunc(period,week(MONDAY))) from `some_catalogue.some_table_with_partitions` where period >= date_add(current_date('Asia/Jakarta'),interval -1 day) )
how do i resolve this?