This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new d16287eb1 [doc] Update hll_sketch and theta_sketch in aggregation.md 
(#4518)
d16287eb1 is described below

commit d16287eb16f45f0de0eba243cf9a5517d54d88a9
Author: wangkang <[email protected]>
AuthorDate: Wed Nov 13 15:42:20 2024 +0800

    [doc] Update hll_sketch and theta_sketch in aggregation.md (#4518)
---
 docs/content/primary-key-table/merge-engine/aggregation.md | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/docs/content/primary-key-table/merge-engine/aggregation.md 
b/docs/content/primary-key-table/merge-engine/aggregation.md
index fa667ed35..0cc6507f2 100644
--- a/docs/content/primary-key-table/merge-engine/aggregation.md
+++ b/docs/content/primary-key-table/merge-engine/aggregation.md
@@ -247,16 +247,17 @@ An example:
     uv VARBINARY
   ) WITH (
     'merge-engine' = 'aggregation',
-    'fields.f0.aggregate-function' = 'hll_sketch'
+    'fields.uv.aggregate-function' = 'hll_sketch'
   );
   
   -- Register the following class as a Flink function with the name 
"HLL_SKETCH" 
+  -- for example: create TEMPORARY function HLL_SKETCH as  'HllSketchFunction';
   -- which is used to transform input to sketch bytes array:
   --
   -- public static class HllSketchFunction extends ScalarFunction {
   --   public byte[] eval(String user_id) {
   --     HllSketch hllSketch = new HllSketch();
-  --     hllSketch.update(id);
+  --     hllSketch.update(user_id);
   --     return hllSketch.toCompactByteArray();
   --   }
   -- }
@@ -264,6 +265,7 @@ An example:
   INSERT INTO UV_AGG SELECT id, HLL_SKETCH(user_id) FROM VISITS;
 
   -- Register the following class as a Flink function with the name 
"HLL_SKETCH_COUNT"
+  -- for example: create TEMPORARY function HLL_SKETCH_COUNT as  
'HllSketchCountFunction';
   -- which is used to get cardinality from sketch bytes array:
   -- 
   -- public static class HllSketchCountFunction extends ScalarFunction { 
@@ -307,10 +309,11 @@ An example:
     uv VARBINARY
   ) WITH (
     'merge-engine' = 'aggregation',
-    'fields.f0.aggregate-function' = 'theta_sketch'
+    'fields.uv.aggregate-function' = 'theta_sketch'
   );
   
   -- Register the following class as a Flink function with the name 
"THETA_SKETCH" 
+  -- for example: create TEMPORARY function THETA_SKETCH as  
'ThetaSketchFunction';
   -- which is used to transform input to sketch bytes array:
   --
   -- public static class ThetaSketchFunction extends ScalarFunction {
@@ -324,6 +327,7 @@ An example:
   INSERT INTO UV_AGG SELECT id, THETA_SKETCH(user_id) FROM VISITS;
 
   -- Register the following class as a Flink function with the name 
"THETA_SKETCH_COUNT"
+  -- for example: create TEMPORARY function THETA_SKETCH_COUNT as  
'ThetaSketchCountFunction';
   -- which is used to get cardinality from sketch bytes array:
   -- 
   -- public static class ThetaSketchCountFunction extends ScalarFunction { 

Reply via email to