slfan1989 commented on code in PR #1512:
URL: https://github.com/apache/auron/pull/1512#discussion_r2462321309


##########
spark-extension-shims-spark/src/test/scala/org/apache/spark/sql/auron/AuronFunctionSuite.scala:
##########
@@ -274,4 +274,38 @@ class AuronFunctionSuite
       }
     }
   }
+
+  test("crc32 function") {
+    withTable("t1") {
+      sql("create table t1 using parquet as select 'spark' as c1, '3.x' as 
version")
+
+      val functions =
+        """
+          |select
+          |  crc32(concat(c1, version)) as crc32
+          |from t1
+          |""".stripMargin
+
+      val df = sql(functions)
+
+      checkAnswer(df, Seq(Row(1962683784)))

Review Comment:
   The CRC32 value of `Spark 3.x` has been verified in the original Spark 
client, and it is `1962683784`.
   
   ```
   spark-sql> SELECT crc32(concat('spark', '3.x'));
   25/10/24 19:55:26 INFO SQLExecution:  begin to add 
SparkListenerAnalyzedLogicalPlan event 1761306926107
   25/10/24 19:55:26 INFO SQLExecution:  end to add 
SparkListenerAnalyzedLogicalPlan event 1761306926112
   1962683784
   ```



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

Reply via email to