@Test public void testSetQueryViewWithoutColumns() throws Exception { String ddl = "CREATE FOREIGN TABLE G1(\n" + "e1 varchar(10) primary key,\n" + "e2 varchar(100) unique,\n" + "e3 decimal(12,5),\n" + "e4 decimal(14,3));" + " create view v1 as select e1, e3 from G1 union all select e2, e4 from G1;"; buildModel("phy1", true, this.vdb, this.store, ddl); buildTransformationMetadata(); ValidatorReport report = new MetadataValidator().validate(this.vdb, this.store); assertFalse(printError(report), report.hasItems()); Table table = store.getSchema("phy1").getTable("v1"); List<Column> columns = table.getColumns(); Column e1 = columns.get(0); Column e3 = columns.get(1); assertEquals("e1", e1.getName()); assertEquals("string", e1.getDatatype().getName()); assertEquals(100, e1.getLength()); assertEquals("e3", e3.getName()); assertEquals("bigdecimal", e3.getDatatype().getName()); assertEquals(14, e3.getPrecision()); assertEquals(5, e3.getScale()); }
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; }