Checkstyle

Original commit: elastic/x-pack-elasticsearch@4d8e9b2a7a
This commit is contained in:
Nik Everett 2017-06-30 16:53:42 -04:00
parent 6de905c2e8
commit 1a2cbea747
8 changed files with 270 additions and 272 deletions

View File

@ -967,7 +967,7 @@ public class Analyzer extends RuleExecutor<LogicalPlan> {
}
}
static abstract class AnalyzeRule<SubPlan extends LogicalPlan> extends Rule<SubPlan, LogicalPlan> {
abstract static class AnalyzeRule<SubPlan extends LogicalPlan> extends Rule<SubPlan, LogicalPlan> {
// transformUp (post-order) - that is first children and then the node
// but with a twist; only if the tree is not resolved or analyzed

View File

@ -87,10 +87,10 @@ public class Scroller {
ScrollerActionListener l = new SessionScrollActionListener(listener, previous.client, previous.keepAlive, previous.schema, ext, previous.limit, previous.docsRead);
previous.client.searchScroll(new SearchScrollRequest(scrollId).scroll(previous.keepAlive), l);
}
}
// dedicated scroll used for aggs-only/group-by results
class AggsScrollActionListener extends ScrollerActionListener {
// dedicated scroll used for aggs-only/group-by results
static class AggsScrollActionListener extends ScrollerActionListener {
private final QueryContainer query;
@ -182,10 +182,10 @@ class AggsScrollActionListener extends ScrollerActionListener {
private Object processIfNeeded(ColumnProcessor processor, Object value) {
return processor != null ? processor.apply(value) : value;
}
}
}
// initial scroll used for parsing search hits (handles possible aggs)
class HandshakeScrollActionListener extends SearchHitsActionListener {
// initial scroll used for parsing search hits (handles possible aggs)
class HandshakeScrollActionListener extends SearchHitsActionListener {
private final QueryContainer query;
@ -235,10 +235,10 @@ class HandshakeScrollActionListener extends SearchHitsActionListener {
throw new SqlIllegalArgumentException("Unexpected ValueReference %s", ref.getClass());
}
}
}
// listener used for streaming the rest of the results after the handshake has been used
class SessionScrollActionListener extends SearchHitsActionListener {
// listener used for streaming the rest of the results after the handshake has been used
static class SessionScrollActionListener extends SearchHitsActionListener {
private List<HitExtractor> exts;
@ -251,9 +251,9 @@ class SessionScrollActionListener extends SearchHitsActionListener {
protected List<HitExtractor> getExtractors() {
return exts;
}
}
}
abstract class SearchHitsActionListener extends ScrollerActionListener {
abstract static class SearchHitsActionListener extends ScrollerActionListener {
final int limit;
int docsRead;
@ -311,9 +311,9 @@ abstract class SearchHitsActionListener extends ScrollerActionListener {
}
protected abstract List<HitExtractor> getExtractors();
}
}
abstract class ScrollerActionListener implements ActionListener<SearchResponse> {
abstract static class ScrollerActionListener implements ActionListener<SearchResponse> {
final ActionListener<RowSetCursor> listener;
@ -356,4 +356,5 @@ abstract class ScrollerActionListener implements ActionListener<SearchResponse>
public final void onFailure(Exception ex) {
listener.onFailure(ex);
}
}
}

View File

@ -14,7 +14,7 @@ import org.elasticsearch.xpack.sql.type.DataType;
abstract class UnresolvedNamedExpression extends NamedExpression implements Unresolvable {
public UnresolvedNamedExpression(Location location, List<Expression> children) {
UnresolvedNamedExpression(Location location, List<Expression> children) {
super(location, "<unresolved>", children, ExpressionIdGenerator.EMPTY);
}

View File

@ -16,7 +16,7 @@ public enum FunctionType {
private final Class<? extends Function> baseClass;
private FunctionType(Class<? extends Function> base) {
FunctionType(Class<? extends Function> base) {
this.baseClass = base;
}

View File

@ -16,7 +16,7 @@ import org.elasticsearch.xpack.sql.type.DataTypes;
public class FullTextPredicate extends Expression {
public static enum Operator {
public enum Operator {
AND,
OR;

View File

@ -947,7 +947,7 @@ public class Optimizer extends RuleExecutor<LogicalPlan> {
}
static abstract class OptimizerRule<SubPlan extends LogicalPlan> extends Rule<SubPlan, LogicalPlan> {
abstract static class OptimizerRule<SubPlan extends LogicalPlan> extends Rule<SubPlan, LogicalPlan> {
private final boolean transformDown;
@ -969,7 +969,7 @@ public class Optimizer extends RuleExecutor<LogicalPlan> {
protected abstract LogicalPlan rule(SubPlan plan);
}
static abstract class OptimizerExpressionUpRule extends Rule<LogicalPlan, LogicalPlan> {
abstract static class OptimizerExpressionUpRule extends Rule<LogicalPlan, LogicalPlan> {
private final boolean transformDown;

View File

@ -61,8 +61,6 @@ import static org.elasticsearch.xpack.sql.planner.QueryTranslator.toQuery;
import static org.elasticsearch.xpack.sql.util.CollectionUtils.combine;
class QueryFolder extends RuleExecutor<PhysicalPlan> {
PhysicalPlan fold(PhysicalPlan plan) {
return execute(plan);
}
@ -501,10 +499,9 @@ class QueryFolder extends RuleExecutor<PhysicalPlan> {
return exec.with(qContainer);
}
}
}
// rule for folding physical plans together
abstract class FoldingRule<SubPlan extends PhysicalPlan> extends Rule<SubPlan, PhysicalPlan> {
// rule for folding physical plans together
abstract static class FoldingRule<SubPlan extends PhysicalPlan> extends Rule<SubPlan, PhysicalPlan> {
@Override
public final PhysicalPlan apply(PhysicalPlan plan) {
@ -513,4 +510,5 @@ abstract class FoldingRule<SubPlan extends PhysicalPlan> extends Rule<SubPlan, P
@Override
protected abstract PhysicalPlan rule(SubPlan plan);
}
}

View File

@ -773,7 +773,7 @@ abstract class QueryTranslator {
}
}
static abstract class AggTranslator<F extends Function> {
abstract static class AggTranslator<F extends Function> {
private final Class<F> typeToken = ReflectionUtils.detectSuperTypeForRuleLike(getClass());
@ -785,7 +785,7 @@ abstract class QueryTranslator {
protected abstract LeafAgg asAgg(String id, String parent, F f);
}
static abstract class SingleValueAggTranslator<F extends Function> extends AggTranslator<F> {
abstract static class SingleValueAggTranslator<F extends Function> extends AggTranslator<F> {
@Override
protected final LeafAgg asAgg(String id, String parent, F function) {
@ -796,7 +796,7 @@ abstract class QueryTranslator {
protected abstract LeafAgg toAgg(String id, String path, F f);
}
static abstract class CompoundAggTranslator<C extends CompoundAggregate> extends AggTranslator<C> {
abstract static class CompoundAggTranslator<C extends CompoundAggregate> extends AggTranslator<C> {
@Override
protected final LeafAgg asAgg(String id, String parent, C function) {
@ -807,8 +807,7 @@ abstract class QueryTranslator {
protected abstract LeafAgg toAgg(String id, String path, C f);
}
static abstract class ExppressionTranslator<E extends Expression> {
abstract static class ExppressionTranslator<E extends Expression> {
private final Class<E> typeToken = ReflectionUtils.detectSuperTypeForRuleLike(getClass());