@Override
  public RelNode visit(TableScan scan) {
    // TableScan of a non-Hive table - don't support for materializations.
    fail(scan.getTable().getQualifiedName() + " is a table scan of a non-Hive table.");
    return scan;
  }
Checks the query plan for conditions that would make the plan unsuitable for
materialized views or query caching:
- References to temporary or external tables
- References to non-deterministic functions.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRelOptMaterializationValidator.java