fwc commented on code in PR #56190: URL: https://github.com/apache/spark/pull/56190#discussion_r3454477314
########## sql/core/src/test/scala/org/apache/spark/sql/SessionQueryTestBase.scala: ########## @@ -0,0 +1,60 @@ +/* + * 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 + +// scalastyle:off funsuite +import org.scalatest.funsuite.AnyFunSuite + +import org.apache.spark.CheckErrorHelper +import org.apache.spark.sql.catalyst.SQLConfHelper +import org.apache.spark.sql.internal.SQLConf +// scalastyle:on + +/** + * TODO should be moved to sql/api + * + * base for fully sql/core independent tests, i.e. this trait could be moved to sql/api and then + * used in sql/connect/client. + */ +trait SessionQueryTestBase + extends AnyFunSuite + with SparkSessionProvider + with CheckAnswerHelper + with CheckErrorHelper + with SQLConfHelper Review Comment: @cloud-fan @johanl-db I'm a bit unsure how we should handle config stuff: currently, `withSQLConf` is used pervasively but `SQLConf` is not part of the public API, only `RuntimeConfig`. I see the following options: - keep the `withSQLConf` name but implement the `connect` override by manipulating `spark.conf` ('only' has type `RuntimeConfig`) (would be confusing) - introduce `withRuntimeConf` as the 'new' way to set confs while deprecating `withSQLConf` at for 'advertisement' Are there other options? What do you think? -- 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]
