Skip to content

Commit

Permalink
add option "mode" with value "FAILFAST" to JSON file reader (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
eemhu authored Oct 8, 2024
1 parent 9297dc5 commit 945fa2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/com/teragrep/pth10/StreamingTestUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,15 @@ private void internalDPLTest(
StructType schema;
if (this.schema == null) {
// notice that the schema from a JSON-file might be in an unexpected order
schema = spark.read().json(testDirectory).schema();
schema = spark.read().option("mode", "FAILFAST").json(testDirectory).schema();
}
else {
// schema was given in constructor
schema = this.schema;
}

// initialize test dataset
Dataset<Row> df = spark.readStream().schema(schema).json(testDirectory);
Dataset<Row> df = spark.readStream().option("mode", "FAILFAST").schema(schema).json(testDirectory);
// apply data customizations
df = dataCustomizations.apply(df);
this.ctx.setDs(df);
Expand Down

0 comments on commit 945fa2b

Please sign in to comment.