Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
e78fc310
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,发现更多精彩内容 >>
提交
e78fc310
编写于
2月 16, 2021
作者:
N
Nikita Mikhailov
提交者:
Nikita Mikhaylov
3月 11, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
better ubsan testing
上级
05cf1b5b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
19 addition
and
2 deletion
+19
-2
base/common/defines.h
base/common/defines.h
+10
-0
src/Functions/geometryConverters.h
src/Functions/geometryConverters.h
+5
-0
src/Functions/pointInPolygon.cpp
src/Functions/pointInPolygon.cpp
+2
-2
tests/queries/0_stateless/01305_polygons_union.sql
tests/queries/0_stateless/01305_polygons_union.sql
+2
-0
未找到文件。
base/common/defines.h
浏览文件 @
e78fc310
...
...
@@ -76,6 +76,16 @@
# endif
#endif
#if !defined(UNDEFINED_BEHAVIOR_SANITIZER)
# if defined(__has_feature)
# if __has_feature(undefined_behavior_sanitizer)
# define UNDEFINED_BEHAVIOR_SANITIZER 1
# endif
# elif defined(__UNDEFINED_BEHAVIOR_SANITIZER__)
# define UNDEFINED_BEHAVIOR_SANITIZER 1
# endif
#endif
#if defined(ADDRESS_SANITIZER)
# define BOOST_USE_ASAN 1
# define BOOST_USE_UCONTEXT 1
...
...
src/Functions/geometryConverters.h
浏览文件 @
e78fc310
...
...
@@ -11,6 +11,7 @@
#include <Columns/ColumnsNumber.h>
#include <Columns/ColumnArray.h>
#include <Columns/ColumnTuple.h>
#include <Common/NaNUtils.h>
#include <DataTypes/DataTypeArray.h>
#include <DataTypes/IDataType.h>
#include <IO/WriteHelpers.h>
...
...
@@ -24,6 +25,7 @@ namespace DB
namespace
ErrorCodes
{
extern
const
int
BAD_ARGUMENTS
;
extern
const
int
ILLEGAL_TYPE_OF_ARGUMENT
;
}
namespace
bg
=
boost
::
geometry
;
...
...
@@ -111,6 +113,9 @@ public:
#ifndef NDEBUG
assert
(
i
<
size
);
#endif
if
(
isNaN
(
first
[
i
])
||
isNaN
(
second
[
i
]))
throw
Exception
(
"Point's component must not be NaN"
,
ErrorCodes
::
ILLEGAL_TYPE_OF_ARGUMENT
);
boost
::
geometry
::
set
<
0
>
(
container
,
first
[
i
]);
boost
::
geometry
::
set
<
1
>
(
container
,
second
[
i
]);
}
...
...
src/Functions/pointInPolygon.cpp
浏览文件 @
e78fc310
...
...
@@ -540,7 +540,7 @@ private:
}
}
void
parseConstPolygon
(
const
ColumnsWithTypeAndName
&
arguments
,
Polygon
&
out_polygon
)
const
void
NO_SANITIZE_UNDEFINED
parseConstPolygon
(
const
ColumnsWithTypeAndName
&
arguments
,
Polygon
&
out_polygon
)
const
{
if
(
arguments
.
size
()
==
2
)
parseConstPolygonFromSingleColumn
(
arguments
,
out_polygon
);
...
...
@@ -550,7 +550,7 @@ private:
/// Fix orientation and close rings. It's required for subsequent processing.
boost
::
geometry
::
correct
(
out_polygon
);
#if !defined(__clang_analyzer__) /// It does not like boost.
#if !defined(__clang_analyzer__)
&& !defined(UNDEFINED_BEHAVIOR_SANITIZER)
/// It does not like boost.
if
(
validate
)
{
std
::
string
failure_message
;
...
...
tests/queries/0_stateless/01305_polygons_union.sql
浏览文件 @
e78fc310
select
polygonsUnionCartesian
([[[(
0
.,
0
.),(
0
.,
3
.),(
1
.,
2
.
9
),(
2
.,
2
.
6
),(
2
.
6
,
2
.),(
2
.
9
,
1
),(
3
.,
0
.),(
0
.,
0
.)]]],
[[[(
1
.,
1
.),(
1
.,
4
.),(
4
.,
4
.),(
4
.,
1
.),(
1
.,
1
.)]]]);
SELECT
polygonsUnionCartesian
([[[(
2
.,
100
.
0000991821289
),
(
0
.,
3
.),
(
1
.,
2
.
9
),
(
2
.,
2
.
6
),
(
2
.
6
,
2
.),
(
2
.
9
,
1
),
(
3
.,
0
.),
(
100
.
0000991821289
,
2
.)]]],
[[[(
1
.,
1
.),
(
1000
.
0001220703125
,
nan
),
(
4
.,
4
.),
(
4
.,
1
.),
(
1
.,
1
.)]]]);
-- { serverError 43 }
select
polygonsUnionGeographic
([[[(
4
.
3613577
,
50
.
8651821
),
(
4
.
349556
,
50
.
8535879
),
(
4
.
3602419
,
50
.
8435626
),
(
4
.
3830299
,
50
.
8428851
),
(
4
.
3904543
,
50
.
8564867
),
(
4
.
3613148
,
50
.
8651279
)]]],
[[[(
4
.
346693
,
50
.
858306
),
(
4
.
367945
,
50
.
852455
),
(
4
.
366227
,
50
.
840809
),
(
4
.
344961
,
50
.
833264
),
(
4
.
338074
,
50
.
848677
),
(
4
.
346693
,
50
.
858306
)]]]);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录