cloud-fan commented on code in PR #47481:
URL: https://github.com/apache/spark/pull/47481#discussion_r1696287775


##########
sql/core/src/test/scala/org/apache/spark/sql/StringFunctionsSuite.scala:
##########
@@ -424,6 +424,14 @@ class StringFunctionsSuite extends QueryTest with 
SharedSparkSession {
       df.selectExpr("substring_index(a, '.', 2)"),
       Row("www.apache")
     )
+
+    val testTable = "test_substring_index"
+    withTable(testTable) {
+      sql(s"CREATE TABLE $testTable (num int) USING parquet")
+      sql(s"INSERT INTO $testTable VALUES (1), (2), (3), (NULL)")

Review Comment:
   A lot of expression tests simply use literal input, and we may miss some 
bugs in codegen which can only be exposed with column input. I think it will be 
the best if most expressions have unified implementation for interpreted and 
codegen, like `AesEncrypt`, the actual implementation is in Java. For other 
expressions, we need to manually test both literal input and column input.



-- 
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]

Reply via email to