Skip to content

Commit

Permalink
fixup! Migrate finalized keys for response configs
Browse files Browse the repository at this point in the history
Scan instead of load
  • Loading branch information
yngve-sk committed Dec 6, 2024
1 parent 80e5bb7 commit 0142b01
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ert/storage/migration/to9.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@ def _migrate_response_configs_wrt_finalized_keys(path: Path) -> None:

for real_dir in real_dirs:
if (real_dir / f"{response_type}.parquet").exists():
df = polars.read_parquet(
df = polars.scan_parquet(
real_dir / f"{response_type}.parquet"
)
response_keys = df["response_key"].unique().to_list()
response_keys = (
df.select("response_key")
.unique()
.collect()
.to_series()
.to_list()
)
config["has_finalized_keys"] = True
config["keys"] = sorted(response_keys)
break
Expand Down

0 comments on commit 0142b01

Please sign in to comment.