Refactor names for sha functions macros

This commit is contained in:
Anthony Louis committed 2021-04-09 19:34:23 -03:00
1 parent fbc08d9930
commit a150c7056a
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -213,7 +213,7 @@ typedef std::unordered_map<const FunctionSignature*, const NativeFunction*, KeyH
// - can return errors
//
// The function name includes the base name & input type name. gdv_fn_sha128_from_float64
#define HASH_SHA128_SAFE_NULL_NEVER(NAME, ALIASES, TYPE) \
#define HASH_SHA128_NULL_NEVER(NAME, ALIASES, TYPE) \
NativeFunction(#NAME, std::vector<std::string> ALIASES, \
DataTypeVector{TYPE()}, utf8(), kResultNullNever, \
ARROW_STRINGIFY(gdv_fn_sha128_from_##TYPE), \
@@ -224,7 +224,7 @@ typedef std::unordered_map<const FunctionSignature*, const NativeFunction*, KeyH
// - can return errors
//
// The function name includes the base name & input type name. gdv_fn_sha256_from_float64
#define HASH_SHA256_SAFE_NULL_NEVER(NAME, ALIASES, TYPE) \
#define HASH_SHA256_NULL_NEVER(NAME, ALIASES, TYPE) \
NativeFunction(#NAME, std::vector<std::string> ALIASES, \
DataTypeVector{TYPE()}, utf8(), kResultNullNever, \
ARROW_STRINGIFY(gdv_fn_sha256_from_##TYPE), \
+2 -2
View File
@@ -33,10 +33,10 @@ namespace gandiva {
NUMERIC_BOOL_DATE_VAR_LEN_TYPES(HASH64_SEED_SAFE_NULL_NEVER, name, ALIASES)
#define HASH_SHA128_SAFE_NULL_NEVER_FN(name, ALIASES) \
NUMERIC_BOOL_DATE_VAR_LEN_TYPES(HASH_SHA128_SAFE_NULL_NEVER, name, ALIASES)
NUMERIC_BOOL_DATE_VAR_LEN_TYPES(HASH_SHA128_NULL_NEVER, name, ALIASES)
#define HASH_SHA256_SAFE_NULL_NEVER_FN(name, ALIASES) \
NUMERIC_BOOL_DATE_VAR_LEN_TYPES(HASH_SHA256_SAFE_NULL_NEVER, name, ALIASES)
NUMERIC_BOOL_DATE_VAR_LEN_TYPES(HASH_SHA256_NULL_NEVER, name, ALIASES)
std::vector<NativeFunction> GetHashFunctionRegistry() {
static std::vector<NativeFunction> hash_fn_registry_ = {