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()); }
public Materialization getMaterializationInvalidationInfo( CreationMetadata creationMetadata, String validTxnListStr) throws MetaException { if (creationMetadata.getTablesUsed().isEmpty()) { for (String fullyQualifiedName : creationMetadata.getTablesUsed()) {
if (!creationMetadata.getTablesUsed().contains(qName)) { continue;
for (String qName : table.getCreationMetadata().getTablesUsed()) { table = getTable(db, qName, tabNameToTabObject); if (table == null) {
for (String tableName : materializedViewTable.getCreationMetadata().getTablesUsed()) { Table table = getTable(tableName, true); if (!AcidUtils.isTransactionalTable(table)) {
if (validTxnsList != null) { final List<String> tablesUsed = new ArrayList<>(tbl.getCreationMetadata().getTablesUsed()); final ValidTxnWriteIdList currentTxnWriteIds = SessionState.get().getTxnMgr().getValidWriteIds(tablesUsed, validTxnsList);
new CreationMetadata(MetaStoreUtils.getDefaultCatalog(conf), mvTable.getDbName(), mvTable.getTableName(), ImmutableSet.copyOf(mvTable.getCreationMetadata().getTablesUsed())); cm.setValidTxnList(conf.get(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY)); db.updateCreationMetadata(mvTable.getDbName(), mvTable.getTableName(), cm);
table.getCreationMetadata().getTablesUsed() : ImmutableSet.of()); } else { this.createViewDesc = new CreateViewDesc(dbDotView,
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()); }