pg_diffix icon indicating copy to clipboard operation
pg_diffix copied to clipboard

bucket_seed should be a member of Bucket

Open edongashi opened this issue 3 years ago • 4 comments

Also compute_bucket_seed is out of place in anonymization.c. It should be moved to common.c.

edongashi avatar Mar 21 '22 10:03 edongashi

Also compute_bucket_seed is out of place in anonymization.c. It should be moved to common.c.

Why is it out of place in anonymization.c? Even if we don't want it there, common.c doesn't seem like the right place for it. Maybe noise_layers.c or bucket.c?

cristianberneanu avatar Mar 21 '22 11:03 cristianberneanu

Why is it out of place in anonymization.c?

anonymization.c should not reference Bucket or BucketDesc. In my view those are runtime concepts and the rewriter is a "compile" time process.

common.c doesn't seem like the right place for it

I saw that eval_low_count is there, which is used by bucket scan and star bucket. The function will be needed in the same places because that is where we instantiate buckets. I'm not strictly against moving it, but it felt a bit awkward.

edongashi avatar Mar 21 '22 11:03 edongashi

If computing the seed multiple times is costly, worth implementing for the sake of speedup.

edongashi avatar Apr 07 '22 07:04 edongashi

Low priority because it has little performance gains.

edongashi avatar Apr 14 '22 11:04 edongashi