Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
Questdb
提交
cd8b83ff
Q
Questdb
项目概览
jobily
/
Questdb
12 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
Questdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
cd8b83ff
编写于
4月 29, 2020
作者:
V
Vlad Ilyushchenko
提交者:
GitHub
4月 29, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: small fixes for ksum/nsum and added logging (#245)
上级
3d092dea
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
59 addition
and
51 deletion
+59
-51
core/src/main/c/share/vect.cpp
core/src/main/c/share/vect.cpp
+3
-2
core/src/main/java/io/questdb/cairo/TableReader.java
core/src/main/java/io/questdb/cairo/TableReader.java
+8
-1
core/src/test/java/io/questdb/griffin/GroupByFunctionTest.java
...src/test/java/io/questdb/griffin/GroupByFunctionTest.java
+48
-48
未找到文件。
core/src/main/c/share/vect.cpp
浏览文件 @
cd8b83ff
...
...
@@ -438,7 +438,7 @@ double SUM_DOUBLE_KAHAN(double *d, int64_t count) {
double
sum
=
horizontal_add
(
sumVec
);
double
c
=
horizontal_add
(
cVec
);
int
nans
=
horizontal_add
(
nancount
);
int
64_t
nans
=
horizontal_add
(
nancount
);
for
(;
d
<
lim
;
d
++
)
{
double
x
=
*
d
;
if
(
x
==
x
)
{
...
...
@@ -459,6 +459,7 @@ double SUM_DOUBLE_KAHAN(double *d, int64_t count) {
}
double
SUM_DOUBLE_NEUMAIER
(
double
*
d
,
int64_t
count
)
{
// return sumDoubleNeumaier_Vanilla(d, count);
Vec8d
inputVec
;
const
int
step
=
8
;
const
auto
*
lim
=
d
+
count
;
...
...
@@ -483,7 +484,7 @@ double SUM_DOUBLE_NEUMAIER(double *d, int64_t count) {
double
sum
=
horizontal_add
(
sumVec
);
double
c
=
horizontal_add
(
cVec
);
int
nans
=
horizontal_add
(
nancount
);
int
64_t
nans
=
horizontal_add
(
nancount
);
for
(;
d
<
lim
;
d
++
)
{
double
input
=
*
d
;
if
(
input
==
input
)
{
...
...
core/src/main/java/io/questdb/cairo/TableReader.java
浏览文件 @
cd8b83ff
...
...
@@ -578,6 +578,12 @@ public class TableReader implements Closeable {
}
}
}
LOG
.
info
()
.
$
(
"purging memory [prevMinTimestamp="
).
$ts
(
prevMinTimestamp
)
.
$
(
", minTimestamp="
).
$ts
(
minTimestamp
)
.
$
(
", partitionCount="
).
$
(
partitionCount
)
.
$
(
']'
).
$
();
// adjust columns list when leading partitions have been removed
if
(
prevMinTimestamp
!=
minTimestamp
)
{
assert
prevMinTimestamp
<
minTimestamp
;
...
...
@@ -989,7 +995,8 @@ public class TableReader implements Closeable {
.
$
(
"new transaction [txn="
).
$
(
txn
)
.
$
(
", transientRowCount="
).
$
(
transientRowCount
)
.
$
(
", fixedRowCount="
).
$
(
fixedRowCount
)
.
$
(
", maxTimestamp="
).
$
(
maxTimestamp
)
.
$
(
", minTimestamp="
).
$ts
(
this
.
minTimestamp
)
.
$
(
", maxTimestamp="
).
$ts
(
this
.
maxTimestamp
)
.
$
(
", attempts="
).
$
(
count
)
.
$
(
']'
).
$
();
return
true
;
...
...
core/src/test/java/io/questdb/griffin/GroupByFunctionTest.java
浏览文件 @
cd8b83ff
...
...
@@ -73,25 +73,6 @@ public class GroupByFunctionTest extends AbstractGriffinTest {
);
}
@Test
public
void
testKeyedNSumDoubleAllNaN
()
throws
Exception
{
assertQuery
(
"s\tnsum\n"
+
"aa\tNaN\n"
+
"bb\tNaN\n"
,
"select s, nsum(d) nsum from x"
,
"create table x as "
+
"("
+
"select"
+
" rnd_symbol('aa','bb') s,"
+
" NaN d"
+
" from"
+
" long_sequence(200)"
+
")"
,
null
,
true
);
}
@Test
public
void
testKeyedKSumDoubleSomeNaN
()
throws
Exception
{
assertQuery
(
"s\tksum\n"
+
...
...
@@ -111,25 +92,6 @@ public class GroupByFunctionTest extends AbstractGriffinTest {
);
}
@Test
public
void
testKeyedNSumDoubleSomeNaN
()
throws
Exception
{
assertQuery
(
"s\tnsum\n"
+
"aa\t37.816973659638755\n"
+
"bb\t50.90642211368272\n"
,
"select s, nsum(d) nsum from x"
,
"create table x as "
+
"("
+
"select"
+
" rnd_symbol('aa','bb') s,"
+
" rnd_double(2) d"
+
" from"
+
" long_sequence(200)"
+
")"
,
null
,
true
);
}
@Test
public
void
testKeyedMaxDateAllNaN
()
throws
Exception
{
assertQuery
(
"s\tmin\n"
+
...
...
@@ -453,6 +415,44 @@ public class GroupByFunctionTest extends AbstractGriffinTest {
);
}
@Test
public
void
testKeyedNSumDoubleAllNaN
()
throws
Exception
{
assertQuery
(
"s\tnsum\n"
+
"aa\tNaN\n"
+
"bb\tNaN\n"
,
"select s, nsum(d) nsum from x"
,
"create table x as "
+
"("
+
"select"
+
" rnd_symbol('aa','bb') s,"
+
" NaN d"
+
" from"
+
" long_sequence(200)"
+
")"
,
null
,
true
);
}
@Test
public
void
testKeyedNSumDoubleSomeNaN
()
throws
Exception
{
assertQuery
(
"s\tnsum\n"
+
"aa\t37.816973659638755\n"
+
"bb\t50.90642211368272\n"
,
"select s, nsum(d) nsum from x"
,
"create table x as "
+
"("
+
"select"
+
" rnd_symbol('aa','bb') s,"
+
" rnd_double(2) d"
+
" from"
+
" long_sequence(200)"
+
")"
,
null
,
true
);
}
@Test
public
void
testKeyedSumDoubleAllNaN
()
throws
Exception
{
assertQuery
(
"s\tsum\n"
+
...
...
@@ -585,16 +585,16 @@ public class GroupByFunctionTest extends AbstractGriffinTest {
}
@Test
public
void
testVector
NSumDoubleAllNaN
()
throws
Exception
{
public
void
testVector
KSumOneDouble
()
throws
Exception
{
assertQuery
(
"sum\n"
+
"
NaN
\n"
,
"select
nsum(d
) sum from x"
,
"
416711.27751251
\n"
,
"select
round(ksum(d),8
) sum from x"
,
"create table x as "
+
"("
+
"select"
+
"
NaN
d"
+
"
rnd_double(2)
d"
+
" from"
+
" long_sequence(
2
00)"
+
" long_sequence(
10000
00)"
+
")"
,
null
,
false
...
...
@@ -602,16 +602,16 @@ public class GroupByFunctionTest extends AbstractGriffinTest {
}
@Test
public
void
testVector
KSumOneDouble
()
throws
Exception
{
public
void
testVector
NSumDoubleAllNaN
()
throws
Exception
{
assertQuery
(
"sum\n"
+
"
416711.27751251357
\n"
,
"select
k
sum(d) sum from x"
,
"
NaN
\n"
,
"select
n
sum(d) sum from x"
,
"create table x as "
+
"("
+
"select"
+
"
rnd_double(2)
d"
+
"
NaN
d"
+
" from"
+
" long_sequence(
10000
00)"
+
" long_sequence(
2
00)"
+
")"
,
null
,
false
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录