This is an automated email from the ASF dual-hosted git repository.
wenchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 26aa2e49f8c4 [SPARK-53535][SQL][TESTS][FOLLOWUP] Remove duplicated
tests
26aa2e49f8c4 is described below
commit 26aa2e49f8c4c19da3da2782836947e6ec4a8c36
Author: Ziya Mukhtarov <[email protected]>
AuthorDate: Thu Oct 30 21:58:16 2025 +0800
[SPARK-53535][SQL][TESTS][FOLLOWUP] Remove duplicated tests
### What changes were proposed in this pull request?
Some test cases were duplicated by mistake, this PR removes the duplicates.
### Why are the changes needed?
Remove duplicates.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
NA
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #52794 from ZiyaZa/missing-struct-duplicated-tests.
Authored-by: Ziya Mukhtarov <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
---
.../datasources/parquet/ParquetSchemaSuite.scala | 103 ---------------------
1 file changed, 103 deletions(-)
diff --git
a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala
b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala
index 341ef3dcc06a..d256752c287c 100644
---
a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala
+++
b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala
@@ -3498,107 +3498,4 @@ class ParquetSchemaSuite extends ParquetSchemaTest {
| }
|}
""".stripMargin)
-
- for (returnNullStructIfAllFieldsMissing <- Seq(true, false)) {
- testSchemaClipping(
- s"struct in struct missing in requested schema, " +
-
s"returnNullStructIfAllFieldsMissing=$returnNullStructIfAllFieldsMissing",
- parquetSchema =
- """message root {
- | required int32 f0;
- | required group f1 {
- | required group f10 {
- | required int32 f100;
- | required int32 f101;
- | }
- | }
- |}
- """.stripMargin,
- catalystSchema = new StructType().add("f0", IntegerType, nullable =
true),
- expectedSchema =
- """message root {
- | required int32 f0;
- |}
- """.stripMargin,
- returnNullStructIfAllFieldsMissing = returnNullStructIfAllFieldsMissing)
-
- testSchemaClipping(
- s"struct in struct, with missing field being requested, " +
-
s"returnNullStructIfAllFieldsMissing=$returnNullStructIfAllFieldsMissing",
- parquetSchema =
- """message root {
- | required group f0 {
- | required group f00 {
- | required int64 f000;
- | required int32 f001;
- | }
- | }
- |}
- """.stripMargin,
- catalystSchema = new StructType()
- .add("f0", new StructType()
- .add("f01", IntegerType, nullable = true), nullable = true),
- expectedSchema =
- ("""message root {
- | required group f0 {
- | optional int32 f01;""" + (if
(!returnNullStructIfAllFieldsMissing) {
- """
- | required group f00 {
- | required int32 f001;
- | }""" } else { "" }) +
- """
- | }
- |}
- """).stripMargin,
- returnNullStructIfAllFieldsMissing = returnNullStructIfAllFieldsMissing)
-
- testSchemaClipping(
- s"missing struct with complex fields, " +
-
s"returnNullStructIfAllFieldsMissing=$returnNullStructIfAllFieldsMissing",
- parquetSchema =
- """message root {
- | optional group _1 {
- | optional group _1 (LIST) {
- | repeated group list {
- | optional int32 element;
- | }
- | }
- | optional group _2 {
- | optional binary _1 (UTF8);
- | optional int32 _2;
- | }
- | optional group _3 {
- | optional group _1 (LIST) {
- | repeated group list {
- | optional int32 element;
- | }
- | }
- | optional boolean _2;
- | optional int32 _3;
- | }
- | optional group _4 {
- | optional int64 _1;
- | }
- | }
- |}
- """.stripMargin,
- catalystSchema = new StructType()
- .add("_1", new StructType()
- .add("_101", IntegerType)
- .add("_102", LongType)),
- expectedSchema =
- ("""message root {
- | optional group _1 {
- | optional int32 _101;
- | optional int64 _102;""" + (if
(!returnNullStructIfAllFieldsMissing) {
- """
- | optional group _3 {
- | optional boolean _2;
- | }""" } else { "" }) +
- """
- | }
- |}
- """).stripMargin,
- returnNullStructIfAllFieldsMissing = returnNullStructIfAllFieldsMissing)
- }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]