diff --git a/README.md b/README.md index abb2724039..9ac4e4cc9d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ ClickHouse is an open-source column-oriented database management system that allows generating analytical data reports in real time. [Read more...](https://clickhouse.yandex/) + +[ClickHouse Meetup in Berlin on October 5, 2017](https://events.yandex.com/events/meetings/05-10-2017/) diff --git a/dbms/cmake/version.cmake b/dbms/cmake/version.cmake index 7486c7f884..6bcda994c8 100644 --- a/dbms/cmake/version.cmake +++ b/dbms/cmake/version.cmake @@ -1,6 +1,6 @@ # This strings autochanged from release_lib.sh: -set(VERSION_DESCRIBE v1.1.54288-testing) -set(VERSION_REVISION 54288) +set(VERSION_DESCRIBE v1.1.54290-testing) +set(VERSION_REVISION 54290) # end of autochange set (VERSION_MAJOR 1) diff --git a/dbms/src/Common/ProfileEvents.cpp b/dbms/src/Common/ProfileEvents.cpp index 70bbee64b7..1488d6c8c0 100644 --- a/dbms/src/Common/ProfileEvents.cpp +++ b/dbms/src/Common/ProfileEvents.cpp @@ -124,8 +124,9 @@ M(DictCacheLockReadNs) \ \ M(DistributedSyncInsertionTimeoutExceeded) \ - M(DataAfterMergeDiffersFromReplica) - + M(DataAfterMergeDiffersFromReplica) \ + M(PolygonsAddedToPool) \ + M(PolygonsInPoolAllocatedBytes) \ namespace ProfileEvents { diff --git a/dbms/src/Functions/FunctionsGeo.cpp b/dbms/src/Functions/FunctionsGeo.cpp index 2dae9288d7..9cddbb5688 100644 --- a/dbms/src/Functions/FunctionsGeo.cpp +++ b/dbms/src/Functions/FunctionsGeo.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include #include #include @@ -9,36 +11,79 @@ #include #include #include +#include +#include +#include +namespace ProfileEvents +{ + extern const Event PolygonsAddedToPool; + extern const Event PolygonsInPoolAllocatedBytes; +} namespace DB { + namespace ErrorCodes { extern const int TOO_LESS_ARGUMENTS_FOR_FUNCTION; extern const int BAD_ARGUMENTS; + extern const int ILLEGAL_TYPE_OF_ARGUMENT; } +namespace FunctionPointInPolygonDetail +{ -template -using PointInPolygonCrossing = boost::geometry::strategy::within::crossings_multiply; -template -using PointInPolygonWinding = boost::geometry::strategy::within::winding; -template -using PointInPolygonFranklin = boost::geometry::strategy::within::franklin; +template +ColumnPtr callPointInPolygonImplWithPool(const IColumn & x, const IColumn & y, Polygon & polygon) +{ + using Pool = ObjectPoolMap; + /// C++11 has thread-safe function-local statics on most modern compilers. + static Pool known_polygons; -template