Skip to content

Commit

Permalink
feat: enhance variant index partitioning (#834)
Browse files Browse the repository at this point in the history
  • Loading branch information
d0choa authored Oct 12, 2024
1 parent 9f446e8 commit c4520aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gentropy/variant_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ def __init__(
col("variantId"), col("chromosome"), col("position")
),
)
.write.partitionBy("chromosome")
.mode(session.write_mode)
.repartitionByRange("chromosome", "position")
.sortWithinPartitions("chromosome", "position")
.write.mode(session.write_mode)
.parquet(variant_index_path)
)

Expand Down

0 comments on commit c4520aa

Please sign in to comment.