mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
Add stubs for the method hash_using_SHA128
This commit is contained in:
1 parent
9355de12ed
commit
9b617c4210
4 files changed
+22
No files matched your search
@@ -135,6 +135,18 @@ const char * gdv_fn_hash_sha256_from_string(int64_t context, const char* value,
|
||||
return gandiva::HashUtils::hash_using_SHA256(context, value, value_length);
|
||||
}
|
||||
|
||||
GANDIVA_EXPORT
|
||||
const char * gdv_fn_sha128_from_numeric(int64_t context, double value){
|
||||
uint64_t value_as_long = gandiva::HashUtils::double_to_long(value);
|
||||
|
||||
return gandiva::HashUtils::hash_using_SHA128(context, &value_as_long, sizeof(value_as_long));
|
||||
}
|
||||
|
||||
GANDIVA_EXPORT
|
||||
const char * gdv_fn_hash_sha128_from_string(int64_t context, const char* value, uint64_t value_length){
|
||||
return gandiva::HashUtils::hash_using_SHA128(context, value, value_length);
|
||||
}
|
||||
|
||||
int32_t gdv_fn_dec_from_string(int64_t context, const char* in, int32_t in_length,
|
||||
int32_t* precision_from_str, int32_t* scale_from_str,
|
||||
int64_t* dec_high_from_str, uint64_t* dec_low_from_str) {
|
||||
|
||||
@@ -52,6 +52,10 @@ const char * gdv_fn_sha256_from_numeric(int64_t context, double value);
|
||||
|
||||
const char * gdv_fn_hash_sha256_from_string(int64_t context, const char* value, uint64_t value_length);
|
||||
|
||||
const char * gdv_fn_sha128_from_numeric(int64_t context, double value);
|
||||
|
||||
const char * gdv_fn_hash_sha128_from_string(int64_t context, const char* value, uint64_t value_length);
|
||||
|
||||
int32_t gdv_fn_dec_from_string(int64_t context, const char* in, int32_t in_length,
|
||||
int32_t* precision_from_str, int32_t* scale_from_str,
|
||||
int64_t* dec_high_from_str, uint64_t* dec_low_from_str);
|
||||
|
||||
@@ -46,6 +46,11 @@ namespace gandiva {
|
||||
|
||||
return result_buffer;
|
||||
}
|
||||
const char * HashUtils::hash_using_SHA128(int64_t context, const void *message, size_t message_length) {
|
||||
char* result_buffer = new char[65];
|
||||
return result_buffer;
|
||||
}
|
||||
|
||||
|
||||
uint64_t HashUtils::double_to_long(double value) {
|
||||
uint64_t result;
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace gandiva {
|
||||
class GANDIVA_EXPORT HashUtils {
|
||||
public:
|
||||
static const char * hash_using_SHA256(int64_t context, const void *message, size_t message_length);
|
||||
static const char *hash_using_SHA128(int64_t context, const void *message, size_t message_length);
|
||||
|
||||
static uint64_t double_to_long(double value);
|
||||
private:
|
||||
|
||||
Reference in new issue
Block a user