diff --git a/external/avro/src/test/scala/org/apache/spark/sql/execution/datasources/AvroReadSchemaSuite.scala b/external/avro/src/test/scala/org/apache/spark/sql/execution/datasources/AvroReadSchemaSuite.scala new file mode 100644 index 0000000000000..a480bb90b5a73 --- /dev/null +++ b/external/avro/src/test/scala/org/apache/spark/sql/execution/datasources/AvroReadSchemaSuite.scala @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.sql.execution.datasources + +class AvroReadSchemaSuite + extends ReadSchemaSuite + with AddColumnIntoTheMiddleTest + with HideColumnInTheMiddleTest + with ChangePositionTest { + + override val format: String = "avro" +} diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/ReadSchemaSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/ReadSchemaSuite.scala index de234c14c7b5f..802fda8302073 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/ReadSchemaSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/ReadSchemaSuite.scala @@ -36,6 +36,8 @@ import org.apache.spark.sql.internal.SQLConf * -> ParquetReadSchemaSuite * -> VectorizedParquetReadSchemaSuite * -> MergedParquetReadSchemaSuite + * + * -> AvroReadSchemaSuite */ /** diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/ReadSchemaTest.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/ReadSchemaTest.scala index 17d9d43a3e08b..d42809529ceed 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/ReadSchemaTest.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/ReadSchemaTest.scala @@ -46,6 +46,7 @@ import org.apache.spark.sql.test.{SharedSQLContext, SQLTestUtils} * | JSON | 1, 2, 3, 4 | | * | ORC | 1, 2, 3, 4 | Native vectorized ORC reader has the widest coverage. | * | PARQUET | 1, 2, 3 | | + * | AVRO | 1, 2, 3 | | * * This aims to provide an explicit test coverage for reader schema change on file-based data * sources. Since a file format has its own coverage, we need a test suite for each file-based @@ -55,9 +56,12 @@ import org.apache.spark.sql.test.{SharedSQLContext, SQLTestUtils} * * ReadSchemaTest * -> AddColumnTest - * -> HideColumnTest + * -> AddColumnIntoTheMiddleTest + * -> HideColumnAtTheEndTest + * -> HideColumnInTheMiddleTest * -> ChangePositionTest * -> BooleanTypeTest + * -> ToStringTypeTest * -> IntegralTypeTest * -> ToDoubleTypeTest * -> ToDecimalTypeTest