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

 ##########
 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:
   Yes. I have commented. keep HllHashFunctions only for backward 
compatibility, we will remove the HllHashFunctions class  when doris 0.12 
release.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to