diff --git a/.gitmodules b/.gitmodules index 93e63032bb3..2a53cb71dad 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,11 +13,11 @@ [submodule ".github/actions/ccache-action"] path = .github/actions/ccache-action url = https://github.com/hendrikmuhs/ccache-action -[submodule "be/src/apache-orc"] - path = be/src/apache-orc - url = https://github.com/apache/doris-thirdparty.git - branch = orc -[submodule "be/src/clucene"] - path = be/src/clucene +[submodule "contrib/clucene"] + path = contrib/clucene url = https://github.com/apache/doris-thirdparty.git branch = clucene +[submodule "contrib/apache-orc"] + path = contrib/apache-orc + url = https://github.com/apache/doris-thirdparty.git + branch = orc diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt index 136478d9e72..bc1300b3b4f 100644 --- a/be/CMakeLists.txt +++ b/be/CMakeLists.txt @@ -199,8 +199,10 @@ SET(LZ4_INCLUDE_DIR "$ENV{DORIS_THIRDPARTY}/installed/include/lz4") SET(ZLIB_HOME "$ENV{DORIS_THIRDPARTY}/installed") SET(ZSTD_HOME "$ENV{DORIS_THIRDPARTY}/installed") SET(ZSTD_INCLUDE_DIR "$ENV{DORIS_THIRDPARTY}/installed/include/zstd") +SET(CONTRIB_PATH "${PROJECT_SOURCE_DIR}/../contrib") -add_subdirectory(${SRC_DIR}/apache-orc EXCLUDE_FROM_ALL) +# Out of source build need to set the binary dir +add_subdirectory(${CONTRIB_PATH}/apache-orc ${PROJECT_BINARY_DIR}/apache-orc EXCLUDE_FROM_ALL) target_compile_options(orc PRIVATE -Wno-implicit-fallthrough -w) option(BUILD_STATIC_LIBRARIES "Build static libraries" ON) @@ -215,7 +217,8 @@ set(USE_STAT64 0) # disable clucene bthread supported. set(USE_BTHREAD OFF) -add_subdirectory(${SRC_DIR}/clucene EXCLUDE_FROM_ALL) +# Out of source build need to set the binary dir +add_subdirectory(${CONTRIB_PATH}/clucene ${PROJECT_BINARY_DIR}/clucene EXCLUDE_FROM_ALL) set(clucene_options -w -Wall) if (COMPILER_CLANG) @@ -230,7 +233,7 @@ target_compile_options(clucene-contribs-lib PRIVATE ${clucene_options}) target_compile_options(ic PRIVATE ${clucene_options}) install(DIRECTORY - ${SRC_DIR}/clucene/src/contribs-lib/CLucene/analysis/jieba/dict + ${CONTRIB_PATH}/clucene/src/contribs-lib/CLucene/analysis/jieba/dict DESTINATION ${OUTPUT_DIR}) install(DIRECTORY @@ -439,15 +442,15 @@ set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS}) # Set include dirs include_directories( - ${SRC_DIR}/apache-orc/c++/include - ${CMAKE_CURRENT_BINARY_DIR}/src/apache-orc/c++/include + ${CONTRIB_PATH}/apache-orc/c++/include + ${CMAKE_CURRENT_BINARY_DIR}/apache-orc/c++/include ) include_directories( - ${CMAKE_CURRENT_BINARY_DIR}/src/clucene/src/shared - ${SRC_DIR}/clucene/src/core - ${SRC_DIR}/clucene/src/shared - ${SRC_DIR}/clucene/src/contribs-lib + ${CMAKE_CURRENT_BINARY_DIR}/clucene/src/shared + ${CONTRIB_PATH}/clucene/src/core + ${CONTRIB_PATH}/clucene/src/shared + ${CONTRIB_PATH}/clucene/src/contribs-lib ) include_directories( diff --git a/be/test/CMakeLists.txt b/be/test/CMakeLists.txt index 7fed2c8a5e0..1d15b4d231a 100644 --- a/be/test/CMakeLists.txt +++ b/be/test/CMakeLists.txt @@ -59,43 +59,43 @@ message(STATUS "Disable the metrics collection for orc") add_compile_definitions(ENABLE_METRICS=0) list(APPEND UT_FILES - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/MemoryInputStream.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/MemoryOutputStream.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestAttributes.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestBlockBuffer.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestBufferedOutputStream.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestBloomFilter.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestByteRle.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestByteRLEEncoder.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestColumnPrinter.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestColumnReader.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestColumnStatistics.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestCompression.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestDecompression.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestDecimal.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestDictionaryEncoding.cc - #${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestDriver.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestInt128.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestMurmur3.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestPredicateLeaf.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestPredicatePushdown.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestReader.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestRleDecoder.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestRleEncoder.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestRLEV2Util.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestSargsApplier.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestSearchArgument.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestStripeIndexStatistics.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestTimestampStatistics.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestTimezone.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestType.cc - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/test/TestWriter.cc + ${CONTRIB_PATH}/apache-orc/c++/test/MemoryInputStream.cc + ${CONTRIB_PATH}/apache-orc/c++/test/MemoryOutputStream.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestAttributes.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestBlockBuffer.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestBufferedOutputStream.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestBloomFilter.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestByteRle.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestByteRLEEncoder.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestColumnPrinter.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestColumnReader.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestColumnStatistics.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestCompression.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestDecompression.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestDecimal.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestDictionaryEncoding.cc + #${CONTRIB_PATH}/apache-orc/c++/test/TestDriver.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestInt128.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestMurmur3.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestPredicateLeaf.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestPredicatePushdown.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestReader.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestRleDecoder.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestRleEncoder.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestRLEV2Util.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestSargsApplier.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestSearchArgument.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestStripeIndexStatistics.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestTimestampStatistics.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestTimezone.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestType.cc + ${CONTRIB_PATH}/apache-orc/c++/test/TestWriter.cc ) include_directories( - ${CMAKE_SOURCE_DIR}/src/apache-orc/c++/src - ${CMAKE_BINARY_DIR}/src/apache-orc/c++/src - ${CMAKE_BINARY_DIR}/src/apache-orc/c++/include + ${CMAKE_SOURCE_DIR}/../contrib/apache-orc/c++/src + ${CMAKE_BINARY_DIR}/apache-orc/c++/src + ${CMAKE_BINARY_DIR}/apache-orc/c++/include ) add_executable(doris_be_test ${UT_FILES}) diff --git a/build.sh b/build.sh index 320004d6238..056e5e7da8c 100755 --- a/build.sh +++ b/build.sh @@ -582,8 +582,8 @@ FE_MODULES="$( # Clean and build Backend if [[ "${BUILD_BE}" -eq 1 ]]; then - update_submodule "be/src/apache-orc" "apache-orc" "https://github.com/apache/doris-thirdparty/archive/refs/heads/orc.tar.gz" - update_submodule "be/src/clucene" "clucene" "https://github.com/apache/doris-thirdparty/archive/refs/heads/clucene.tar.gz" + update_submodule "contrib/apache-orc" "apache-orc" "https://github.com/apache/doris-thirdparty/archive/refs/heads/orc.tar.gz" + update_submodule "contrib/clucene" "clucene" "https://github.com/apache/doris-thirdparty/archive/refs/heads/clucene.tar.gz" if [[ -e "${DORIS_HOME}/gensrc/build/gen_cpp/version.h" ]]; then rm -f "${DORIS_HOME}/gensrc/build/gen_cpp/version.h" fi diff --git a/be/src/apache-orc b/contrib/apache-orc similarity index 100% rename from be/src/apache-orc rename to contrib/apache-orc diff --git a/be/src/clucene b/contrib/clucene similarity index 100% rename from be/src/clucene rename to contrib/clucene diff --git a/contrib/udf/CMakeLists.txt b/contrib/udf/CMakeLists.txt deleted file mode 100644 index 66fd4f32ccb..00000000000 --- a/contrib/udf/CMakeLists.txt +++ /dev/null @@ -1,58 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -cmake_minimum_required(VERSION 3.19.2) - -project(doris_udf) - -# set CMAKE_BUILD_TYPE -if (NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE RELEASE) -endif() - -string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE) -message(STATUS "Build type is ${CMAKE_BUILD_TYPE}") - -set(BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") -set(ENV{DORIS_HOME} "${BASE_DIR}/../../") -set(THIRDPARTY_DIR "$ENV{DORIS_THIRDPARTY}/installed/") -set(BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}") -set(SRC_DIR "${BASE_DIR}/src/") -set(OUTPUT_DIR "${BASE_DIR}/output") - -# Just for clang-tidy: -Wno-expansion-to-defined -Wno-deprecated-declaration -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -g -ggdb -std=c++11 -Wall -Werror -Wno-unused-variable -Wno-expansion-to-defined -Wno-deprecated-declarations -O3") - -if (CMAKE_GENERATOR STREQUAL "Ninja" AND NOT DISABLE_COLORED_BUILD) - # Turn on colored output. https://github.com/ninja-build/ninja/wiki/FAQ - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always") - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always") -endif () - -message(STATUS "Compiler Flags: ${CMAKE_CXX_FLAGS}") - -# Include udf -include_directories($ENV{DORIS_HOME}/output/udf/include) - -# Set all libraries -add_library(udf STATIC IMPORTED) -set_target_properties(udf PROPERTIES IMPORTED_LOCATION $ENV{DORIS_HOME}/output/udf/lib/libDorisUdf.a) - -# Add the subdirector of new UDF in here -add_subdirectory(${SRC_DIR}/udf_samples) - -install(DIRECTORY DESTINATION ${OUTPUT_DIR}) diff --git a/contrib/udf/build_udf.sh b/contrib/udf/build_udf.sh deleted file mode 100644 index af260522b52..00000000000 --- a/contrib/udf/build_udf.sh +++ /dev/null @@ -1,151 +0,0 @@ -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -############################################################## -# This script is used to compile UDF -# Usage: -# sh build-udf.sh build udf without clean. -# sh build-udf.sh --clean clean previous output and build. -# -############################################################## - -set -eo pipefail - -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" - -export UDF_HOME="${ROOT}" -DORIS_HOME="$( - cd ../.. - printf %s "${PWD}" -)" -export DORIS_HOME -echo "${DORIS_HOME}" - -. "${DORIS_HOME}/env.sh" - -PARALLEL="$(($(nproc) / 4 + 1))" - -# Check args -usage() { - echo " -Usage: $0 - Optional options: - --clean clean and build target - - Eg. - $0 build UDF without clean - $0 --clean clean and build UDF - " - exit 1 -} - -if ! OPTS="$(getopt \ - -n "$0" \ - -o '' \ - -o 'h' \ - -l 'clean' \ - -l 'help' \ - -- "$@")"; then - usage -fi - -eval set -- "${OPTS}" - -BUILD_UDF=1 -CLEAN=0 -HELP=0 -if [[ "$#" == 1 ]]; then - # default - CLEAN=0 -else - CLEAN=0 - while true; do - case "$1" in - --clean) - CLEAN=1 - shift - ;; - -h) - HELP=1 - shift - ;; - --help) - HELP=1 - shift - ;; - --) - shift - break - ;; - *) - echo "Internal error" - exit 1 - ;; - esac - done -fi - -if [[ "${HELP}" -eq 1 ]]; then - usage -fi - -echo "Get params: - CLEAN -- ${CLEAN} -" - -cd "${UDF_HOME}" -# Clean and build UDF -if [[ "${BUILD_UDF}" -eq 1 ]]; then - CMAKE_BUILD_TYPE="${BUILD_TYPE:-Release}" - echo "Build UDF: ${CMAKE_BUILD_TYPE}" - CMAKE_BUILD_DIR="${UDF_HOME}/build_${CMAKE_BUILD_TYPE}" - if [[ "${CLEAN}" -eq 1 ]]; then - rm -rf "${CMAKE_BUILD_DIR}" - rm -rf "${UDF_HOME}/output" - fi - mkdir -p "${CMAKE_BUILD_DIR}" - cd "${CMAKE_BUILD_DIR}" - "${CMAKE_CMD}" -G "${GENERATOR}" -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" ../ - "${BUILD_SYSTEM}" -j "${PARALLEL}" - "${BUILD_SYSTEM}" install - cd "${UDF_HOME}" -fi - -# Clean and prepare output dir -DORIS_OUTPUT="${DORIS_HOME}/output" -mkdir -p "${DORIS_OUTPUT}" - -#Copy UDF -if [[ "${BUILD_UDF}" -eq 1 ]]; then - install -d "${DORIS_OUTPUT}/contrib/udf/lib" - for dir in "${CMAKE_BUILD_DIR}/src"/*; do - dir="$(basename "${dir}")" - mkdir -p "${DORIS_OUTPUT}/contrib/udf/lib/${dir}" - cp -r -p "${CMAKE_BUILD_DIR}/src/${dir}"/*.so "${DORIS_OUTPUT}/contrib/udf/lib/${dir}"/ - done -fi - -echo "***************************************" -echo "Successfully build Doris UDF" -echo "***************************************" - -if [[ -n "${DORIS_POST_BUILD_HOOK}" ]]; then - eval "${DORIS_POST_BUILD_HOOK}" -fi - -exit 0 diff --git a/contrib/udf/src/udf_samples/CMakeLists.txt b/contrib/udf/src/udf_samples/CMakeLists.txt deleted file mode 100644 index 552abbba3b1..00000000000 --- a/contrib/udf/src/udf_samples/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# where to put generated libraries -set(LIBRARY_OUTPUT_PATH "${BUILD_DIR}/src/udf_samples") - -# where to put generated binaries -set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/src/udf_samples") - -add_library(udfsample SHARED udf_sample.cpp) -target_link_libraries(udfsample - -static-libstdc++ - -static-libgcc -) -add_library(udasample SHARED uda_sample.cpp) -target_link_libraries(udasample - -static-libstdc++ - -static-libgcc -) diff --git a/contrib/udf/src/udf_samples/uda_sample.cpp b/contrib/udf/src/udf_samples/uda_sample.cpp deleted file mode 100644 index 054ecc1f952..00000000000 --- a/contrib/udf/src/udf_samples/uda_sample.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -#include "udf_sample.h" - -namespace doris_udf { - -// --------------------------------------------------------------------------- -// This is a sample of implementing a COUNT aggregate function. -// --------------------------------------------------------------------------- -void CountInit(FunctionContext* context, BigIntVal* val) { - val->is_null = false; - val->val = 0; -} - -void CountUpdate(FunctionContext* context, const IntVal& input, BigIntVal* val) { - if (input.is_null) return; - ++val->val; -} - -void CountMerge(FunctionContext* context, const BigIntVal& src, BigIntVal* dst) { - dst->val += src.val; -} - -BigIntVal CountFinalize(FunctionContext* context, const BigIntVal& val) { - return val; -} - -} diff --git a/contrib/udf/src/udf_samples/uda_sample.h b/contrib/udf/src/udf_samples/uda_sample.h deleted file mode 100644 index 719195c20e2..00000000000 --- a/contrib/udf/src/udf_samples/uda_sample.h +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -#pragma once - -#include "udf.h" - -namespace doris_udf { - -/// This is an example of the COUNT aggregate function. -void CountInit(FunctionContext* context, BigIntVal* val); -void CountUpdate(FunctionContext* context, const IntVal& input, BigIntVal* val); -void CountMerge(FunctionContext* context, const BigIntVal& src, BigIntVal* dst); -BigIntVal CountFinalize(FunctionContext* context, const BigIntVal& val); - -} diff --git a/contrib/udf/src/udf_samples/udf_sample.cpp b/contrib/udf/src/udf_samples/udf_sample.cpp deleted file mode 100644 index 594d9843f3b..00000000000 --- a/contrib/udf/src/udf_samples/udf_sample.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -#include "udf_sample.h" - -namespace doris_udf { - -IntVal AddUdf(FunctionContext* context, const IntVal& arg1, const IntVal& arg2) { - if (arg1.is_null || arg2.is_null) { - return IntVal::null(); - } - return {arg1.val + arg2.val}; -} - -/// --- Prepare / Close Functions --- -/// --------------------------------- -void AddUdfPrepare(FunctionContext* context, FunctionContext::FunctionStateScope scope) {} -void AddUdfClose(FunctionContext* context, FunctionContext::FunctionStateScope scope) {} - -} diff --git a/contrib/udf/src/udf_samples/udf_sample.h b/contrib/udf/src/udf_samples/udf_sample.h deleted file mode 100644 index 6b4a2dc74fe..00000000000 --- a/contrib/udf/src/udf_samples/udf_sample.h +++ /dev/null @@ -1,37 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -#pragma once - -#include "udf.h" - -namespace doris_udf { - -IntVal AddUdf(FunctionContext* context, const IntVal& arg1, const IntVal& arg2); - -/// --- Prepare / Close Functions --- -/// --------------------------------- - -/// The UDF can optionally include a prepare function. The prepare function is called -/// before any calls to the UDF to evaluate values. -void AddUdfPrepare(FunctionContext* context, FunctionContext::FunctionStateScope scope); - -/// The UDF can also optionally include a close function. The close function is called -/// after all calls to the UDF have completed. -void AddUdfClose(FunctionContext* context, FunctionContext::FunctionStateScope scope); - -} diff --git a/gensrc/thrift/Makefile b/gensrc/thrift/Makefile index bc30124bd81..689f4acb6d3 100644 --- a/gensrc/thrift/Makefile +++ b/gensrc/thrift/Makefile @@ -31,7 +31,7 @@ all: ${GEN_OBJECTS} ${OBJECTS} $(shell mkdir -p ${BUILD_DIR}/gen_java) -THRIFT_CPP_ARGS = -I ${CURDIR} -I ${BUILD_DIR}/thrift/ --gen cpp:moveable_types -out ${BUILD_DIR}/gen_cpp --allow-64bit-consts -strict +THRIFT_CPP_ARGS = -I ${CURDIR} -I ${BUILD_DIR}/thrift/ --gen cpp:moveable_types,no_skeleton -out ${BUILD_DIR}/gen_cpp --allow-64bit-consts -strict THRIFT_JAVA_ARGS = -I ${CURDIR} -I ${BUILD_DIR}/thrift/ --gen java:fullcamel -out ${BUILD_DIR}/gen_java --allow-64bit-consts -strict ${BUILD_DIR}/gen_cpp: diff --git a/run-be-ut.sh b/run-be-ut.sh index e48972aa5ae..8d39752360c 100755 --- a/run-be-ut.sh +++ b/run-be-ut.sh @@ -164,8 +164,8 @@ update_submodule() { fi } -update_submodule "be/src/apache-orc" "apache-orc" "https://github.com/apache/doris-thirdparty/archive/refs/heads/orc.tar.gz" -update_submodule "be/src/clucene" "clucene" "https://github.com/apache/doris-thirdparty/archive/refs/heads/clucene.tar.gz" +update_submodule "contrib/apache-orc" "apache-orc" "https://github.com/apache/doris-thirdparty/archive/refs/heads/orc.tar.gz" +update_submodule "contrib/clucene" "clucene" "https://github.com/apache/doris-thirdparty/archive/refs/heads/clucene.tar.gz" if [[ "_${DENABLE_CLANG_COVERAGE}" == "_ON" ]]; then echo "export DORIS_TOOLCHAIN=clang" >>custom_env.sh