Skip to content

Commit

Permalink
change warning to error
Browse files Browse the repository at this point in the history
  • Loading branch information
chloeh13q committed Jul 16, 2024
1 parent 3a8e39d commit f510d6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ibis/backends/pyspark/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ def read_csv_dir(
path, inferSchema=inferSchema, header=header, **kwargs
)
if watermark is not None:
warnings.warn("Watermark is not supported in batch mode")
raise com.IbisInputError("Watermark is not supported in batch mode")
elif self.mode == "streaming":
spark_df = self._session.readStream.csv(
path, inferSchema=inferSchema, header=header, **kwargs
Expand Down Expand Up @@ -1134,7 +1134,7 @@ def read_parquet_dir(
spark_df = spark_df.schema(PySparkSchema.from_ibis(schema))
spark_df = spark_df.parquet(path, **kwargs)
if watermark is not None:
warnings.warn("Watermark is not supported in batch mode")
raise com.IbisInputError("Watermark is not supported in batch mode")
elif self.mode == "streaming":
spark_df = self._session.readStream
if schema is not None:
Expand Down Expand Up @@ -1183,7 +1183,7 @@ def read_json_dir(
if self.mode == "batch":
spark_df = self._session.read.json(path, **kwargs)
if watermark is not None:
warnings.warn("Watermark is not supported in batch mode")
raise com.IbisInputError("Watermark is not supported in batch mode")
elif self.mode == "streaming":
spark_df = self._session.readStream.json(path, **kwargs)
if watermark is not None:
Expand Down

0 comments on commit f510d6a

Please sign in to comment.