Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void setup() throws Exception
temporaryFolder
);

selector = new TestObjectColumnSelector(values);
selector = new TestObjectColumnSelector<>(values);
selectorFactory = EasyMock.createMock(ColumnSelectorFactory.class);
EasyMock.expect(selectorFactory.makeObjectColumnSelector("test")).andReturn(selector);
EasyMock.replay(selectorFactory);
Expand Down Expand Up @@ -144,7 +144,7 @@ public void testSimpleDataIngestionAndSelectTest() throws Exception
" }\n" +
"]";
ZipFile zip = new ZipFile(new File(this.getClass().getClassLoader().getResource("druid.sample.tsv.zip").toURI()));
Sequence seq = helper.createIndexAndRunQueryOnSegment(
Sequence<?> seq = helper.createIndexAndRunQueryOnSegment(
zip.getInputStream(zip.getEntry("druid.sample.tsv")),
recordParser,
aggregator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void setup() throws Exception
temporaryFolder
);

selector = new TestObjectColumnSelector(values);
selector = new TestObjectColumnSelector<>(values);
selectorFactory = EasyMock.createMock(ColumnSelectorFactory.class);
EasyMock.expect(selectorFactory.makeObjectColumnSelector("test")).andReturn(selector);
EasyMock.replay(selectorFactory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void configure(Binder binder)
String json = "{\"type\":\"" + aggType + "\",\"name\":\"" + aggType + "\",\"fieldName\":\"test\"}";

aggregatorFactory = mapper.readValue(json, aggClass);
selector = new TestObjectColumnSelector(values);
selector = new TestObjectColumnSelector<>(values);
selectorFactory = EasyMock.createMock(ColumnSelectorFactory.class);
EasyMock.expect(selectorFactory.makeObjectColumnSelector("test")).andReturn(selector);
EasyMock.replay(selectorFactory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public void setup()
{
selector = new TestFloatColumnSelector(values);
colSelectorFactory = EasyMock.createMock(ColumnSelectorFactory.class);
EasyMock.expect(colSelectorFactory.makeObjectColumnSelector("nilly")).andReturn(new TestObjectColumnSelector(0.0f));
EasyMock.expect(colSelectorFactory.makeObjectColumnSelector("nilly"))
.andReturn(new TestObjectColumnSelector<>(new Object[] {0.0f}));
EasyMock.expect(colSelectorFactory.makeFloatColumnSelector("nilly")).andReturn(selector);
EasyMock.replay(colSelectorFactory);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public String toString()
* .build();
* </code></pre>
*
* @see io.druid.query.scan.ScanQuery
* @see ScanQuery
*/
public static class ScanQueryBuilder
{
Expand Down
4 changes: 2 additions & 2 deletions processing/src/main/java/io/druid/segment/Capabilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public CapabilitiesBuilder dimensionValuesSorted(boolean value)
return this;
}

public io.druid.segment.Capabilities build()
public Capabilities build()
{
return new io.druid.segment.Capabilities(
return new Capabilities(
dimensionValuesSorted
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ public void testAggregateMissingColumn()
@Test
public void testAggregateStrings()
{
final TestObjectColumnSelector ocs = new TestObjectColumnSelector("what", null, new String[]{"hey", "there"});
final TestObjectColumnSelector ocs = new TestObjectColumnSelector<>(
new Object[]{"what", null, new String[]{"hey", "there"}}
);
final JavaScriptAggregator agg = new JavaScriptAggregator(
Collections.<ObjectColumnSelector>singletonList(ocs),
JavaScriptAggregatorFactory.compileScript(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@

/**
*/
public class TestObjectColumnSelector implements ObjectColumnSelector
public class TestObjectColumnSelector<T> implements ObjectColumnSelector
{
private final Object[] objects;

private int index = 0;

public TestObjectColumnSelector(Object... objects)
public TestObjectColumnSelector(T[] objects)
{
this.objects = objects;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void setup()
combiningAggFactory = (DoubleFirstAggregatorFactory) doubleFirstAggFactory.getCombiningFactory();
timeSelector = new TestLongColumnSelector(times);
valueSelector = new TestDoubleColumnSelectorImpl(doubleValues);
objectSelector = new TestObjectColumnSelector(pairs);
objectSelector = new TestObjectColumnSelector<>(pairs);
colSelectorFactory = EasyMock.createMock(ColumnSelectorFactory.class);
EasyMock.expect(colSelectorFactory.makeLongColumnSelector(Column.TIME_COLUMN_NAME)).andReturn(timeSelector);
EasyMock.expect(colSelectorFactory.makeDoubleColumnSelector("nilly")).andReturn(valueSelector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void setup()
combiningAggFactory = (FloatFirstAggregatorFactory) floatFirstAggregatorFactory.getCombiningFactory();
timeSelector = new TestLongColumnSelector(times);
valueSelector = new TestFloatColumnSelector(floats);
objectSelector = new TestObjectColumnSelector(pairs);
objectSelector = new TestObjectColumnSelector<>(pairs);
colSelectorFactory = EasyMock.createMock(ColumnSelectorFactory.class);
EasyMock.expect(colSelectorFactory.makeLongColumnSelector(Column.TIME_COLUMN_NAME)).andReturn(timeSelector);
EasyMock.expect(colSelectorFactory.makeFloatColumnSelector("nilly")).andReturn(valueSelector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void setup()
combiningAggFactory = (LongFirstAggregatorFactory) longFirstAggFactory.getCombiningFactory();
timeSelector = new TestLongColumnSelector(times);
valueSelector = new TestLongColumnSelector(longValues);
objectSelector = new TestObjectColumnSelector(pairs);
objectSelector = new TestObjectColumnSelector<>(pairs);
colSelectorFactory = EasyMock.createMock(ColumnSelectorFactory.class);
EasyMock.expect(colSelectorFactory.makeLongColumnSelector(Column.TIME_COLUMN_NAME)).andReturn(timeSelector);
EasyMock.expect(colSelectorFactory.makeLongColumnSelector("nilly")).andReturn(valueSelector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void setup()
combiningAggFactory = (DoubleLastAggregatorFactory) doubleLastAggFactory.getCombiningFactory();
timeSelector = new TestLongColumnSelector(times);
valueSelector = new TestDoubleColumnSelectorImpl(doubles);
objectSelector = new TestObjectColumnSelector(pairs);
objectSelector = new TestObjectColumnSelector<>(pairs);
colSelectorFactory = EasyMock.createMock(ColumnSelectorFactory.class);
EasyMock.expect(colSelectorFactory.makeLongColumnSelector(Column.TIME_COLUMN_NAME)).andReturn(timeSelector);
EasyMock.expect(colSelectorFactory.makeDoubleColumnSelector("nilly")).andReturn(valueSelector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void setup()
combiningAggFactory = (FloatLastAggregatorFactory) floatLastAggregatorFactory.getCombiningFactory();
timeSelector = new TestLongColumnSelector(times);
valueSelector = new TestFloatColumnSelector(floats);
objectSelector = new TestObjectColumnSelector(pairs);
objectSelector = new TestObjectColumnSelector<>(pairs);
colSelectorFactory = EasyMock.createMock(ColumnSelectorFactory.class);
EasyMock.expect(colSelectorFactory.makeLongColumnSelector(Column.TIME_COLUMN_NAME)).andReturn(timeSelector);
EasyMock.expect(colSelectorFactory.makeFloatColumnSelector("nilly")).andReturn(valueSelector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void setup()
combiningAggFactory = (LongLastAggregatorFactory) longLastAggFactory.getCombiningFactory();
timeSelector = new TestLongColumnSelector(times);
valueSelector = new TestLongColumnSelector(longValues);
objectSelector = new TestObjectColumnSelector(pairs);
objectSelector = new TestObjectColumnSelector<>(pairs);
colSelectorFactory = EasyMock.createMock(ColumnSelectorFactory.class);
EasyMock.expect(colSelectorFactory.makeLongColumnSelector(Column.TIME_COLUMN_NAME)).andReturn(timeSelector);
EasyMock.expect(colSelectorFactory.makeLongColumnSelector("nilly")).andReturn(valueSelector);
Expand Down