4.1.15. Partition Elimination - DTJ, PFE and Field

This section covers BigQuery partition elimination behavior when a partitioned table is joined to a driving table with a join condition on a partitioning field expression (PFE) and a driving table field.

General observations:

Partition elimination was evident in the query plan for the query below.

select
    t1.ID
from `BIGQUERY_SAMPLES.FLDPART28_R140M_F100_TABLE_1` t1
join `BIGQUERY_SAMPLES.DATES` dts
on
    dts.CAL_DT =
        date_add(
            cast(
                t1.CREATE_DT
                as DATE
            )
            ,interval 1 day
        )
where
    dts.CAL_YEAR = 2018
    and dts.CAL_WEEK = 4
    and dts.CAL_DAYOFWEEK = 3
;