Skip to content

Commit b2ef14e

Browse files
committed
style(spark): apply spotless formatting
Signed-off-by: Robert Kruszewski <[email protected]>
1 parent 216e91d commit b2ef14e

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎java/vortex-spark/common/src/main/java/dev/vortex/spark/read/NestedSchemaPruning.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
/**
2222
* Pushes Spark's nested schema pruning down to the native scan, and resolves the read schema against each file.
2323
*
24-
* <p>Columns and struct fields resolve by name under Spark's case sensitivity, so a file can store a struct's fields
25-
* in another order, in another case, or without some nullable fields, and still read correctly.
24+
* <p>Columns and struct fields resolve by name under Spark's case sensitivity, so a file can store a struct's fields in
25+
* another order, in another case, or without some nullable fields, and still read correctly.
2626
*
2727
* <p>Only struct fields are pruned and resolved by name. Structs inside arrays and maps, and extension types that
2828
* export as Arrow structs such as Variant, are read whole and by position, since projecting each element needs a

‎java/vortex-spark/common/src/test/java/dev/vortex/spark/VortexNestedSchemaResolutionTest.java‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,19 @@ public void filesWithDifferentStructs(@TempDir Path tempDir) {
175175
"[[0,[10,20,null]], [1,[11,21,null]], [2,[12,22,32]], [3,null]]");
176176
assertMatchesParquet(parquet, vortex, schema, data -> data.selectExpr("id", "c"));
177177
assertMatchesParquet(parquet, vortex, schema, data -> data.selectExpr("id", "c.y", "c.z"));
178-
assertMatchesParquet(parquet, vortex, schema, data -> data.where("c.x > 10").selectExpr("id", "c.y"));
178+
assertMatchesParquet(
179+
parquet, vortex, schema, data -> data.where("c.x > 10").selectExpr("id", "c.y"));
179180
}
180181

181182
@Test
182183
@DisplayName("A struct read over a field the file stores as another type fails and names the field")
183184
public void structOverAnotherType(@TempDir Path tempDir) {
184185
String path = tempDir.resolve("vortex").toString();
185-
spark.range(2).selectExpr("id", "named_struct('a', id) AS s").write().format("vortex").save(path);
186+
spark.range(2)
187+
.selectExpr("id", "named_struct('a', id) AS s")
188+
.write()
189+
.format("vortex")
190+
.save(path);
186191

187192
Exception thrown = assertThrows(Exception.class, () -> spark.read()
188193
.schema("id BIGINT, s STRUCT<a: STRUCT<x: BIGINT>>")

0 commit comments

Comments
 (0)