use of com.yahoo.elide.datastores.aggregation.query.ColumnProjection in project elide by yahoo.
the class SQLColumnProjectionTest method testPhysicalColumnThatCanNest.
@Test
public void testPhysicalColumnThatCanNest() throws Exception {
SQLTable table = metaDataStore.getTable(ClassType.of(TableB.class));
ColumnProjection projection = table.getColumnProjection("dim1");
assertTrue(projection.canNest(table, metaDataStore));
}
use of com.yahoo.elide.datastores.aggregation.query.ColumnProjection in project elide by yahoo.
the class SQLColumnProjectionTest method testColumnArgsColumnThatCanNest.
@Test
public void testColumnArgsColumnThatCanNest() throws Exception {
SQLTable table = metaDataStore.getTable(ClassType.of(TableA.class));
Map<String, Argument> args = new HashMap<>();
args.put("foo", Argument.builder().name("foo").value("bar").build());
ColumnProjection projection = table.getColumnProjection("dim2", args);
assertTrue(projection.canNest(table, metaDataStore));
}
use of com.yahoo.elide.datastores.aggregation.query.ColumnProjection in project elide by yahoo.
the class ExpressionParserTest method testLogicalExpression.
@Test
public void testLogicalExpression() {
ColumnProjection playerLevel = playerStats.getColumnProjection("playerLevel");
List<Reference> references = parser.parse(playerStats, playerLevel.getExpression());
assertTrue(references.size() == 1);
assertEquals(LogicalReference.builder().source(playerStats).column(playerStats.getColumnProjection("overallRating")).reference(PhysicalReference.builder().source(playerStats).name("overallRating").build()).build(), references.get(0));
}
use of com.yahoo.elide.datastores.aggregation.query.ColumnProjection in project elide by yahoo.
the class ExpressionParserTest method testPhysicalExpression.
@Test
public void testPhysicalExpression() {
ColumnProjection recordedDate = playerStats.getColumnProjection("recordedDate");
List<Reference> references = parser.parse(playerStats, recordedDate.getExpression());
assertTrue(references.size() == 1);
assertEquals(PhysicalReference.builder().name("recordedDate").source(playerStats).build(), references.get(0));
}
use of com.yahoo.elide.datastores.aggregation.query.ColumnProjection in project elide by yahoo.
the class HasColumnArgsVisitorTest method testPhysicalColumn.
@Test
public void testPhysicalColumn() throws Exception {
SQLTable table = metaDataStore.getTable(ClassType.of(TableB.class));
ColumnProjection projection = table.getColumnProjection("physical");
assertFalse(matches(table, projection));
}
Aggregations