cloud-fan commented on code in PR #56352: URL: https://github.com/apache/spark/pull/56352#discussion_r3377814788
########## sql/core/src/test/scala/org/apache/spark/sql/connector/MergeIntoSchemaEvolutionTypeWideningTests.scala: ########## @@ -0,0 +1,478 @@ +/* + * 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.connector + +import org.apache.spark.sql.Row +import org.apache.spark.sql.types._ + +/** + * Type widening and type promotion tests (top-level and nested). + */ +trait MergeIntoSchemaEvolutionTypeWideningTests extends MergeIntoSchemaEvolutionSuiteBase { + + import testImplicits._ + + import org.apache.spark.sql.DataFrame + + // scalastyle:off argcount + override protected def testEvolution(name: String)( Review Comment: Non-blocking, pre-existing: this `testEvolution` override forwards verbatim to `super.testEvolution(...)` and exists only to flip the `partitionCols` default from `Seq.empty` (`MergeIntoSchemaEvolutionSuiteBase.scala:155`) to `Seq("dep")`. It's now copy-pasted across all 5 traits (these 4 + `NoCapabilityTests`) — since every trait overrides this default, the base's `Seq.empty` is effectively dead code. Out of scope for this pure move, but worth a follow-up: hoisting the `Seq("dep")` default into the base (or a shared intermediate trait) would let you delete this boilerplate from all five. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
