mcgrawia opened a new issue, #71:
URL: https://github.com/apache/datasketches-postgresql/issues/71

   Hi team,
   
   Thanks for the great extension. I'm attempting to use datasketches-python to 
pre-aggregate data and then insert the sketches into Postgres. I was curious, 
is there a recommended way to insert the serialized sketches? I noticed I can 
insert them as base64 encoded strings, but it doesn't appear that there is any 
validation on the contents of the string on INSERT, so if I accidentally insert 
a bad string, say "", I end up with bad data in the table that breaks queries.
   
   
   Here's an example of inserting a bad sketch string. Is there function or 
better way to insert that would prevent the bad data from entering the table? 
Thanks
   
   ```sql
   create table kll_sketch_test(sketch kll_float_sketch);
   insert into kll_sketch_test(sketch) VALUES ('');
   select kll_float_sketch_get_n(sketch) from kll_sketch_test;  -- this query 
breaks because of the bad sketch value
   ```
   
   I noticed there is a `kll_float_sketch_in()` function, but it doesn't seem 
to help:
   ```sql
   insert into kll_sketch_test(sketch) VALUES (kll_float_sketch_in(''));
   ```
   
   Thanks for any help or pointers you can provide.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to