@Override
  public boolean matches(RelOptRuleCall call) {
    HiveTableScan tableScan = call.rel(0);
    Table tableMD = ((RelOptHiveTable) tableScan.getTable()).getHiveTableMD();
    return !tableMD.isMaterializedView() && AcidUtils.isInsertOnlyTable(tableMD);
  }
This rule turns on populating writeId of insert only table scans.
Currently fetching writeId from insert-only tables is not turned on automatically:
1. only not compacted records has valid writeId.
2. the writeId and bucketId is populated into the ROW_ID struct however the third field
of the struct (rowId) is always 0.

This feature is only used when rebuilding materialized view incrementally when the view has
insert-only source tables.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/views/HiveInsertOnlyScanWriteIdRule.java