huaxingao commented on code in PR #44119: URL: https://github.com/apache/spark/pull/44119#discussion_r1431768750
########## sql/core/src/test/scala/org/apache/spark/sql/connector/DeltaBasedMergeIntoDFWriterV2SuiteBase.scala: ########## @@ -0,0 +1,224 @@ +/* + * 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.catalyst.types.DataTypeUtils +import org.apache.spark.sql.execution.SparkPlan +import org.apache.spark.sql.execution.datasources.v2.BatchScanExec +import org.apache.spark.sql.functions.{col, lit} +import org.apache.spark.sql.types.StructType + +abstract class DeltaBasedMergeIntoDFWriterV2SuiteBase extends MergeIntoDFWriterV2SuiteBase { Review Comment: The original test suites have: ``` /* This suite only adds tests specific to group-based MERGE operations, * https://github.com/apache/spark/pull/41577 * most of the tests are in the parent class. * / class GroupBasedMergeIntoTableSuite extends MergeIntoTableSuiteBase /* This suite only adds tests specific to delta-based MERGE operations * https://github.com/apache/spark/pull/41930. * For the MERGE operation in this test suite, we only need to read the required columns from * the target table, but for group-based MERGE operations, we need to read all the columns * from the target table. * / abstract class DeltaBasedMergeIntoTableSuiteBase extends MergeIntoTableSuiteBase ``` ``` class DeltaBasedMergeIntoTableSuite extends DeltaBasedMergeIntoTableSuiteBase // props.put("supports-deltas", "true") class DeltaBasedMergeIntoTableUpdateAsDeleteAndInsertSuite extends DeltaBasedMergeIntoTableSuiteBase // props.put("supports-deltas", "true") // props.put("split-updates", "true") ``` I feel for DataFrame Merge API support, I don't need all these test suites, but I can follow the original tests to add all the corresponding test suites. -- 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]
