Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Forever310
druid
提交
879e6153
D
druid
项目概览
Forever310
/
druid
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
druid
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
879e6153
编写于
8月 29, 2014
作者:
G
Gian Merlino
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
AggregatorFactory equals() and hashCode() methods.
上级
08b6a267
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
126 addition
and
1 deletion
+126
-1
histogram/src/main/java/io/druid/query/aggregation/histogram/ApproximateHistogramAggregatorFactory.java
...tion/histogram/ApproximateHistogramAggregatorFactory.java
+46
-0
histogram/src/main/java/io/druid/query/aggregation/histogram/ApproximateHistogramFoldingAggregatorFactory.java
...stogram/ApproximateHistogramFoldingAggregatorFactory.java
+46
-0
processing/src/main/java/io/druid/query/aggregation/cardinality/CardinalityAggregatorFactory.java
...aggregation/cardinality/CardinalityAggregatorFactory.java
+34
-1
未找到文件。
histogram/src/main/java/io/druid/query/aggregation/histogram/ApproximateHistogramAggregatorFactory.java
浏览文件 @
879e6153
...
...
@@ -238,6 +238,52 @@ public class ApproximateHistogramAggregatorFactory implements AggregatorFactory
return
new
ApproximateHistogram
(
resolution
);
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
ApproximateHistogramAggregatorFactory
that
=
(
ApproximateHistogramAggregatorFactory
)
o
;
if
(
Float
.
compare
(
that
.
lowerLimit
,
lowerLimit
)
!=
0
)
{
return
false
;
}
if
(
numBuckets
!=
that
.
numBuckets
)
{
return
false
;
}
if
(
resolution
!=
that
.
resolution
)
{
return
false
;
}
if
(
Float
.
compare
(
that
.
upperLimit
,
upperLimit
)
!=
0
)
{
return
false
;
}
if
(
fieldName
!=
null
?
!
fieldName
.
equals
(
that
.
fieldName
)
:
that
.
fieldName
!=
null
)
{
return
false
;
}
if
(
name
!=
null
?
!
name
.
equals
(
that
.
name
)
:
that
.
name
!=
null
)
{
return
false
;
}
return
true
;
}
@Override
public
int
hashCode
()
{
int
result
=
name
!=
null
?
name
.
hashCode
()
:
0
;
result
=
31
*
result
+
(
fieldName
!=
null
?
fieldName
.
hashCode
()
:
0
);
result
=
31
*
result
+
resolution
;
result
=
31
*
result
+
numBuckets
;
result
=
31
*
result
+
(
lowerLimit
!=
+
0.0f
?
Float
.
floatToIntBits
(
lowerLimit
)
:
0
);
result
=
31
*
result
+
(
upperLimit
!=
+
0.0f
?
Float
.
floatToIntBits
(
upperLimit
)
:
0
);
return
result
;
}
@Override
public
String
toString
()
{
...
...
histogram/src/main/java/io/druid/query/aggregation/histogram/ApproximateHistogramFoldingAggregatorFactory.java
浏览文件 @
879e6153
...
...
@@ -148,6 +148,52 @@ public class ApproximateHistogramFoldingAggregatorFactory extends ApproximateHis
.
array
();
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
ApproximateHistogramAggregatorFactory
that
=
(
ApproximateHistogramAggregatorFactory
)
o
;
if
(
Float
.
compare
(
that
.
lowerLimit
,
lowerLimit
)
!=
0
)
{
return
false
;
}
if
(
numBuckets
!=
that
.
numBuckets
)
{
return
false
;
}
if
(
resolution
!=
that
.
resolution
)
{
return
false
;
}
if
(
Float
.
compare
(
that
.
upperLimit
,
upperLimit
)
!=
0
)
{
return
false
;
}
if
(
fieldName
!=
null
?
!
fieldName
.
equals
(
that
.
fieldName
)
:
that
.
fieldName
!=
null
)
{
return
false
;
}
if
(
name
!=
null
?
!
name
.
equals
(
that
.
name
)
:
that
.
name
!=
null
)
{
return
false
;
}
return
true
;
}
@Override
public
int
hashCode
()
{
int
result
=
name
!=
null
?
name
.
hashCode
()
:
0
;
result
=
31
*
result
+
(
fieldName
!=
null
?
fieldName
.
hashCode
()
:
0
);
result
=
31
*
result
+
resolution
;
result
=
31
*
result
+
numBuckets
;
result
=
31
*
result
+
(
lowerLimit
!=
+
0.0f
?
Float
.
floatToIntBits
(
lowerLimit
)
:
0
);
result
=
31
*
result
+
(
upperLimit
!=
+
0.0f
?
Float
.
floatToIntBits
(
upperLimit
)
:
0
);
return
result
;
}
@Override
public
String
toString
()
{
...
...
processing/src/main/java/io/druid/query/aggregation/cardinality/CardinalityAggregatorFactory.java
浏览文件 @
879e6153
...
...
@@ -39,7 +39,6 @@ import org.apache.commons.codec.binary.Base64;
import
javax.annotation.Nullable
;
import
java.nio.ByteBuffer
;
import
java.util.Arrays
;
import
java.util.Comparator
;
import
java.util.List
;
...
...
@@ -233,6 +232,40 @@ public class CardinalityAggregatorFactory implements AggregatorFactory
return
HyperLogLogCollector
.
makeLatestCollector
();
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
CardinalityAggregatorFactory
that
=
(
CardinalityAggregatorFactory
)
o
;
if
(
byRow
!=
that
.
byRow
)
{
return
false
;
}
if
(
fieldNames
!=
null
?
!
fieldNames
.
equals
(
that
.
fieldNames
)
:
that
.
fieldNames
!=
null
)
{
return
false
;
}
if
(
name
!=
null
?
!
name
.
equals
(
that
.
name
)
:
that
.
name
!=
null
)
{
return
false
;
}
return
true
;
}
@Override
public
int
hashCode
()
{
int
result
=
name
!=
null
?
name
.
hashCode
()
:
0
;
result
=
31
*
result
+
(
fieldNames
!=
null
?
fieldNames
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
byRow
?
1
:
0
);
return
result
;
}
@Override
public
String
toString
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录