Commenting out unnecessary parameters

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

No files matched your search

+4 -4
View File
@@ -224,28 +224,28 @@ SHA_VAR_LEN_PARAMS(SHA1_HASH_FUNCTION_BUF)
// Add functions for decimal128
GANDIVA_EXPORT
const char* gdv_fn_sha256_decimal128(int64_t context, int64_t x_high, uint64_t x_low,
int32_t x_precision, int32_t x_scale,
int32_t /*x_precision*/, int32_t /*x_scale*/,
gdv_boolean x_isvalid, int32_t *out_length) {
if (!x_isvalid) {
return gandiva::HashUtils::HashUsingSha256(context, NULLPTR,
0, out_length);
}
const auto &decimal_128 = gandiva::BasicDecimal128(x_high, x_low);
const gandiva::BasicDecimal128 decimal_128(x_high, x_low);
return gandiva::HashUtils::HashUsingSha256(context, decimal_128.ToBytes().data(),
16, out_length);
}
GANDIVA_EXPORT
const char* gdv_fn_sha1_decimal128(int64_t context, int64_t x_high, uint64_t x_low,
int32_t x_precision, int32_t x_scale,
int32_t /*x_precision*/, int32_t /*x_scale*/,
gdv_boolean x_isvalid, int32_t *out_length) {
if (!x_isvalid) {
return gandiva::HashUtils::HashUsingSha1(context, NULLPTR,
0, out_length);
}
const auto &decimal_128 = gandiva::BasicDecimal128(x_high, x_low);
const gandiva::BasicDecimal128 decimal_128(x_high, x_low);
return gandiva::HashUtils::HashUsingSha1(context, decimal_128.ToBytes().data(),
16, out_length);
}
+2 -2
View File
@@ -58,8 +58,8 @@ namespace gandiva {
if (EVP_DigestInit_ex(md_ctx, hash_type, nullptr) != evp_success_status ||
EVP_DigestUpdate(md_ctx, message, message_length) != evp_success_status) {
HashUtils::ErrorMessage(context, "Could not obtain the hash "
"for the defined value.");
gdv_fn_context_set_error_msg(context,
"Could not obtain the hash for the defined value.");
EVP_MD_CTX_free(md_ctx);
*out_length = 0;