mirror of https://github.com/apache/druid.git
Merge pull request #2136 from rasahner/unitTestGroupbyHaving
for completeness, unit test for groupby/having with unrecognized type
This commit is contained in:
commit
e38b7554e4
|
@ -87,6 +87,19 @@ public class HavingSpecTest
|
||||||
assertEquals(andHavingSpec, mapper.convertValue(payloadMap, AndHavingSpec.class));
|
assertEquals(andHavingSpec, mapper.convertValue(payloadMap, AndHavingSpec.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(expected = IllegalArgumentException.class)
|
||||||
|
public void testTypeTypo()
|
||||||
|
{
|
||||||
|
Map<String, Object> greaterMap = ImmutableMap.<String, Object>of(
|
||||||
|
"type", "nonExistingType",
|
||||||
|
"aggregation", "agg",
|
||||||
|
"value", 1.3
|
||||||
|
);
|
||||||
|
ObjectMapper mapper = new DefaultObjectMapper();
|
||||||
|
HavingSpec spec = mapper.convertValue (greaterMap, HavingSpec.class);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGreaterThanHavingSpec() {
|
public void testGreaterThanHavingSpec() {
|
||||||
GreaterThanHavingSpec spec = new GreaterThanHavingSpec("metric", Long.valueOf(Long.MAX_VALUE - 10));
|
GreaterThanHavingSpec spec = new GreaterThanHavingSpec("metric", Long.valueOf(Long.MAX_VALUE - 10));
|
||||||
|
|
Loading…
Reference in New Issue