MaxGekk commented on a change in pull request #25942: [SPARK-29242][SQL][TEST] 
Check results of expression examples
URL: https://github.com/apache/spark/pull/25942#discussion_r328803928
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
 ##########
 @@ -140,6 +141,62 @@ class SQLQuerySuite extends QueryTest with 
SharedSparkSession {
     }
   }
 
+  test("check outputs of expression examples") {
+    def unindentAndTrim(s: String): String = {
+      s.replaceAll("\n\\s+", "\n").trim
+    }
+    val exampleRe = """^(.+);\n(?s)(.+)$""".r
+    val ignoreSet = Set(
+      // One of examples shows getting the current timestamp
+      "org.apache.spark.sql.catalyst.expressions.UnixTimestamp",
+      // Random output without a seed
+      "org.apache.spark.sql.catalyst.expressions.Rand",
+      "org.apache.spark.sql.catalyst.expressions.Randn",
+      "org.apache.spark.sql.catalyst.expressions.Shuffle",
+      "org.apache.spark.sql.catalyst.expressions.Uuid",
+      // The example call methods that return unstable results.
+      "org.apache.spark.sql.catalyst.expressions.CallMethodViaReflection",
+      // Fails on parsing `SELECT 2 mod 1.8`:
 
 Review comment:
   I have fixed 3 out of 4. I will open a ticket for the last one.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to