imay commented on a change in pull request #1756: Encapsulate HLL logic
URL: https://github.com/apache/incubator-doris/pull/1756#discussion_r322049060
 
 

 ##########
 File path: be/src/exprs/hll_hash_function.cpp
 ##########
 @@ -15,62 +15,34 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include "exprs/hll_hash_function.h"
-
-#include "exprs/expr.h"
-#include "runtime/tuple_row.h"
-#include "runtime/datetime_value.h"
-#include "util/path_builder.h"
-#include "runtime/string_value.hpp"
 #include "exprs/aggregate_functions.h"
-#include "exprs/cast_functions.h"
-#include "olap/olap_common.h"
-#include "olap/utils.h"
+#include "exprs/hll_hash_function.h"
 
 namespace doris {
 
 using doris_udf::BigIntVal;
 using doris_udf::StringVal;
 
-const int HllHashFunctions::HLL_INIT_EXPLICT_SET_SIZE = 10;
-const int HllHashFunctions::HLL_EMPTY_SET_SIZE = 1;
-
 void HllHashFunctions::init() {
 }
 
-StringVal HllHashFunctions::create_string_result(doris_udf::FunctionContext* 
ctx, 
-                                                     const StringVal& val, 
const bool is_null) {
-    StringVal result;
-    if (is_null) {
-        // HLL_DATA_EMPTY
-        char buf[HLL_EMPTY_SET_SIZE];
-        buf[0] = HLL_DATA_EMPTY;
-        result = AnyValUtil::from_buffer_temp(ctx, buf, sizeof(buf));
+StringVal HllHashFunctions::hll_hash(FunctionContext* ctx, const StringVal& 
input) {
 
 Review comment:
   we have two implementation? 
[here](https://github.com/apache/incubator-doris/pull/1756/files#diff-964de1ed6e9fc1eacc99c8d4f1a680aaR31)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org
For additional commands, e-mail: dev-h...@doris.apache.org

Reply via email to