use of io.hetu.core.spi.cube.CubeStatement in project hetu-core by openlookeng.
the class TestStarTreeMetadata method testMetadataMatchesCubeStatementWithoutAvg.
@Test
public void testMetadataMatchesCubeStatementWithoutAvg() {
CubeStatement statement = CubeStatement.newBuilder().select("returnflag", "linestatus").aggregate(sum("quantity", false)).from("tpch.tiny.lineitem2").groupByAddStringList("returnflag", "linestatus").build();
assertTrue(metadataWithoutAvg.matches(statement), "failed to match a valid cube statement");
}
use of io.hetu.core.spi.cube.CubeStatement in project hetu-core by openlookeng.
the class TestStarTreeMetadata method testMetadataMatchesCubeStatementWithAvg.
@Test
public void testMetadataMatchesCubeStatementWithAvg() {
CubeStatement statement = CubeStatement.newBuilder().select("returnflag", "linestatus").aggregate(avg("quantity", false)).aggregate(avg("discount", false)).from("tpch.tiny.lineitem3").groupByAddStringList("returnflag", "linestatus").build();
assertTrue(metadataWithAvg.matches(statement), "failed to match a valid cube statement");
}
use of io.hetu.core.spi.cube.CubeStatement in project hetu-core by openlookeng.
the class TestStarTreeMetadata method testMetadataMatchesCubeStatementWithAvgWithoutSumCount.
@Test
public void testMetadataMatchesCubeStatementWithAvgWithoutSumCount() {
CubeStatement statement = CubeStatement.newBuilder().select("returnflag", "linestatus").aggregate(avg("quantity", false)).from("tpch.tiny.lineitem4").groupByAddStringList("returnflag", "linestatus").build();
assertFalse(metadataWithAvgWithoutSumCount.matches(statement), "failed to match a valid cube statement");
}
Aggregations