comphead commented on code in PR #1470:
URL: https://github.com/apache/datafusion-comet/pull/1470#discussion_r1978338010


##########
spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala:
##########
@@ -2122,6 +2122,22 @@ class CometExpressionSuite extends CometTestBase with 
AdaptiveSparkPlanHelper {
     }
   }
 
+  test("pad") {
+    val table = "pad"
+    val gen = new DataGenerator(new Random(42))
+    withTable(table) {
+      // generate some data
+      // newline characters are intentionally omitted for now
+      val dataChars = "\t abc123"
+      sql(s"create table $table(id int, name varchar(20)) using parquet")
+      gen.generateStrings(100, dataChars, 6).zipWithIndex.foreach { x =>
+        sql(s"insert into $table values(${x._2}, '${x._1}')")
+      }
+      checkSparkAnswerAndOperator(
+        s"SELECT id, lpad(name, 10, ' '), rpad(name, 10, ' ') FROM $table 
ORDER BY id")

Review Comment:
   lets also add 2 param variant test
   
   ```
   lpad(name, 10), rpad(name, 10)
   ```



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to