Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
b7e00621
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b7e00621
编写于
10月 30, 2017
作者:
A
Alexey Milovidov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removed obsolete test [#CLICKHOUSE-2].
上级
1c50c650
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
86 deletion
+0
-86
dbms/src/Functions/tests/CMakeLists.txt
dbms/src/Functions/tests/CMakeLists.txt
+0
-3
dbms/src/Functions/tests/functions_arithmetic.cpp
dbms/src/Functions/tests/functions_arithmetic.cpp
+0
-83
未找到文件。
dbms/src/Functions/tests/CMakeLists.txt
浏览文件 @
b7e00621
...
...
@@ -3,8 +3,5 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR})
add_executable
(
number_traits number_traits.cpp
)
target_link_libraries
(
number_traits dbms
)
add_executable
(
functions_arithmetic functions_arithmetic.cpp
)
target_link_libraries
(
functions_arithmetic dbms clickhouse_functions
)
add_executable
(
logical_functions_performance logical_functions_performance.cpp
)
target_link_libraries
(
logical_functions_performance dbms
)
dbms/src/Functions/tests/functions_arithmetic.cpp
已删除
100644 → 0
浏览文件 @
1c50c650
#include <iostream>
#include <iomanip>
#include <Common/Stopwatch.h>
#include <DataTypes/DataTypesNumber.h>
#include <Columns/ColumnsNumber.h>
#include <Functions/FunctionsArithmetic.h>
int
main
(
int
argc
,
char
**
argv
)
try
{
using
namespace
DB
;
size_t
n
=
atoi
(
argv
[
1
]);
ColumnWithTypeAndName
descr1
;
auto
col1
=
std
::
make_shared
<
ColumnUInt8
>
();
descr1
.
type
=
std
::
make_shared
<
DataTypeUInt8
>
();
descr1
.
column
=
col1
;
descr1
.
name
=
"x"
;
col1
->
getData
().
resize
(
n
);
ColumnWithTypeAndName
descr2
;
auto
col2
=
std
::
make_shared
<
ColumnInt16
>
();
descr2
.
type
=
std
::
make_shared
<
DataTypeInt16
>
();
descr2
.
column
=
col2
;
descr2
.
name
=
"x"
;
Block
block
;
block
.
insert
(
descr1
);
block
.
insert
(
descr2
);
col2
->
getData
().
resize
(
n
);
for
(
size_t
i
=
0
;
i
<
n
;
++
i
)
{
col1
->
getData
()[
i
]
=
10
;
col2
->
getData
()[
i
]
=
3
;
}
FunctionDivideFloating
f
;
DataTypes
arg_types
;
arg_types
.
push_back
(
descr1
.
type
);
arg_types
.
push_back
(
descr2
.
type
);
ColumnNumbers
arg_nums
;
arg_nums
.
push_back
(
0
);
arg_nums
.
push_back
(
1
);
DataTypePtr
res_type
=
f
.
getReturnType
(
arg_types
);
ColumnWithTypeAndName
descr_res
;
descr_res
.
type
=
res_type
;
descr_res
.
name
=
"z"
;
{
Stopwatch
stopwatch
;
stopwatch
.
start
();
size_t
res_num
=
2
;
f
.
execute
(
block
,
arg_nums
,
res_num
);
stopwatch
.
stop
();
std
::
cout
<<
std
::
fixed
<<
std
::
setprecision
(
2
)
<<
"Elapsed "
<<
stopwatch
.
elapsedSeconds
()
<<
" sec."
<<
", "
<<
n
/
stopwatch
.
elapsedSeconds
()
<<
" rows/sec."
<<
std
::
endl
;
}
Float64
x
=
0
;
for
(
size_t
i
=
0
;
i
<
n
;
++
i
)
x
+=
get
<
Float64
>
((
*
block
.
getByPosition
(
2
).
column
)[
i
]);
std
::
cout
<<
x
<<
std
::
endl
;
return
0
;
}
catch
(
const
DB
::
Exception
&
e
)
{
std
::
cerr
<<
e
.
displayText
()
<<
std
::
endl
;
throw
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录