File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_THINLTO=0 -DENABLE_TESTS=0 -DENABLE_CL
8282 ${CPU_FEATURES} \
8383 ${CMAKE_TOOLCHAIN_FILE} \
8484 -DENABLE_AVX512=0 -DENABLE_AVX512_VBMI=0 \
85+ -DCHDB_VERSION=${CHDB_VERSION} \
8586 ..
8687ninja
8788
Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ BUILD_DIR="$PROJ_DIR/buildlib" # build directory
55CHDB_DIR=" $PROJ_DIR /chdb" # chdb directory
66CHDB_PY_MOD=" _chdb"
77CHDB_PY_MODULE=${CHDB_PY_MOD} $( python3 -c " import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))" )
8+ pushd ${PROJ_DIR}
9+ CHDB_VERSION=$( python3 -c ' import setup; print(setup.get_latest_git_tag())' )
10+ popd
811
912# check current os type, and make ldd command
1013if [ " $( uname) " == " Darwin" ]; then
@@ -14,4 +17,4 @@ elif [ "$(uname)" == "Linux" ]; then
1417else
1518 echo " OS not supported"
1619 exit 1
17- fi
20+ fi
Original file line number Diff line number Diff line change 33#include < DataTypes/DataTypeString.h>
44#include < Functions/FunctionFactory.h>
55#include < Functions/FunctionConstantBase.h>
6+ #include < Common/FunctionDocumentation.h>
67
78namespace DB
89{
@@ -21,14 +22,15 @@ namespace
2122
2223REGISTER_FUNCTION (ChdbVersion)
2324{
24- factory.registerFunction <FunctionChdbVersion>(
25+ factory.registerFunction <FunctionChdbVersion>(FunctionDocumentation
2526 {
26- R"(
27+ . description = R"(
2728Returns the version of chDB. The result type is String.
28- )" ,
29- Documentation::Examples{{" chdb" , " SELECT chdb()" }},
30- Documentation::Categories{" String" }
31- }, FunctionFactory::CaseInsensitive);
29+ )" ,
30+ .examples {{" chdb" , " SELECT chdb();" , " " }},
31+ .categories {" String" }
32+ },
33+ FunctionFactory::CaseInsensitive);
3234}
3335}
3436#endif
You can’t perform that action at this time.
0 commit comments