Skip to content

Commit 0599cd9

Browse files
author
cproof
committed
FIX: allow sea explorer files to have different columns
1 parent 1ad3702 commit 0599cd9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pyglider/seaexplorer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def merge_parquet(indir, outdir, deploymentyaml, incremental=False, kind='raw'):
284284
# lets figure out what columns to read for situations where the number of columns changes:
285285
gli0 = pl.read_parquet(files[0])
286286
gli1 = pl.read_parquet(files[-1])
287-
columns = list(set(gli0.columns) & set(gli1.columns))
287+
columns = list(set(gli0.columns) | set(gli1.columns))
288288
columns = set([c for c in columns if len(c) > 0])
289289
dfs = []
290290
for f in files:
@@ -293,7 +293,7 @@ def merge_parquet(indir, outdir, deploymentyaml, incremental=False, kind='raw'):
293293
for col in missing:
294294
df = df.with_columns(pl.lit(None).cast(pl.Float64).alias(col))
295295

296-
dfs.append(df)
296+
dfs.append(df.select(sorted(columns)))
297297
gli = pl.concat(dfs, rechunk=True)
298298

299299
#gli = pl.read_parquet(indir + '/*.gli.sub.*.parquet', columns=columns,

0 commit comments

Comments
 (0)