spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] MaxGekk commented on a change in pull request #25942: [SPARK-29242][SQL][TEST] Check results of expression examples
Date Thu, 26 Sep 2019 20:09:52 GMT
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message