Skip to content

Commit

Permalink
small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Chloe He committed Jun 27, 2024
1 parent fff1df5 commit 4f03594
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions ibis/backends/pyspark/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,16 +1165,14 @@ def _to_filesystem_output(
df = self._session.sql(expr.compile())
if self.mode == "batch":
df = df.write.format(format)

Check warning on line 1167 in ibis/backends/pyspark/__init__.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/pyspark/__init__.py#L1167

Added line #L1167 was not covered by tests
if options is not None:
for k, v in options.items():
df = df.option(k, v)
for k, v in (options or {}).items():
df = df.option(k, v)
df.save(path)
return None

Check warning on line 1171 in ibis/backends/pyspark/__init__.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/pyspark/__init__.py#L1169-L1171

Added lines #L1169 - L1171 were not covered by tests
sq = df.writeStream.format(format)
sq = sq.option("path", os.fspath(path))
if options is not None:
for k, v in options.items():
sq = sq.option(k, v)
for k, v in (options or {}).items():
sq = sq.option(k, v)
sq.start()
return sq

Expand Down

0 comments on commit 4f03594

Please sign in to comment.