mirror of https://github.com/apache/druid.git
Licensing stuff
This commit is contained in:
parent
79e8319383
commit
7b58471394
|
@ -112,7 +112,7 @@ public class ScanQueryQueryToolChest extends QueryToolChest<ScanResultValue, Sca
|
|||
// only runs if limit < MAX_LIMIT_FOR_IN_MEMORY_TIME_ORDERING (which should be < Integer.MAX_VALUE)
|
||||
PriorityQueue<Object> q = new PriorityQueue<>(Math.toIntExact(scanQuery.getLimit()), priorityQComparator);
|
||||
Iterator<ScanResultValue> scanResultIterator = scanQueryLimitRowIteratorMaker.make();
|
||||
|
||||
|
||||
while (scanResultIterator.hasNext()) {
|
||||
ScanResultValue next = scanResultIterator.next();
|
||||
List<Object> events = (List<Object>) next.getEvents();
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.apache.druid.query.scan;
|
||||
|
||||
import com.google.common.primitives.Longs;
|
||||
|
@ -10,7 +29,7 @@ import java.util.Map;
|
|||
|
||||
public class ScanResultValueTimestampComparator implements Comparator<ScanResultValue>
|
||||
{
|
||||
private ScanQuery scanQuery;
|
||||
private final ScanQuery scanQuery;
|
||||
|
||||
public ScanResultValueTimestampComparator(ScanQuery scanQuery) {
|
||||
this.scanQuery = scanQuery;
|
||||
|
@ -52,7 +71,7 @@ public class ScanResultValueTimestampComparator implements Comparator<ScanResult
|
|||
if (obj == null || getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ScanResultValueTimestampComparator comp = (ScanResultValueTimestampComparator) obj
|
||||
ScanResultValueTimestampComparator comp = (ScanResultValueTimestampComparator) obj;
|
||||
return this.scanQuery.equals(comp.scanQuery);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.apache.druid.query.scan;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class ScanResultValueTimestampComparatorTest
|
||||
{
|
||||
@Test
|
||||
public void comparisonTest() {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void priorityQueueTest() {
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue