Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
33cde2d9
提交
33cde2d9
authored
7月 02, 2013
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Formatting, remove unnecessary constructors
上级
3ec97321
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
9 行增加
和
18 行删除
+9
-18
Aggregate.java
h2/src/main/org/h2/expression/Aggregate.java
+1
-1
AggregateData.java
h2/src/main/org/h2/expression/AggregateData.java
+6
-5
AggregateDataCount.java
h2/src/main/org/h2/expression/AggregateDataCount.java
+0
-2
AggregateDataCountAll.java
h2/src/main/org/h2/expression/AggregateDataCountAll.java
+0
-2
AggregateDataDefault.java
h2/src/main/org/h2/expression/AggregateDataDefault.java
+1
-1
AggregateDataGroupConcat.java
h2/src/main/org/h2/expression/AggregateDataGroupConcat.java
+0
-2
AggregateDataHistogram.java
h2/src/main/org/h2/expression/AggregateDataHistogram.java
+0
-2
AggregateDataSelectivity.java
h2/src/main/org/h2/expression/AggregateDataSelectivity.java
+1
-3
没有找到文件。
h2/src/main/org/h2/expression/Aggregate.java
浏览文件 @
33cde2d9
...
...
@@ -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
;
}
...
...
h2/src/main/org/h2/expression/AggregateData.java
浏览文件 @
33cde2d9
...
...
@@ -13,17 +13,18 @@ import org.h2.value.Value;
* Abstract class for the computation of an aggregate.
*/
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
)
{
return
new
AggregateDataSelectivity
();
}
else
if
(
aggregateType
==
Aggregate
.
GROUP_CONCAT
)
{
return
new
AggregateDataGroupConcat
();
return
new
AggregateDataGroupConcat
();
}
else
if
(
aggregateType
==
Aggregate
.
COUNT_ALL
)
{
return
new
AggregateDataCountAll
();
}
else
if
(
aggregateType
==
Aggregate
.
COUNT
)
{
...
...
@@ -44,7 +45,7 @@ abstract class AggregateData {
* @param v the value
*/
abstract
void
add
(
Database
database
,
int
dataType
,
boolean
distinct
,
Value
v
);
/**
* Get the aggregate result.
*
...
...
h2/src/main/org/h2/expression/AggregateDataCount.java
浏览文件 @
33cde2d9
...
...
@@ -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
)
{
...
...
h2/src/main/org/h2/expression/AggregateDataCountAll.java
浏览文件 @
33cde2d9
...
...
@@ -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
)
{
...
...
h2/src/main/org/h2/expression/AggregateDataDefault.java
浏览文件 @
33cde2d9
...
...
@@ -32,7 +32,7 @@ class AggregateDataDefault extends AggregateData {
AggregateDataDefault
(
int
aggregateType
)
{
this
.
aggregateType
=
aggregateType
;
}
@Override
void
add
(
Database
database
,
int
dataType
,
boolean
distinct
,
Value
v
)
{
if
(
v
==
ValueNull
.
INSTANCE
)
{
...
...
h2/src/main/org/h2/expression/AggregateDataGroupConcat.java
浏览文件 @
33cde2d9
...
...
@@ -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
)
{
...
...
h2/src/main/org/h2/expression/AggregateDataHistogram.java
浏览文件 @
33cde2d9
...
...
@@ -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
)
{
...
...
h2/src/main/org/h2/expression/AggregateDataSelectivity.java
浏览文件 @
33cde2d9
...
...
@@ -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
++;
...
...
@@ -37,7 +35,7 @@ class AggregateDataSelectivity extends AggregateData {
// the value -1 is not supported
distinctHashes
.
put
(
hash
,
1
);
}
@Override
Value
getValue
(
Database
database
,
int
dataType
,
boolean
distinct
)
{
if
(
distinct
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论