Skip to content

Commit

Permalink
Adapt test with missing required field
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada committed Oct 9, 2023
1 parent aa2ce5c commit 0034425
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ class ParquetDataImporterIT extends BaseDataImporter {
)
}

test("imports from file with missing field") {
test("import with missing field fails") {
MultiParquetChecker(
"required binary name (UTF8); required int32 age;",
Map("NAME" -> "VARCHAR(60)", "AGE" -> "INTEGER"),
Expand All @@ -524,14 +524,10 @@ class ParquetDataImporterIT extends BaseDataImporter {
.addParquetFile { case (writer, schema) =>
writer.write(new SimpleGroup(schema).append("name", "John"))
}
.addParquetFile { case (writer, schema) =>
writer.write(new SimpleGroup(schema).append("name", "Jane").append("age", 22))
}
.assertResultSet(
table("VARCHAR", "BIGINT")
.row("John", null)
.row("Jane", 22L)
.matches()
.assertFails(
Matchers.containsString(
"ParquetDecodingException: Can't read value in column [age] required int32 age"
)
)
}

Expand Down

0 comments on commit 0034425

Please sign in to comment.