Update constructor for NumericAggregate classes
Original commit: elastic/x-pack-elasticsearch@732742083b
This commit is contained in:
parent
a4bd077913
commit
1471c8ab7f
|
@ -91,6 +91,10 @@ public class CsvSpecIT extends SpecBaseIntegrationTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
protected void assertResults(ResultSet expected, ResultSet actual) throws SQLException {
|
||||
assertResultSets(expected, actual);
|
||||
}
|
||||
|
||||
private ResultSet executeJdbcQuery(Connection con, String query) throws SQLException {
|
||||
Statement statement = con.createStatement();
|
||||
//statement.setFetchSize(randomInt(10));
|
||||
|
|
|
@ -7,16 +7,20 @@ package org.elasticsearch.xpack.sql.jdbc;
|
|||
|
||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||
|
||||
import org.elasticsearch.test.junit.annotations.TestLogging;
|
||||
import org.elasticsearch.xpack.sql.jdbc.framework.JdbcTestUtils;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class DebugCsvSpec extends CsvSpecIT {
|
||||
@TestLogging("org.elasticsearch.xpack.sql:TRACE")
|
||||
public class DebugCsvSpec extends CsvSpecIT {
|
||||
|
||||
@ParametersFactory(shuffle = false, argumentFormatting = SqlSpecIT.PARAM_FORMATTING) // NOCOMMIT are we sure?!
|
||||
public static List<Object[]> readScriptSpec() throws Exception {
|
||||
JdbcTestUtils.sqlLogging();
|
||||
//JdbcTestUtils.sqlLogging();
|
||||
|
||||
CsvSpecParser parser = new CsvSpecParser();
|
||||
return readScriptSpec("/debug.csv-spec", parser);
|
||||
|
@ -26,11 +30,8 @@ public abstract class DebugCsvSpec extends CsvSpecIT {
|
|||
super(groupName, testName, lineNumber, source, testCase);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void assertResults(ResultSet expected, ResultSet actual) throws SQLException {
|
||||
// Logger logger = Loggers.getLogger("org.elasticsearch.xpack.sql.test");
|
||||
// Loggers.setLevel(logger, "INFO");
|
||||
//
|
||||
// JdbcTestUtils.resultSetToLogger(logger, actual);
|
||||
// }
|
||||
@Override
|
||||
public void assertResults(ResultSet expected, ResultSet actual) throws SQLException {
|
||||
JdbcTestUtils.resultSetToLogger(logger, actual);
|
||||
}
|
||||
}
|
|
@ -10,8 +10,8 @@ import org.elasticsearch.xpack.sql.tree.Location;
|
|||
|
||||
public class Avg extends NumericAggregate implements EnclosedAgg {
|
||||
|
||||
public Avg(Location location, Expression argument) {
|
||||
super(location, argument);
|
||||
public Avg(Location location, Expression field) {
|
||||
super(location, field);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,6 +25,11 @@ public class Count extends NumericAggregate implements DistinctAware {
|
|||
return distinct;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TypeResolution resolveType() {
|
||||
return TypeResolution.TYPE_RESOLVED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType dataType() {
|
||||
return DataTypes.LONG;
|
||||
|
|
|
@ -10,8 +10,8 @@ import org.elasticsearch.xpack.sql.tree.Location;
|
|||
|
||||
public class Kurtosis extends NumericAggregate implements MatrixStatsEnclosed {
|
||||
|
||||
public Kurtosis(Location location, Expression argument) {
|
||||
super(location, argument);
|
||||
public Kurtosis(Location location, Expression field) {
|
||||
super(location, field);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -11,8 +11,8 @@ import org.elasticsearch.xpack.sql.type.DataType;
|
|||
|
||||
public class Max extends NumericAggregate implements EnclosedAgg {
|
||||
|
||||
public Max(Location location, Expression argument) {
|
||||
super(location, argument);
|
||||
public Max(Location location, Expression field) {
|
||||
super(location, field);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,8 +12,8 @@ import org.elasticsearch.xpack.sql.type.DataTypes;
|
|||
|
||||
public class Mean extends NumericAggregate implements MatrixStatsEnclosed {
|
||||
|
||||
public Mean(Location location, Expression argument) {
|
||||
super(location, argument);
|
||||
public Mean(Location location, Expression field) {
|
||||
super(location, field);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -11,8 +11,8 @@ import org.elasticsearch.xpack.sql.type.DataType;
|
|||
|
||||
public class Min extends NumericAggregate implements EnclosedAgg {
|
||||
|
||||
public Min(Location location, Expression argument) {
|
||||
super(location, argument);
|
||||
public Min(Location location, Expression field) {
|
||||
super(location, field);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,8 +10,8 @@ import org.elasticsearch.xpack.sql.tree.Location;
|
|||
|
||||
public class Skewness extends NumericAggregate implements MatrixStatsEnclosed {
|
||||
|
||||
public Skewness(Location location, Expression argument) {
|
||||
super(location, argument);
|
||||
public Skewness(Location location, Expression field) {
|
||||
super(location, field);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,8 +10,8 @@ import org.elasticsearch.xpack.sql.tree.Location;
|
|||
|
||||
public class StddevPop extends NumericAggregate implements ExtendedStatsEnclosed {
|
||||
|
||||
public StddevPop(Location location, Expression argument) {
|
||||
super(location, argument);
|
||||
public StddevPop(Location location, Expression field) {
|
||||
super(location, field);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -11,8 +11,8 @@ import org.elasticsearch.xpack.sql.type.DataType;
|
|||
|
||||
public class Sum extends NumericAggregate implements EnclosedAgg {
|
||||
|
||||
public Sum(Location location, Expression argument) {
|
||||
super(location, argument);
|
||||
public Sum(Location location, Expression field) {
|
||||
super(location, field);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,8 +10,8 @@ import org.elasticsearch.xpack.sql.tree.Location;
|
|||
|
||||
public class SumOfSquares extends NumericAggregate implements ExtendedStatsEnclosed {
|
||||
|
||||
public SumOfSquares(Location location, Expression argument) {
|
||||
super(location, argument);
|
||||
public SumOfSquares(Location location, Expression field) {
|
||||
super(location, field);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,8 +10,8 @@ import org.elasticsearch.xpack.sql.tree.Location;
|
|||
|
||||
public class VarPop extends NumericAggregate implements ExtendedStatsEnclosed {
|
||||
|
||||
public VarPop(Location location, Expression argument) {
|
||||
super(location, argument);
|
||||
public VarPop(Location location, Expression field) {
|
||||
super(location, field);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue