use of com.yahoo.elide.datastores.aggregation.query.QueryPlanMerger in project elide by yahoo.
the class TableArgumentValidatorTest method testArgumentValues.
@Test
public void testArgumentValues() {
Table mainTable = mainTableBuilder.argument(Argument.builder().name("testArg").type(Type.INTEGER).values(Sets.newHashSet("1", "2.5")).defaultValue("").build()).build();
Set<Table> tables = new HashSet<>();
tables.add(mainTable);
MetaDataStore metaDataStore = new MetaDataStore(DefaultClassScanner.getInstance(), tables, this.namespaceConfigs, true);
QueryPlanMerger merger = new DefaultQueryPlanMerger(metaDataStore);
Exception e = assertThrows(IllegalStateException.class, () -> new SQLQueryEngine(metaDataStore, connectionLookup, optimizers, merger, queryValidator));
assertEquals("Failed to verify table arguments for table: namespace_MainTable. Value: '2.5' for Argument 'testArg' with Type 'INTEGER' is invalid.", e.getMessage());
}
Aggregations