uros-b commented on code in PR #57300:
URL: https://github.com/apache/spark/pull/57300#discussion_r3700490468
##########
sql/core/src/test/scala/org/apache/spark/sql/SparkSessionProvider.scala:
##########
@@ -26,4 +26,9 @@ package org.apache.spark.sql
*/
trait SparkSessionProvider {
protected def spark: SparkSession
+
+ /**
+ * Shorthand for running a query using the [[SparkSession]]
+ */
+ protected def sql(query: String): DataFrame = spark.sql(query)
Review Comment:
Since the classic side narrows the return type, should
connect.SparkSessionProvider do the same? It already narrows spark to a connect
session, but sql still returns org.apache.spark.sql.DataFrame there, so
connect-only test code can't reach connect-specific APIs off a sql(...) result;
connect.SessionQueryTest itself has to pattern-match to get at explainString.
Adding the override there would keep the two sides symmetric.
--
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]