This test passed in 0.9.1.1 but fails in 0.9.2-rc2 for groupBy engine v1. It works with the v2 engine. Nevertheless I'm marking this 0.9.2 since it's a regression in the v1 engine, which is still default.
@Test
public void testGroupByTimeExtractionNamedUnderUnderTime()
{
GroupByQuery query = GroupByQuery
.builder()
.setDataSource(QueryRunnerTestHelper.dataSource)
.setQuerySegmentSpec(QueryRunnerTestHelper.fullOnInterval)
.setDimensions(
Lists.newArrayList(
new DefaultDimensionSpec("market", "market"),
new ExtractionDimensionSpec(
Column.TIME_COLUMN_NAME,
Column.TIME_COLUMN_NAME,
new TimeFormatExtractionFn("EEEE", null, null, null),
null
)
)
)
.setAggregatorSpecs(
Arrays.asList(
QueryRunnerTestHelper.rowsCount,
QueryRunnerTestHelper.indexDoubleSum
)
)
.setPostAggregatorSpecs(Arrays.<PostAggregator>asList(QueryRunnerTestHelper.addRowsIndexConstant))
.setGranularity(QueryRunnerTestHelper.allGran)
.setDimFilter(
new OrDimFilter(
Arrays.<DimFilter>asList(
new SelectorDimFilter("market", "spot", null),
new SelectorDimFilter("market", "upfront", null)
)
)
)
.build();
List<Row> expectedResults = Arrays.asList(
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Friday",
"market",
"spot",
"index",
13219.574157714844,
"rows",
117L,
"addRowsIndexConstant",
13337.574157714844
),
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Monday",
"market",
"spot",
"index",
13557.738830566406,
"rows",
117L,
"addRowsIndexConstant",
13675.738830566406
),
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Saturday",
"market",
"spot",
"index",
13493.751281738281,
"rows",
117L,
"addRowsIndexConstant",
13611.751281738281
),
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Sunday",
"market",
"spot",
"index",
13585.541015625,
"rows",
117L,
"addRowsIndexConstant",
13703.541015625
),
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Thursday",
"market",
"spot",
"index",
14279.127197265625,
"rows",
126L,
"addRowsIndexConstant",
14406.127197265625
),
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Tuesday",
"market",
"spot",
"index",
13199.471435546875,
"rows",
117L,
"addRowsIndexConstant",
13317.471435546875
),
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Wednesday",
"market",
"spot",
"index",
14271.368591308594,
"rows",
126L,
"addRowsIndexConstant",
14398.368591308594
),
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Friday",
"market",
"upfront",
"index",
27297.8623046875,
"rows",
26L,
"addRowsIndexConstant",
27324.8623046875
),
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Monday",
"market",
"upfront",
"index",
27619.58447265625,
"rows",
26L,
"addRowsIndexConstant",
27646.58447265625
),
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Saturday",
"market",
"upfront",
"index",
27820.83154296875,
"rows",
26L,
"addRowsIndexConstant",
27847.83154296875
),
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Sunday",
"market",
"upfront",
"index",
24791.223876953125,
"rows",
26L,
"addRowsIndexConstant",
24818.223876953125
),
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Thursday",
"market",
"upfront",
"index",
28562.748901367188,
"rows",
28L,
"addRowsIndexConstant",
28591.748901367188
),
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Tuesday",
"market",
"upfront",
"index",
26968.280639648438,
"rows",
26L,
"addRowsIndexConstant",
26995.280639648438
),
GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01",
"__time",
"Wednesday",
"market",
"upfront",
"index",
28985.5751953125,
"rows",
28L,
"addRowsIndexConstant",
29014.5751953125
)
);
Iterable<Row> results = GroupByQueryRunnerTestHelper.runQuery(factory, runner, query);
TestHelper.assertExpectedObjects(expectedResults, results, "");
}
This test passed in 0.9.1.1 but fails in 0.9.2-rc2 for groupBy engine v1. It works with the v2 engine. Nevertheless I'm marking this 0.9.2 since it's a regression in the v1 engine, which is still default.