feat: high-concurrency userid hashing

This commit is contained in:
mokurin000
2025-08-11 12:12:14 +08:00
parent 1d2e3fc7cc
commit b0942e2af4
4 changed files with 26 additions and 5 deletions

8
utils/export_records.py Normal file
View File

@@ -0,0 +1,8 @@
import polars as pl
import polars_hash as pl_hash
pl.scan_parquet("records.parquet").with_columns(
pl.col("user_id").cast(pl.String).add("Lt2N5xgjJOqRsT5qVt7wWYw6SqOPZDI7")
).with_columns(pl_hash.col("user_id").chash.sha2_256()).collect().write_parquet(
"records_pub.parquet"
)