Add a flag that indicates that method can return an error

This commit is contained in:
Anthony Louis committed 2021-04-09 19:34:23 -03:00
1 parent f7d1c17d6a
commit 154a1d4196
1 file changed
+12 -10
+12 -10
View File
@@ -210,23 +210,25 @@ typedef std::unordered_map<const FunctionSignature*, const NativeFunction*, KeyH
// HashSHA128 functions that :
// - NULL handling is of type NULL_NEVER
// - 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) \
NativeFunction(#NAME, std::vector<std::string> ALIASES, \
DataTypeVector{TYPE()}, utf8(), kResultNullNever, \
ARROW_STRINGIFY(gdv_fn_sha128_from_##TYPE), \
NativeFunction::kNeedsContext)
#define HASH_SHA128_SAFE_NULL_NEVER(NAME, ALIASES, TYPE) \
NativeFunction(#NAME, std::vector<std::string> ALIASES, \
DataTypeVector{TYPE()}, utf8(), kResultNullNever, \
ARROW_STRINGIFY(gdv_fn_sha128_from_##TYPE), \
NativeFunction::kNeedsContext | NativeFunction::kCanReturnErrors)
// HashSHA256 functions that :
// - NULL handling is of type NULL_NEVER
// - 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) \
NativeFunction(#NAME, std::vector<std::string> ALIASES, \
DataTypeVector{TYPE()}, utf8(), kResultNullNever, \
ARROW_STRINGIFY(gdv_fn_sha256_from_##TYPE), \
NativeFunction::kNeedsContext)
#define HASH_SHA256_SAFE_NULL_NEVER(NAME, ALIASES, TYPE) \
NativeFunction(#NAME, std::vector<std::string> ALIASES, \
DataTypeVector{TYPE()}, utf8(), kResultNullNever, \
ARROW_STRINGIFY(gdv_fn_sha256_from_##TYPE), \
NativeFunction::kNeedsContext | NativeFunction::kCanReturnErrors)
// Iterate the inner macro over all numeric types
#define NUMERIC_TYPES(INNER, NAME, ALIASES) \