The idea behind the metadata providers introduced in
CALCITE-1682 is that we can identify the lineage of the expressions. If we bypass assigning a unique identifier for the table in RelMdAllPredicates because there are no predicates on those tables, then we will end up referencing wrong tables.
Table refs: [[CATALOG, SALES, DEPT].#0, [CATALOG, SALES, EMP].#0, [CATALOG, SALES, EMP].#1]
Extracted predicate without fix (wrong): =([CATALOG, SALES, EMP].#0.$0, 5)
Extracted predicate with fix (correct): =([CATALOG, SALES, EMP].#1.$0, 5)