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

Formatting, remove unnecessary constructors

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