Skip to content

Commit

Permalink
Change SQL built-in function's symbol (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenhao7253886 authored and morningman committed Nov 2, 2018
1 parent 847d29e commit 312dfd1
Show file tree
Hide file tree
Showing 9 changed files with 492 additions and 492 deletions.
2 changes: 1 addition & 1 deletion fe/src/main/java/org/apache/doris/analysis/CastExpr.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static void initBuiltins(FunctionSet functionSet) {
if (toType.getPrimitiveType() == PrimitiveType.DATE) {
typeName = "date_val";
}
String beSymbol = "palo::" + beClass + "::cast_to_"
String beSymbol = "doris::" + beClass + "::cast_to_"
+ typeName;
functionSet.addBuiltin(ScalarFunction.createBuiltin(getFnName(toType),
Lists.newArrayList(fromType), false, toType, beSymbol, null, null, true));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public static void initBuiltins(FunctionSet functionSet) {
if (t.isNull()) continue;
String isNullSymbol;
if (t == Type.BOOLEAN) {
isNullSymbol = "_ZN4palo15IsNullPredicate7is_nullIN8palo_udf10BooleanValE" +
isNullSymbol = "_ZN5doris15IsNullPredicate7is_nullIN9doris_udf10BooleanValE" +
"EES3_PNS2_15FunctionContextERKT_";
} else {
String udfType = Function.getUdfType(t.getPrimitiveType());
isNullSymbol = "_ZN4palo15IsNullPredicate7is_nullIN8palo_udf" +
isNullSymbol = "_ZN5doris15IsNullPredicate7is_nullIN9doris_udf" +
udfType.length() + udfType +
"EEENS2_10BooleanValEPNS2_15FunctionContextERKT_";
}
Expand Down
12 changes: 6 additions & 6 deletions fe/src/main/java/org/apache/doris/analysis/LikePredicate.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ public static void initBuiltins(FunctionSet functionSet) {
functionSet.addBuiltin(ScalarFunction.createBuiltin(
Operator.LIKE.name(), Lists.<Type>newArrayList(Type.VARCHAR, Type.VARCHAR),
false, Type.BOOLEAN,
"_ZN4palo13LikePredicate4likeEPN8palo_udf15FunctionContextERKNS1_9StringValES6_",
"_ZN4palo13LikePredicate12like_prepareEPN8palo_udf15FunctionContextENS2_18FunctionStateScopeE",
"_ZN4palo13LikePredicate10like_closeEPN8palo_udf15FunctionContextENS2_18FunctionStateScopeE", true));
"_ZN5doris13LikePredicate4likeEPN9doris_udf15FunctionContextERKNS1_9StringValES6_",
"_ZN5doris13LikePredicate12like_prepareEPN9doris_udf15FunctionContextENS2_18FunctionStateScopeE",
"_ZN5doris13LikePredicate10like_closeEPN9doris_udf15FunctionContextENS2_18FunctionStateScopeE", true));
functionSet.addBuiltin(ScalarFunction.createBuiltin(
Operator.REGEXP.name(), Lists.<Type>newArrayList(Type.VARCHAR, Type.VARCHAR),
false, Type.BOOLEAN,
"_ZN4palo13LikePredicate5regexEPN8palo_udf15FunctionContextERKNS1_9StringValES6_",
"_ZN4palo13LikePredicate13regex_prepareEPN8palo_udf15FunctionContextENS2_18FunctionStateScopeE",
"_ZN4palo13LikePredicate11regex_closeEPN8palo_udf15FunctionContextENS2_18FunctionStateScopeE", true));
"_ZN5doris13LikePredicate5regexEPN9doris_udf15FunctionContextERKNS1_9StringValES6_",
"_ZN5doris13LikePredicate13regex_prepareEPN9doris_udf15FunctionContextENS2_18FunctionStateScopeE",
"_ZN5doris13LikePredicate11regex_closeEPN9doris_udf15FunctionContextENS2_18FunctionStateScopeE", true));
}

private final Operator op;
Expand Down
580 changes: 290 additions & 290 deletions fe/src/main/java/org/apache/doris/catalog/FunctionSet.java

Large diffs are not rendered by default.

366 changes: 183 additions & 183 deletions gensrc/script/doris_builtins_functions.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gensrc/script/gen_build_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ cat >"${GEN_CPP_DIR}/version.h" <<EOF
#ifndef PALO_GEN_CPP_VERSION_H
#define PALO_GEN_CPP_VERSION_H
namespace palo {
namespace doris {
#define PALO_BUILD_VERSION "${build_version}"
#define PALO_BUILD_HASH "${build_hash}"
Expand Down
8 changes: 4 additions & 4 deletions gensrc/script/gen_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,18 +584,18 @@
using namespace boost;\n\
using namespace std;\n\
\n\
namespace palo { \n\
namespace doris { \n\
\n'

cc_epilogue = '\
}\n'

h_preamble = '\
\n\
#ifndef BDG_PALO_OPCODE_FUNCTIONS_H\n\
#define BDG_PALO_OPCODE_FUNCTIONS_H\n\
#ifndef DORIS_OPCODE_FUNCTIONS_H\n\
#define DORIS_OPCODE_FUNCTIONS_H\n\
\n\
namespace palo {\n\
namespace doris {\n\
class Expr;\n\
class OpcodeRegistry;\n\
class TupleRow;\n\
Expand Down
2 changes: 1 addition & 1 deletion gensrc/script/gen_opcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
using namespace boost::posix_time;\n\
using namespace boost::gregorian;\n\
\n\
namespace palo {\n\
namespace doris {\n\
\n\
void OpcodeRegistry::init() {\n'

Expand Down
8 changes: 4 additions & 4 deletions gensrc/script/gen_vector_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
using namespace boost;\n\
using namespace std;\n\
\n\
namespace palo { \n\
namespace doris { \n\
\n'

cc_epilogue = '\
Expand All @@ -407,10 +407,10 @@
// This is a generated file, DO NOT EDIT IT.\n\
// To add new functions, see impala/common/function-registry/gen_vector_functions.py\n\
\n\
#ifndef BDG_PALO_OPCODE_VECTOR_FUNCTIONS_H\n\
#define BDG_PALO_OPCODE_VECTOR_FUNCTIONS_H\n\
#ifndef DORIS_OPCODE_VECTOR_FUNCTIONS_H\n\
#define DORIS_OPCODE_VECTOR_FUNCTIONS_H\n\
\n\
namespace palo {\n\
namespace doris {\n\
class Expr;\n\
class OpcodeRegistry;\n\
class VectorizedRowBatch;\n\
Expand Down

0 comments on commit 312dfd1

Please sign in to comment.