Fix some checkstyles
Original commit: elastic/x-pack-elasticsearch@ff1c6a6e70
This commit is contained in:
parent
4bb605d819
commit
16ea84defe
|
@ -88,7 +88,6 @@ public class Scroller {
|
|||
previous.client.searchScroll(new SearchScrollRequest(scrollId).scroll(previous.keepAlive), l);
|
||||
}
|
||||
|
||||
|
||||
// dedicated scroll used for aggs-only/group-by results
|
||||
static class AggsScrollActionListener extends ScrollerActionListener {
|
||||
|
||||
|
@ -185,7 +184,7 @@ public class Scroller {
|
|||
}
|
||||
|
||||
// initial scroll used for parsing search hits (handles possible aggs)
|
||||
class HandshakeScrollActionListener extends SearchHitsActionListener {
|
||||
static class HandshakeScrollActionListener extends SearchHitsActionListener {
|
||||
|
||||
private final QueryContainer query;
|
||||
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.sql.expression;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.elasticsearch.xpack.sql.capabilities.Unresolvable;
|
||||
import org.elasticsearch.xpack.sql.capabilities.UnresolvedException;
|
||||
import org.elasticsearch.xpack.sql.tree.Location;
|
||||
import org.elasticsearch.xpack.sql.type.DataType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
abstract class UnresolvedNamedExpression extends NamedExpression implements Unresolvable {
|
||||
|
||||
UnresolvedNamedExpression(Location location, List<Expression> children) {
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
*/
|
||||
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.tree.Location;
|
||||
import org.elasticsearch.xpack.sql.type.DataType;
|
||||
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 enum Operator {
|
||||
|
|
|
@ -5,11 +5,6 @@
|
|||
*/
|
||||
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.expression.Alias;
|
||||
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.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.toAgg;
|
||||
import static org.elasticsearch.xpack.sql.planner.QueryTranslator.toQuery;
|
||||
|
@ -83,7 +82,7 @@ class QueryFolder extends RuleExecutor<PhysicalPlan> {
|
|||
return Arrays.asList(rollup, finish);
|
||||
}
|
||||
|
||||
private class FoldProject extends FoldingRule<ProjectExec> {
|
||||
private static class FoldProject extends FoldingRule<ProjectExec> {
|
||||
|
||||
@Override
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
protected PhysicalPlan rule(EsQueryExec exec) {
|
||||
QueryContainer qContainer = exec.queryContainer();
|
||||
|
|
|
@ -257,7 +257,7 @@ abstract class QueryTranslator {
|
|||
// dates are handled differently because of date histograms
|
||||
if (exp instanceof DateTimeFunction) {
|
||||
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 {
|
||||
agg = new GroupByColumnAgg(aggId, AggPath.bucketValue(propertyPath), ne.name());
|
||||
|
@ -807,6 +807,7 @@ abstract class QueryTranslator {
|
|||
protected abstract LeafAgg toAgg(String id, String path, C f);
|
||||
}
|
||||
|
||||
|
||||
abstract static class ExppressionTranslator<E extends Expression> {
|
||||
|
||||
private final Class<E> typeToken = ReflectionUtils.detectSuperTypeForRuleLike(getClass());
|
||||
|
|
Loading…
Reference in New Issue