@Test public void testViewKeys() throws Exception { buildModel("phy1", true, this.vdb, this.store, "CREATE FOREIGN TABLE t1 ( col1 string, col2 integer ) options (updatable true)"); buildModel("phy2", true, this.vdb, this.store, "CREATE FOREIGN TABLE t2 ( col1 string, col2 integer ) options (updatable true)"); buildModel("view1", false, this.vdb, this.store, "CREATE view vw_t1 ( col1 string, col2 integer primary key, foreign key (col2) references vw_t2 (col2) ) options (updatable true) as select * from t1;" + "CREATE view vw_t2 ( col1 string, col2 integer primary key, foreign key (col2) references vw_t1 (col2) ) options (updatable true) as select * from t2;" + "CREATE VIEW v1 ( col1 string, col2 integer ) OPTIONS (updatable 'true') AS select vw_t1.col1, vw_t1.col2 FROM vw_t1, vw_t2 where vw_t1.col2 = vw_t2.col2"); buildTransformationMetadata(); ValidatorReport report = new MetadataValidator().validate(this.vdb, this.store); assertFalse(printError(report), report.hasItems()); }
public ValidatorReport validate(VDBMetaData vdb, MetadataStore store) { ValidatorReport report = new ValidatorReport(); if (store != null && !store.getSchemaList().isEmpty()) { new SourceModelArtifacts().execute(vdb, store, report, this); new CrossSchemaResolver().execute(vdb, store, report, this); new ResolveQueryPlans().execute(vdb, store, report, this); new MinimalMetadata().execute(vdb, store, report, this); new MatViewPropertiesValidator().execute(vdb, store, report, this); new RoleValidator().execute(vdb, store, report, this); } return report; }
MetadataValidator { public ValidatorReport validate(VDBMetaData vdb, MetadataStore store) { ValidatorReport report = new ValidatorReport(); if (store != null && !store.getSchemaList().isEmpty()) { new SourceModelArtifacts().execute(vdb, store, report, this); new CrossSchemaResolver().execute(vdb, store, report, this); new ResolveQueryPlans().execute(vdb, store, report, this); new MinimalMetadata().execute(vdb, store, report, this); new MatViewPropertiesValidator().execute(vdb, store, report, this); new RoleValidator().execute(vdb, store, report, this); } return report; } }
MetadataValidator { public ValidatorReport validate(VDBMetaData vdb, MetadataStore store) { ValidatorReport report = new ValidatorReport(); if (store != null && !store.getSchemaList().isEmpty()) { new SourceModelArtifacts().execute(vdb, store, report, this); new CrossSchemaResolver().execute(vdb, store, report, this); new ResolveQueryPlans().execute(vdb, store, report, this); new MinimalMetadata().execute(vdb, store, report, this); new MatViewPropertiesValidator().execute(vdb, store, report, this); new RoleValidator().execute(vdb, store, report, this); } return report; } MetadataValidator(Map<String, Datatype> typeMap, QueryParser parser);  MetadataValidator(); }
MetadataValidator { public ValidatorReport validate(VDBMetaData vdb, MetadataStore store) { ValidatorReport report = new ValidatorReport(); if (store != null && !store.getSchemaList().isEmpty()) { new SourceModelArtifacts().execute(vdb, store, report, this); new CrossSchemaResolver().execute(vdb, store, report, this); new ResolveQueryPlans().execute(vdb, store, report, this); new MinimalMetadata().execute(vdb, store, report, this); new MatViewPropertiesValidator().execute(vdb, store, report, this); new RoleValidator().execute(vdb, store, report, this); } return report; } MetadataValidator(Map<String, Datatype> typeMap, QueryParser parser);  MetadataValidator(); ValidatorReport validate(VDBMetaData vdb, MetadataStore store); void log(ValidatorReport report, ModelMetaData model, String msg); void log(ValidatorReport report, ModelMetaData model, String msg, AbstractMetadataRecord object); void log(ValidatorReport report, ModelMetaData model, Severity severity, String msg, AbstractMetadataRecord object); void validate(VDBMetaData vdb, ModelMetaData model, AbstractMetadataRecord record, ValidatorReport report,
            QueryMetadataInterface metadata, MetadataFactory mf, QueryParser parser); static void determineDependencies(AbstractMetadataRecord p, Command command); }
MetadataValidator { public ValidatorReport validate(VDBMetaData vdb, MetadataStore store) { ValidatorReport report = new ValidatorReport(); if (store != null && !store.getSchemaList().isEmpty()) { new SourceModelArtifacts().execute(vdb, store, report, this); new CrossSchemaResolver().execute(vdb, store, report, this); new ResolveQueryPlans().execute(vdb, store, report, this); new MinimalMetadata().execute(vdb, store, report, this); new MatViewPropertiesValidator().execute(vdb, store, report, this); new RoleValidator().execute(vdb, store, report, this); } return report; } MetadataValidator(Map<String, Datatype> typeMap, QueryParser parser);  MetadataValidator(); ValidatorReport validate(VDBMetaData vdb, MetadataStore store); void log(ValidatorReport report, ModelMetaData model, String msg); void log(ValidatorReport report, ModelMetaData model, String msg, AbstractMetadataRecord object); void log(ValidatorReport report, ModelMetaData model, Severity severity, String msg, AbstractMetadataRecord object); void validate(VDBMetaData vdb, ModelMetaData model, AbstractMetadataRecord record, ValidatorReport report,
            QueryMetadataInterface metadata, MetadataFactory mf, QueryParser parser); static void determineDependencies(AbstractMetadataRecord p, Command command); static final String UNTYPED; }