Merge pull request #16671 from ClickHouse/inconsistent-h3

Fix inconsistent code around H3
This commit is contained in:
alexey-milovidov 2020-11-04 23:39:53 +03:00 committed by GitHub
commit 6575a92804
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 104 additions and 18 deletions

View File

@ -6,24 +6,6 @@ add_headers_and_sources(clickhouse_functions .)
list(REMOVE_ITEM clickhouse_functions_sources IFunctionImpl.cpp FunctionFactory.cpp FunctionHelpers.cpp)
list(REMOVE_ITEM clickhouse_functions_headers IFunctionImpl.h FunctionFactory.h FunctionHelpers.h)
if (NOT USE_H3)
list (REMOVE_ITEM clickhouse_functions_sources
geoToH3.cpp
h3EdgeAngle.cpp
h3EdgeLengthM.cpp
h3GetBaseCell.cpp
h3GetResolution.cpp
h3HexAreaM2.cpp
h3IndexesAreNeighbors.cpp
h3IsValid.cpp
h3kRing.cpp
h3ToChildren.cpp
h3ToParent.cpp
h3ToString.cpp
stringToH3.cpp
)
endif ()
add_library(clickhouse_functions ${clickhouse_functions_sources})
target_link_libraries(clickhouse_functions

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_functions.h"
#endif
#if USE_H3
#include <array>
#include <math.h>
#include <Columns/ColumnsNumber.h>
@ -94,3 +100,5 @@ void registerFunctionGeoToH3(FunctionFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_functions.h"
#endif
#if USE_H3
#include <Columns/ColumnsNumber.h>
#include <DataTypes/DataTypesNumber.h>
#include <Functions/FunctionFactory.h>
@ -77,3 +83,5 @@ void registerFunctionH3EdgeAngle(FunctionFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_functions.h"
#endif
#if USE_H3
#include <Columns/ColumnsNumber.h>
#include <DataTypes/DataTypesNumber.h>
#include <Functions/FunctionFactory.h>
@ -81,3 +87,5 @@ void registerFunctionH3EdgeLengthM(FunctionFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_functions.h"
#endif
#if USE_H3
#include <Columns/ColumnsNumber.h>
#include <DataTypes/DataTypesNumber.h>
#include <Functions/FunctionFactory.h>
@ -70,3 +76,5 @@ void registerFunctionH3GetBaseCell(FunctionFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_functions.h"
#endif
#if USE_H3
#include <Columns/ColumnsNumber.h>
#include <DataTypes/DataTypesNumber.h>
#include <Functions/FunctionFactory.h>
@ -70,3 +76,5 @@ void registerFunctionH3GetResolution(FunctionFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_functions.h"
#endif
#if USE_H3
#include <Columns/ColumnsNumber.h>
#include <DataTypes/DataTypesNumber.h>
#include <Functions/FunctionFactory.h>
@ -76,3 +82,5 @@ void registerFunctionH3HexAreaM2(FunctionFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_functions.h"
#endif
#if USE_H3
#include <Columns/ColumnsNumber.h>
#include <DataTypes/DataTypesNumber.h>
#include <Functions/FunctionFactory.h>
@ -78,3 +84,5 @@ void registerFunctionH3IndexesAreNeighbors(FunctionFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_functions.h"
#endif
#if USE_H3
#include <Columns/ColumnsNumber.h>
#include <DataTypes/DataTypesNumber.h>
#include <Functions/FunctionFactory.h>
@ -70,3 +76,5 @@ void registerFunctionH3IsValid(FunctionFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_functions.h"
#endif
#if USE_H3
#include <Columns/ColumnArray.h>
#include <Columns/ColumnsNumber.h>
#include <DataTypes/DataTypeArray.h>
@ -111,3 +117,5 @@ void registerFunctionH3ToChildren(FunctionFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_functions.h"
#endif
#if USE_H3
#include <Columns/ColumnsNumber.h>
#include <DataTypes/DataTypesNumber.h>
#include <Functions/FunctionFactory.h>
@ -85,3 +91,5 @@ void registerFunctionH3ToParent(FunctionFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_functions.h"
#endif
#if USE_H3
#include <Columns/ColumnString.h>
#include <DataTypes/DataTypeString.h>
#include <Functions/FunctionFactory.h>
@ -86,3 +92,5 @@ void registerFunctionH3ToString(FunctionFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_functions.h"
#endif
#if USE_H3
#include <vector>
#include <Columns/ColumnArray.h>
#include <Columns/ColumnsNumber.h>
@ -108,3 +114,5 @@ void registerFunctionH3KRing(FunctionFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_functions.h"
#endif
#if USE_H3
#include <Columns/ColumnString.h>
#include <DataTypes/DataTypeString.h>
#include <DataTypes/DataTypesNumber.h>
@ -101,3 +107,5 @@ void registerFunctionStringToH3(FunctionFactory & factory)
}
}
#endif