use of com.yahoo.elide.datastores.aggregation.query.ColumnProjection in project elide by yahoo.
the class PhysicalReferenceExtractorTest method testPhysicalReference.
@Test
public void testPhysicalReference() {
ColumnProjection recordedDate = playerStats.getColumnProjection("recordedDate");
List<Reference> references = parser.parse(playerStats, recordedDate.getExpression());
assertTrue(references.size() == 1);
ReferenceExtractor<PhysicalReference> extractor = new ReferenceExtractor(PhysicalReference.class, metaDataStore, ReferenceExtractor.Mode.SAME_QUERY);
Set<PhysicalReference> physicalReferences = references.get(0).accept(extractor);
assertTrue(physicalReferences.size() == 1);
assertTrue(physicalReferences.contains(PhysicalReference.builder().source(playerStats).name("recordedDate").build()));
}
use of com.yahoo.elide.datastores.aggregation.query.ColumnProjection in project elide by yahoo.
the class ExpressionParserTest method testJoinExpression.
@Test
public void testJoinExpression() {
ColumnProjection countryInUsa = playerStats.getColumnProjection("countryIsInUsa");
List<Reference> references = parser.parse(playerStats, countryInUsa.getExpression());
assertTrue(references.size() == 1);
assertEquals(countryInUSAJoinReference, references.get(0));
}
use of com.yahoo.elide.datastores.aggregation.query.ColumnProjection in project elide by yahoo.
the class HasColumnArgsVisitorTest method testSimpleJoinToLogicalColumn.
@Test
public void testSimpleJoinToLogicalColumn() throws Exception {
SQLTable table = metaDataStore.getTable(ClassType.of(TableC.class));
ColumnProjection projection = table.getColumnProjection("simpleJoinToLogical");
assertFalse(matches(table, projection));
}
use of com.yahoo.elide.datastores.aggregation.query.ColumnProjection in project elide by yahoo.
the class HasColumnArgsVisitorTest method testJoinWithLogicalReferenceThatReferencesColumnArgs.
@Test
public void testJoinWithLogicalReferenceThatReferencesColumnArgs() throws Exception {
SQLTable table = metaDataStore.getTable(ClassType.of(TableC.class));
ColumnProjection projection = table.getColumnProjection("joinWithLogicalWithColumnArgsToPhysical");
assertTrue(matches(table, projection));
}
use of com.yahoo.elide.datastores.aggregation.query.ColumnProjection in project elide by yahoo.
the class HasColumnArgsVisitorTest method testNestedJoinWithColumnArgs.
@Test
public void testNestedJoinWithColumnArgs() throws Exception {
SQLTable table = metaDataStore.getTable(ClassType.of(TableC.class));
ColumnProjection projection = table.getColumnProjection("nestedJoinWithColumnArgs");
assertTrue(matches(table, projection));
}
Aggregations