Skip to content

Commit 1a4c296

Browse files
committed
Remove unnecessary code for initial PR
1 parent d18004b commit 1a4c296

File tree

26 files changed

+48
-240
lines changed

26 files changed

+48
-240
lines changed

libs/exponential-histogram/build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@
1212
apply plugin: 'elasticsearch.build'
1313

1414
dependencies {
15-
implementation project(':libs:x-content')
1615
api project(':libs:core')
1716
api project(':libs:x-content')
1817
api "org.apache.lucene:lucene-core:${versions.lucene}"
1918

20-
testImplementation(project(":test:framework")) {
21-
exclude group: 'org.elasticsearch', module: 'exponential-histogram'
22-
}
19+
testImplementation(project(":test:framework"))
2320
testImplementation('ch.obermuhlner:big-math:2.3.2')
2421
testImplementation('org.apache.commons:commons-math3:3.6.1')
2522
testImplementation project(':libs:x-content:impl')

libs/exponential-histogram/src/main/java/org/elasticsearch/exponentialhistogram/EmptyExponentialHistogram.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ public OptionalLong maxBucketIndex() {
5252
public long valueCount() {
5353
return 0;
5454
}
55-
56-
@Override
57-
public int bucketCount() {
58-
return 0;
59-
}
6055
}
6156

6257
@Override

libs/exponential-histogram/src/main/java/org/elasticsearch/exponentialhistogram/ExponentialHistogram.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ interface Buckets {
114114
*/
115115
long valueCount();
116116

117-
int bucketCount();
118-
119117
}
120118

121119
static ExponentialHistogram empty() {

libs/exponential-histogram/src/main/java/org/elasticsearch/exponentialhistogram/FixedCapacityExponentialHistogram.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,6 @@ public long valueCount() {
242242
}
243243
return cachedValueSum;
244244
}
245-
246-
@Override
247-
public int bucketCount() {
248-
return numBuckets;
249-
}
250245
}
251246

252247
}

server/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ dependencies {
3838
api project(":libs:plugin-analysis-api")
3939
api project(':libs:grok')
4040
api project(":libs:tdigest")
41-
api project(":libs:exponential-histogram")
4241
implementation project(":libs:simdvec")
4342
implementation project(":libs:entitlement")
4443

server/src/main/java/module-info.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
requires org.elasticsearch.plugin.analysis;
3131
requires org.elasticsearch.grok;
3232
requires org.elasticsearch.tdigest;
33-
requires org.elasticsearch.exponentialhistogram;
3433
requires org.elasticsearch.simdvec;
3534
requires org.elasticsearch.entitlement;
3635

server/src/main/java/org/elasticsearch/index/mapper/BlockLoader.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import org.apache.lucene.util.BytesRef;
1616
import org.elasticsearch.core.Nullable;
1717
import org.elasticsearch.core.Releasable;
18-
import org.elasticsearch.exponentialhistogram.ExponentialHistogram;
1918
import org.elasticsearch.search.fetch.StoredFieldsSpec;
2019
import org.elasticsearch.search.lookup.Source;
2120

@@ -463,8 +462,6 @@ interface BlockFactory {
463462
SortedSetOrdinalsBuilder sortedSetOrdinalsBuilder(SortedSetDocValues ordinals, int count);
464463

465464
AggregateMetricDoubleBuilder aggregateMetricDoubleBuilder(int count);
466-
467-
ExponentialHistogramBuilder exponentialHistogramBuilder(int count);
468465
}
469466

470467
/**
@@ -579,10 +576,4 @@ interface AggregateMetricDoubleBuilder extends Builder {
579576

580577
IntBuilder count();
581578
}
582-
583-
interface ExponentialHistogramBuilder extends Builder {
584-
585-
ExponentialHistogramBuilder append(ExponentialHistogram value);
586-
587-
}
588579
}

test/framework/src/main/java/org/elasticsearch/index/mapper/TestBlock.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
import org.apache.lucene.index.SortedDocValues;
1414
import org.apache.lucene.index.SortedSetDocValues;
1515
import org.apache.lucene.util.BytesRef;
16-
import org.elasticsearch.exponentialhistogram.ExponentialHistogram;
17-
import org.elasticsearch.exponentialhistogram.ExponentialHistogramCircuitBreaker;
1816
import org.hamcrest.Matcher;
1917

2018
import java.io.IOException;
@@ -324,24 +322,6 @@ public SortedSetOrdinalBuilder appendOrd(int value) {
324322
public BlockLoader.AggregateMetricDoubleBuilder aggregateMetricDoubleBuilder(int expectedSize) {
325323
return new AggregateMetricDoubleBlockBuilder(expectedSize);
326324
}
327-
328-
@Override
329-
public BlockLoader.ExponentialHistogramBuilder exponentialHistogramBuilder(int expectedSize) {
330-
class ExponentialHistogramBuilder extends TestBlock.Builder implements BlockLoader.ExponentialHistogramBuilder {
331-
private ExponentialHistogramBuilder() {
332-
super(expectedSize);
333-
}
334-
335-
@Override
336-
public BlockLoader.ExponentialHistogramBuilder append(ExponentialHistogram value) {
337-
//TODO: clean up the copying here?
338-
int numBuckets = value.negativeBuckets().bucketCount() + value.positiveBuckets().bucketCount();
339-
add(ExponentialHistogram.merge(numBuckets, ExponentialHistogramCircuitBreaker.noop(), value));
340-
return this;
341-
}
342-
}
343-
return new ExponentialHistogramBuilder();
344-
}
345325
};
346326
}
347327

x-pack/plugin/esql/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ dependencies {
4242
implementation project('compute:ann')
4343
implementation project(':libs:dissect')
4444
implementation project(':libs:grok')
45+
implementation project(':libs:exponential-histogram')
4546
api "org.apache.lucene:lucene-spatial3d:${versions.lucene}"
4647
api project(":libs:h3")
4748
implementation project('arrow')

x-pack/plugin/esql/compute/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dependencies {
1616
compileOnly project(xpackModule('ml'))
1717
annotationProcessor project('gen')
1818
implementation 'com.carrotsearch:hppc:0.8.1'
19+
implementation project(':libs:exponential-histogram')
1920

2021
testImplementation(project(':modules:analysis-common'))
2122
testImplementation(project(':test:framework'))

0 commit comments

Comments
 (0)