提交 33cde2d9 authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting, remove unnecessary constructors

上级 3ec97321
......@@ -301,7 +301,7 @@ public class Aggregate extends Expression {
}
Value v = data.getValue(session.getDatabase(), dataType, distinct);
if (type == GROUP_CONCAT) {
ArrayList<Value> list = ((AggregateDataGroupConcat)data).getList();
ArrayList<Value> list = ((AggregateDataGroupConcat) data).getList();
if (list == null || list.size() == 0) {
return ValueNull.INSTANCE;
}
......
......@@ -15,9 +15,10 @@ import org.h2.value.Value;
abstract class AggregateData {
/**
* Create an AggregateData object of the correct subtype.
* Create an AggregateData object of the correct sub-type.
*
* @param aggregateType the type of the aggregate operation
* @return the aggregate data object of the specified type
*/
static AggregateData create(int aggregateType) {
if (aggregateType == Aggregate.SELECTIVITY) {
......
......@@ -18,8 +18,6 @@ class AggregateDataCount extends AggregateData {
private long count;
private ValueHashMap<AggregateDataCount> distinctValues;
AggregateDataCount() {}
@Override
void add(Database database, int dataType, boolean distinct, Value v) {
if (v == ValueNull.INSTANCE) {
......
......@@ -17,8 +17,6 @@ import org.h2.value.ValueNull;
class AggregateDataCountAll extends AggregateData {
private long count;
AggregateDataCountAll() {}
@Override
void add(Database database, int dataType, boolean distinct, Value v) {
if (distinct) {
......
......@@ -19,8 +19,6 @@ class AggregateDataGroupConcat extends AggregateData {
private ArrayList<Value> list;
private ValueHashMap<AggregateDataGroupConcat> distinctValues;
AggregateDataGroupConcat() {}
@Override
void add(Database database, int dataType, boolean distinct, Value v) {
if (v == ValueNull.INSTANCE) {
......
......@@ -22,8 +22,6 @@ class AggregateDataHistogram extends AggregateData {
private long count;
private ValueHashMap<AggregateDataHistogram> distinctValues;
AggregateDataHistogram() {}
@Override
void add(Database database, int dataType, boolean distinct, Value v) {
if (distinctValues == null) {
......
......@@ -20,8 +20,6 @@ class AggregateDataSelectivity extends AggregateData {
private IntIntHashMap distinctHashes;
private double m2;
AggregateDataSelectivity() {}
@Override
void add(Database database, int dataType, boolean distinct, Value v) {
count++;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论