public Object getFieldValue(_Fields field) { switch (field) { case CAT_NAME: return getCatName(); case DB_NAME: return getDbName(); case TBL_NAME: return getTblName(); case TABLES_USED: return getTablesUsed(); case VALID_TXN_LIST: return getValidTxnList(); case MATERIALIZATION_TIME: return getMaterializationTime(); } throw new IllegalStateException(); }
private MCreationMetadata convertToMCreationMetadata( CreationMetadata m) throws MetaException { if (m == null) { return null; } assert !m.isSetMaterializationTime(); Set<MTable> tablesUsed = new HashSet<>(); for (String fullyQualifiedName : m.getTablesUsed()) { String[] names = fullyQualifiedName.split("\\."); tablesUsed.add(getMTable(m.getCatName(), names[0], names[1], false).mtbl); } return new MCreationMetadata(normalizeIdentifier(m.getCatName()), normalizeIdentifier(m.getDbName()), normalizeIdentifier(m.getTblName()), tablesUsed, m.getValidTxnList(), System.currentTimeMillis()); }
return null; if (creationMetadata.getValidTxnList() == null || creationMetadata.getValidTxnList().isEmpty()) { LOG.debug("Materialized view " + materializedViewTable.getFullyQualifiedName() + " ignored for rewriting as we could not obtain materialization txn ids"); creationMetadata.getValidTxnList()); for (String qName : tablesUsed) {
new ValidTxnWriteIdList(creationMetadata.getValidTxnList());
creationMetadata.getValidTxnList())); creationMetadata.getValidTxnList()));
private MCreationMetadata convertToMCreationMetadata( CreationMetadata m) throws MetaException { if (m == null) { return null; } assert !m.isSetMaterializationTime(); Set<MTable> tablesUsed = new HashSet<>(); for (String fullyQualifiedName : m.getTablesUsed()) { String[] names = fullyQualifiedName.split("\\."); tablesUsed.add(getMTable(m.getCatName(), names[0], names[1], false).mtbl); } return new MCreationMetadata(m.getCatName(), m.getDbName(), m.getTblName(), tablesUsed, m.getValidTxnList(), System.currentTimeMillis()); }