Fix some checkstyles

Original commit: elastic/x-pack-elasticsearch@ff1c6a6e70
This commit is contained in:
Costin Leau 2017-06-30 20:55:28 +03:00
parent 4bb605d819
commit 16ea84defe
5 changed files with 85 additions and 86 deletions

View File

@ -88,37 +88,36 @@ public class Scroller {
previous.client.searchScroll(new SearchScrollRequest(scrollId).scroll(previous.keepAlive), l); previous.client.searchScroll(new SearchScrollRequest(scrollId).scroll(previous.keepAlive), l);
} }
// dedicated scroll used for aggs-only/group-by results // dedicated scroll used for aggs-only/group-by results
static class AggsScrollActionListener extends ScrollerActionListener { static class AggsScrollActionListener extends ScrollerActionListener {
private final QueryContainer query; private final QueryContainer query;
AggsScrollActionListener(ActionListener<RowSetCursor> listener, Client client, TimeValue keepAlive, Schema schema, QueryContainer query) { AggsScrollActionListener(ActionListener<RowSetCursor> listener, Client client, TimeValue keepAlive, Schema schema, QueryContainer query) {
super(listener, client, keepAlive, schema); super(listener, client, keepAlive, schema);
this.query = query; this.query = query;
} }
@Override @Override
protected RowSetCursor handleResponse(SearchResponse response) { protected RowSetCursor handleResponse(SearchResponse response) {
Aggregations aggs = response.getAggregations(); Aggregations aggs = response.getAggregations();
List<Object[]> columns = new ArrayList<>(); List<Object[]> columns = new ArrayList<>();
// this method assumes the nested aggregation are all part of the same tree (the SQL group-by) // this method assumes the nested aggregation are all part of the same tree (the SQL group-by)
int maxDepth = -1; int maxDepth = -1;
for (Reference ref : query.refs()) { for (Reference ref : query.refs()) {
Object[] arr = null; Object[] arr = null;
ColumnProcessor processor = null; ColumnProcessor processor = null;
if (ref instanceof ProcessingRef) { if (ref instanceof ProcessingRef) {
ProcessingRef pRef = (ProcessingRef) ref; ProcessingRef pRef = (ProcessingRef) ref;
processor = pRef.processor(); processor = pRef.processor();
ref = pRef.ref(); ref = pRef.ref();
} }
if (ref == TotalCountRef.INSTANCE) { if (ref == TotalCountRef.INSTANCE) {
arr = new Object[] { processIfNeeded(processor, Long.valueOf(response.getHits().getTotalHits())) }; arr = new Object[] { processIfNeeded(processor, Long.valueOf(response.getHits().getTotalHits())) };
columns.add(arr); columns.add(arr);
@ -131,13 +130,13 @@ public class Scroller {
path = AggPath.bucketValueWithoutFormat(path); path = AggPath.bucketValueWithoutFormat(path);
} }
Object value = getAggProperty(aggs, path); Object value = getAggProperty(aggs, path);
// // FIXME: this can be tabular in nature // // FIXME: this can be tabular in nature
// if (ref instanceof MappedAggRef) { // if (ref instanceof MappedAggRef) {
// Map<String, Object> map = (Map<String, Object>) value; // Map<String, Object> map = (Map<String, Object>) value;
// Object extractedValue = map.get(((MappedAggRef) ref).fieldName()); // Object extractedValue = map.get(((MappedAggRef) ref).fieldName());
// } // }
if (formattedKey) { if (formattedKey) {
List<? extends Bucket> buckets = ((MultiBucketsAggregation) value).getBuckets(); List<? extends Bucket> buckets = ((MultiBucketsAggregation) value).getBuckets();
arr = new Object[buckets.size()]; arr = new Object[buckets.size()];
@ -148,7 +147,7 @@ public class Scroller {
else { else {
arr = value instanceof Object[] ? (Object[]) value : new Object[] { value }; arr = value instanceof Object[] ? (Object[]) value : new Object[] { value };
} }
// process if needed // process if needed
for (int i = 0; i < arr.length; i++) { for (int i = 0; i < arr.length; i++) {
arr[i] = processIfNeeded(processor, arr[i]); arr[i] = processIfNeeded(processor, arr[i]);
@ -159,16 +158,16 @@ public class Scroller {
else { else {
throw new SqlIllegalArgumentException("Unexpected non-agg/grouped column specified; %s", ref.getClass()); throw new SqlIllegalArgumentException("Unexpected non-agg/grouped column specified; %s", ref.getClass());
} }
if (ref.depth() > maxDepth) { if (ref.depth() > maxDepth) {
maxDepth = ref.depth(); maxDepth = ref.depth();
} }
} }
clearScroll(response.getScrollId()); clearScroll(response.getScrollId());
return new AggsRowSetCursor(schema, columns, maxDepth, query.limit()); return new AggsRowSetCursor(schema, columns, maxDepth, query.limit());
} }
private static Object getAggProperty(Aggregations aggs, String path) { private static Object getAggProperty(Aggregations aggs, String path) {
List<String> list = AggregationPath.parse(path).getPathElementsAsStringList(); List<String> list = AggregationPath.parse(path).getPathElementsAsStringList();
String aggName = list.get(0); String aggName = list.get(0);
@ -178,103 +177,103 @@ public class Scroller {
} }
return agg.getProperty(list.subList(1, list.size())); return agg.getProperty(list.subList(1, list.size()));
} }
private Object processIfNeeded(ColumnProcessor processor, Object value) { private Object processIfNeeded(ColumnProcessor processor, Object value) {
return processor != null ? processor.apply(value) : value; return processor != null ? processor.apply(value) : value;
} }
} }
// initial scroll used for parsing search hits (handles possible aggs) // initial scroll used for parsing search hits (handles possible aggs)
class HandshakeScrollActionListener extends SearchHitsActionListener { static class HandshakeScrollActionListener extends SearchHitsActionListener {
private final QueryContainer query; private final QueryContainer query;
HandshakeScrollActionListener(ActionListener<RowSetCursor> listener, Client client, TimeValue keepAlive, Schema schema, QueryContainer query) { HandshakeScrollActionListener(ActionListener<RowSetCursor> listener, Client client, TimeValue keepAlive, Schema schema, QueryContainer query) {
super(listener, client, keepAlive, schema, query.limit(), 0); super(listener, client, keepAlive, schema, query.limit(), 0);
this.query = query; this.query = query;
} }
@Override @Override
public void onResponse(SearchResponse response) { public void onResponse(SearchResponse response) {
super.onResponse(response); super.onResponse(response);
} }
@Override @Override
protected List<HitExtractor> getExtractors() { protected List<HitExtractor> getExtractors() {
// create response extractors for the first time // create response extractors for the first time
List<Reference> refs = query.refs(); List<Reference> refs = query.refs();
List<HitExtractor> exts = new ArrayList<>(refs.size()); List<HitExtractor> exts = new ArrayList<>(refs.size());
for (Reference ref : refs) { for (Reference ref : refs) {
exts.add(createExtractor(ref)); exts.add(createExtractor(ref));
} }
return exts; return exts;
} }
private HitExtractor createExtractor(Reference ref) { private HitExtractor createExtractor(Reference ref) {
if (ref instanceof SearchHitFieldRef) { if (ref instanceof SearchHitFieldRef) {
SearchHitFieldRef f = (SearchHitFieldRef) ref; SearchHitFieldRef f = (SearchHitFieldRef) ref;
return f.useDocValue() ? new DocValueExtractor(f.name()) : new SourceExtractor(f.name()); return f.useDocValue() ? new DocValueExtractor(f.name()) : new SourceExtractor(f.name());
} }
if (ref instanceof NestedFieldRef) { if (ref instanceof NestedFieldRef) {
NestedFieldRef f = (NestedFieldRef) ref; NestedFieldRef f = (NestedFieldRef) ref;
return new InnerHitExtractor(f.parent(), f.name(), f.useDocValue()); return new InnerHitExtractor(f.parent(), f.name(), f.useDocValue());
} }
if (ref instanceof ScriptFieldRef) { if (ref instanceof ScriptFieldRef) {
ScriptFieldRef f = (ScriptFieldRef) ref; ScriptFieldRef f = (ScriptFieldRef) ref;
return new DocValueExtractor(f.name()); return new DocValueExtractor(f.name());
} }
if (ref instanceof ProcessingRef) { if (ref instanceof ProcessingRef) {
ProcessingRef pRef = (ProcessingRef) ref; ProcessingRef pRef = (ProcessingRef) ref;
return new ProcessingHitExtractor(createExtractor(pRef.ref()), pRef.processor()); return new ProcessingHitExtractor(createExtractor(pRef.ref()), pRef.processor());
} }
throw new SqlIllegalArgumentException("Unexpected ValueReference %s", ref.getClass()); throw new SqlIllegalArgumentException("Unexpected ValueReference %s", ref.getClass());
} }
} }
// listener used for streaming the rest of the results after the handshake has been used // listener used for streaming the rest of the results after the handshake has been used
static class SessionScrollActionListener extends SearchHitsActionListener { static class SessionScrollActionListener extends SearchHitsActionListener {
private List<HitExtractor> exts; private List<HitExtractor> exts;
SessionScrollActionListener(ActionListener<RowSetCursor> listener, Client client, TimeValue keepAlive, Schema schema, List<HitExtractor> ext, int limit, int docCount) { SessionScrollActionListener(ActionListener<RowSetCursor> listener, Client client, TimeValue keepAlive, Schema schema, List<HitExtractor> ext, int limit, int docCount) {
super(listener, client, keepAlive, schema, limit, docCount); super(listener, client, keepAlive, schema, limit, docCount);
this.exts = ext; this.exts = ext;
} }
@Override @Override
protected List<HitExtractor> getExtractors() { protected List<HitExtractor> getExtractors() {
return exts; return exts;
} }
} }
abstract static class SearchHitsActionListener extends ScrollerActionListener { abstract static class SearchHitsActionListener extends ScrollerActionListener {
final int limit; final int limit;
int docsRead; int docsRead;
SearchHitsActionListener(ActionListener<RowSetCursor> listener, Client client, TimeValue keepAlive, Schema schema, int limit, int docsRead) { SearchHitsActionListener(ActionListener<RowSetCursor> listener, Client client, TimeValue keepAlive, Schema schema, int limit, int docsRead) {
super(listener, client, keepAlive, schema); super(listener, client, keepAlive, schema);
this.limit = limit; this.limit = limit;
this.docsRead = docsRead; this.docsRead = docsRead;
} }
protected RowSetCursor handleResponse(SearchResponse response) { protected RowSetCursor handleResponse(SearchResponse response) {
SearchHit[] hits = response.getHits().getHits(); SearchHit[] hits = response.getHits().getHits();
List<HitExtractor> exts = getExtractors(); List<HitExtractor> exts = getExtractors();
// there are some results // there are some results
if (hits.length > 0) { if (hits.length > 0) {
String scrollId = response.getScrollId(); String scrollId = response.getScrollId();
Consumer<ActionListener<RowSetCursor>> next = null; Consumer<ActionListener<RowSetCursor>> next = null;
docsRead += hits.length; docsRead += hits.length;
// if there's an id, try to setup next scroll // if there's an id, try to setup next scroll
if (scrollId != null) { if (scrollId != null) {
// is all the content already retrieved? // is all the content already retrieved?
@ -300,7 +299,7 @@ public class Scroller {
return needsHit(exts) ? Rows.empty(schema) : new SearchHitRowSetCursor(schema, exts); return needsHit(exts) ? Rows.empty(schema) : new SearchHitRowSetCursor(schema, exts);
} }
} }
private static boolean needsHit(List<HitExtractor> exts) { private static boolean needsHit(List<HitExtractor> exts) {
for (HitExtractor ext : exts) { for (HitExtractor ext : exts) {
if (ext instanceof DocValueExtractor || ext instanceof ProcessingHitExtractor) { if (ext instanceof DocValueExtractor || ext instanceof ProcessingHitExtractor) {
@ -309,26 +308,26 @@ public class Scroller {
} }
return false; return false;
} }
protected abstract List<HitExtractor> getExtractors(); protected abstract List<HitExtractor> getExtractors();
} }
abstract static class ScrollerActionListener implements ActionListener<SearchResponse> { abstract static class ScrollerActionListener implements ActionListener<SearchResponse> {
final ActionListener<RowSetCursor> listener; final ActionListener<RowSetCursor> listener;
final Client client; final Client client;
final TimeValue keepAlive; final TimeValue keepAlive;
final Schema schema; final Schema schema;
ScrollerActionListener(ActionListener<RowSetCursor> listener, Client client, TimeValue keepAlive, Schema schema) { ScrollerActionListener(ActionListener<RowSetCursor> listener, Client client, TimeValue keepAlive, Schema schema) {
this.listener = listener; this.listener = listener;
this.client = client; this.client = client;
this.keepAlive = keepAlive; this.keepAlive = keepAlive;
this.schema = schema; this.schema = schema;
} }
// TODO: need to handle rejections plus check failures (shard size, etc...) // TODO: need to handle rejections plus check failures (shard size, etc...)
@Override @Override
public void onResponse(final SearchResponse response) { public void onResponse(final SearchResponse response) {
@ -342,19 +341,19 @@ public class Scroller {
onFailure(ex); onFailure(ex);
} }
} }
protected abstract RowSetCursor handleResponse(SearchResponse response); protected abstract RowSetCursor handleResponse(SearchResponse response);
protected final void clearScroll(String scrollId) { protected final void clearScroll(String scrollId) {
if (scrollId != null) { if (scrollId != null) {
// fire and forget // fire and forget
client.prepareClearScroll().addScrollId(scrollId).execute(); client.prepareClearScroll().addScrollId(scrollId).execute();
} }
} }
@Override @Override
public final void onFailure(Exception ex) { public final void onFailure(Exception ex) {
listener.onFailure(ex); listener.onFailure(ex);
} }
} }
} }

View File

@ -5,13 +5,13 @@
*/ */
package org.elasticsearch.xpack.sql.expression; package org.elasticsearch.xpack.sql.expression;
import java.util.List;
import org.elasticsearch.xpack.sql.capabilities.Unresolvable; import org.elasticsearch.xpack.sql.capabilities.Unresolvable;
import org.elasticsearch.xpack.sql.capabilities.UnresolvedException; import org.elasticsearch.xpack.sql.capabilities.UnresolvedException;
import org.elasticsearch.xpack.sql.tree.Location; import org.elasticsearch.xpack.sql.tree.Location;
import org.elasticsearch.xpack.sql.type.DataType; import org.elasticsearch.xpack.sql.type.DataType;
import java.util.List;
abstract class UnresolvedNamedExpression extends NamedExpression implements Unresolvable { abstract class UnresolvedNamedExpression extends NamedExpression implements Unresolvable {
UnresolvedNamedExpression(Location location, List<Expression> children) { UnresolvedNamedExpression(Location location, List<Expression> children) {

View File

@ -5,15 +5,15 @@
*/ */
package org.elasticsearch.xpack.sql.expression.predicate.fulltext; package org.elasticsearch.xpack.sql.expression.predicate.fulltext;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.elasticsearch.xpack.sql.expression.Expression; import org.elasticsearch.xpack.sql.expression.Expression;
import org.elasticsearch.xpack.sql.tree.Location; import org.elasticsearch.xpack.sql.tree.Location;
import org.elasticsearch.xpack.sql.type.DataType; import org.elasticsearch.xpack.sql.type.DataType;
import org.elasticsearch.xpack.sql.type.DataTypes; import org.elasticsearch.xpack.sql.type.DataTypes;
import java.util.List;
import java.util.Map;
import java.util.Objects;
public class FullTextPredicate extends Expression { public class FullTextPredicate extends Expression {
public enum Operator { public enum Operator {

View File

@ -5,11 +5,6 @@
*/ */
package org.elasticsearch.xpack.sql.planner; package org.elasticsearch.xpack.sql.planner;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.elasticsearch.xpack.sql.SqlIllegalArgumentException; import org.elasticsearch.xpack.sql.SqlIllegalArgumentException;
import org.elasticsearch.xpack.sql.expression.Alias; import org.elasticsearch.xpack.sql.expression.Alias;
import org.elasticsearch.xpack.sql.expression.Attribute; import org.elasticsearch.xpack.sql.expression.Attribute;
@ -53,8 +48,12 @@ import org.elasticsearch.xpack.sql.rule.RuleExecutor;
import org.elasticsearch.xpack.sql.session.EmptyExecutable; import org.elasticsearch.xpack.sql.session.EmptyExecutable;
import org.elasticsearch.xpack.sql.util.StringUtils; import org.elasticsearch.xpack.sql.util.StringUtils;
import static java.util.Collections.emptyMap; import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import static java.util.Collections.emptyMap;
import static org.elasticsearch.xpack.sql.planner.QueryTranslator.and; import static org.elasticsearch.xpack.sql.planner.QueryTranslator.and;
import static org.elasticsearch.xpack.sql.planner.QueryTranslator.toAgg; import static org.elasticsearch.xpack.sql.planner.QueryTranslator.toAgg;
import static org.elasticsearch.xpack.sql.planner.QueryTranslator.toQuery; import static org.elasticsearch.xpack.sql.planner.QueryTranslator.toQuery;
@ -83,7 +82,7 @@ class QueryFolder extends RuleExecutor<PhysicalPlan> {
return Arrays.asList(rollup, finish); return Arrays.asList(rollup, finish);
} }
private class FoldProject extends FoldingRule<ProjectExec> { private static class FoldProject extends FoldingRule<ProjectExec> {
@Override @Override
protected PhysicalPlan rule(ProjectExec project) { protected PhysicalPlan rule(ProjectExec project) {
@ -141,7 +140,7 @@ class QueryFolder extends RuleExecutor<PhysicalPlan> {
} }
} }
private class FoldFilter extends FoldingRule<FilterExec> { private static class FoldFilter extends FoldingRule<FilterExec> {
@Override @Override
protected PhysicalPlan rule(FilterExec plan) { protected PhysicalPlan rule(FilterExec plan) {
@ -214,7 +213,7 @@ class QueryFolder extends RuleExecutor<PhysicalPlan> {
} }
} }
private class FoldAggregate extends FoldingRule<AggregateExec> { private static class FoldAggregate extends FoldingRule<AggregateExec> {
@Override @Override
protected PhysicalPlan rule(AggregateExec a) { protected PhysicalPlan rule(AggregateExec a) {
@ -380,7 +379,7 @@ class QueryFolder extends RuleExecutor<PhysicalPlan> {
} }
} }
private class FoldOrderBy extends FoldingRule<OrderExec> { private static class FoldOrderBy extends FoldingRule<OrderExec> {
@Override @Override
protected PhysicalPlan rule(OrderExec plan) { protected PhysicalPlan rule(OrderExec plan) {
@ -444,7 +443,7 @@ class QueryFolder extends RuleExecutor<PhysicalPlan> {
} }
private class FoldLimit extends FoldingRule<LimitExec> { private static class FoldLimit extends FoldingRule<LimitExec> {
@Override @Override
protected PhysicalPlan rule(LimitExec plan) { protected PhysicalPlan rule(LimitExec plan) {
@ -459,7 +458,7 @@ class QueryFolder extends RuleExecutor<PhysicalPlan> {
} }
} }
private class FoldQueryless extends FoldingRule<PhysicalPlan> { private static class FoldQueryless extends FoldingRule<PhysicalPlan> {
@Override @Override
protected PhysicalPlan rule(PhysicalPlan plan) { protected PhysicalPlan rule(PhysicalPlan plan) {
@ -470,7 +469,7 @@ class QueryFolder extends RuleExecutor<PhysicalPlan> {
} }
} }
private class PlanOutputToQueryRef extends FoldingRule<EsQueryExec> { private static class PlanOutputToQueryRef extends FoldingRule<EsQueryExec> {
@Override @Override
protected PhysicalPlan rule(EsQueryExec exec) { protected PhysicalPlan rule(EsQueryExec exec) {
QueryContainer qContainer = exec.queryContainer(); QueryContainer qContainer = exec.queryContainer();

View File

@ -257,7 +257,7 @@ abstract class QueryTranslator {
// dates are handled differently because of date histograms // dates are handled differently because of date histograms
if (exp instanceof DateTimeFunction) { if (exp instanceof DateTimeFunction) {
DateTimeFunction dtf = (DateTimeFunction) exp; DateTimeFunction dtf = (DateTimeFunction) exp;
agg = new GroupByDateAgg(aggId, AggPath.bucketValue(propertyPath), nameOf(exp), dtf.interval(), dtf.timeZone()); agg = new GroupByDateAgg(aggId, AggPath.bucketValue(propertyPath), nameOf(exp), dtf.interval());
} }
else { else {
agg = new GroupByColumnAgg(aggId, AggPath.bucketValue(propertyPath), ne.name()); agg = new GroupByColumnAgg(aggId, AggPath.bucketValue(propertyPath), ne.name());
@ -697,7 +697,7 @@ abstract class QueryTranslator {
// //
// Agg translators // Agg translators
// //
static class DistinctCounts extends SingleValueAggTranslator<Count> { static class DistinctCounts extends SingleValueAggTranslator<Count> {
@Override @Override
@ -708,7 +708,7 @@ abstract class QueryTranslator {
return new CardinalityAgg(id, path, field(c)); return new CardinalityAgg(id, path, field(c));
} }
} }
static class Sums extends SingleValueAggTranslator<Sum> { static class Sums extends SingleValueAggTranslator<Sum> {
@Override @Override
@ -716,7 +716,7 @@ abstract class QueryTranslator {
return new SumAgg(id, path, field(s)); return new SumAgg(id, path, field(s));
} }
} }
static class Avgs extends SingleValueAggTranslator<Avg> { static class Avgs extends SingleValueAggTranslator<Avg> {
@Override @Override
@ -724,7 +724,7 @@ abstract class QueryTranslator {
return new AvgAgg(id, path, field(a)); return new AvgAgg(id, path, field(a));
} }
} }
static class Maxes extends SingleValueAggTranslator<Max> { static class Maxes extends SingleValueAggTranslator<Max> {
@Override @Override
@ -732,7 +732,7 @@ abstract class QueryTranslator {
return new MaxAgg(id, path, field(m)); return new MaxAgg(id, path, field(m));
} }
} }
static class Mins extends SingleValueAggTranslator<Min> { static class Mins extends SingleValueAggTranslator<Min> {
@Override @Override
@ -740,7 +740,7 @@ abstract class QueryTranslator {
return new MinAgg(id, path, field(m)); return new MinAgg(id, path, field(m));
} }
} }
static class StatsAggs extends CompoundAggTranslator<Stats> { static class StatsAggs extends CompoundAggTranslator<Stats> {
@Override @Override
@ -748,7 +748,7 @@ abstract class QueryTranslator {
return new StatsAgg(id, path, field(s)); return new StatsAgg(id, path, field(s));
} }
} }
static class ExtendedStatsAggs extends CompoundAggTranslator<ExtendedStats> { static class ExtendedStatsAggs extends CompoundAggTranslator<ExtendedStats> {
@Override @Override
@ -756,7 +756,7 @@ abstract class QueryTranslator {
return new ExtendedStatsAgg(id, path, field(e)); return new ExtendedStatsAgg(id, path, field(e));
} }
} }
static class MatrixStatsAggs extends CompoundAggTranslator<MatrixStats> { static class MatrixStatsAggs extends CompoundAggTranslator<MatrixStats> {
@Override @Override
@ -764,7 +764,7 @@ abstract class QueryTranslator {
return new MatrixStatsAgg(id, path, singletonList(field(m))); return new MatrixStatsAgg(id, path, singletonList(field(m)));
} }
} }
static class DateTimes extends SingleValueAggTranslator<Min> { static class DateTimes extends SingleValueAggTranslator<Min> {
@Override @Override
@ -772,7 +772,7 @@ abstract class QueryTranslator {
return new MinAgg(id, path, field(m)); return new MinAgg(id, path, field(m));
} }
} }
abstract static class AggTranslator<F extends Function> { abstract static class AggTranslator<F extends Function> {
private final Class<F> typeToken = ReflectionUtils.detectSuperTypeForRuleLike(getClass()); private final Class<F> typeToken = ReflectionUtils.detectSuperTypeForRuleLike(getClass());
@ -784,7 +784,7 @@ abstract class QueryTranslator {
protected abstract LeafAgg asAgg(String id, String parent, F f); protected abstract LeafAgg asAgg(String id, String parent, F f);
} }
abstract static class SingleValueAggTranslator<F extends Function> extends AggTranslator<F> { abstract static class SingleValueAggTranslator<F extends Function> extends AggTranslator<F> {
@Override @Override
@ -795,7 +795,7 @@ abstract class QueryTranslator {
protected abstract LeafAgg toAgg(String id, String path, F f); protected abstract LeafAgg toAgg(String id, String path, F f);
} }
abstract static class CompoundAggTranslator<C extends CompoundAggregate> extends AggTranslator<C> { abstract static class CompoundAggTranslator<C extends CompoundAggregate> extends AggTranslator<C> {
@Override @Override
@ -806,7 +806,8 @@ abstract class QueryTranslator {
protected abstract LeafAgg toAgg(String id, String path, C f); protected abstract LeafAgg toAgg(String id, String path, C f);
} }
abstract static class ExppressionTranslator<E extends Expression> { abstract static class ExppressionTranslator<E extends Expression> {
private final Class<E> typeToken = ReflectionUtils.detectSuperTypeForRuleLike(getClass()); private final Class<E> typeToken = ReflectionUtils.detectSuperTypeForRuleLike(getClass());