WHERE
and HAVING
)lineitem
, orders
and customers
entitiesorders.order_date >= '1990-01-01'
and lineitem.status = 'F'
customers.c_nationkey = 10
orders.count
with a query filter of orders.order_date >= '1996-01-01'
orders
with source filter orders.order_date >= '1990-01-01'
customers
customers.c_nationkey = 10
:
customers
entity and join it to orders
orders
gets the filter through its INNER join to filtered customers
orders.order_date >= '1996-01-01'
orders.count
on the resulting filtered dataorders.order_date >= '1996-01-01'
will be actually executed at step (1), when selecting from orders
.
The reason is that it can be safely pushed down earlier in the query execution without affecting results.
lineitem
did not apply as lineitem
did not participate in the query and a source filter
only acts on its source entity when it is needed for producing the result.However, the semantic filter for customers
was applied to the result by adding a join to customers
.