dtenedor commented on code in PR #42595:
URL: https://github.com/apache/spark/pull/42595#discussion_r1309301713
##########
sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala:
##########
@@ -643,11 +643,17 @@ class SQLQueryTestSuite extends QueryTest with
SharedSparkSession with SQLHelper
s"$testCaseName - ${udf.prettyName}", absPath, resultFile, udf)
}
} else if
(file.getAbsolutePath.startsWith(s"$inputFilePath${File.separator}udtf")) {
- Seq(TestPythonUDTF("udtf")).map { udtf =>
- UDTFTestCase(
- s"$testCaseName - ${udtf.prettyName}", absPath, resultFile, udtf
- )
- }
+ val udtfs = Seq(
+ TestPythonUDTF("udtf"),
+ TestPythonUDTFCountSumLast,
+ TestPythonUDTFWithSinglePartition,
+ TestPythonUDTFPartitionBy,
+ TestPythonUDTFInvalidPartitionByAndWithSinglePartition,
+ TestPythonUDTFInvalidOrderByWithoutPartitionBy
+ )
+ Seq(UDTFTestCase(
+ s"$testCaseName - Python UDTFs", absPath, resultFile, udtfs
+ ))
Review Comment:
Thanks, I found it was necessary to create multiple UDTF instances in order
to exercise different combinations of behaviors for functions that exported
required partitioning properties from the 'analyze' method vs. calls to those
functions with explicit PARTITION BY clauses. To make this more consistent with
how the other test cases worked, I created a wrapping class 'TestUDTFSet' and
renamed the test case type to 'UDTFSetTestCase', which now accepts the former
as a single value instead.
--
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]