You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/19 05:09:38 UTC
[GitHub] [spark] HyukjinKwon commented on a diff in pull request #37303: [SPARK-39883][SQL][TESTS] Add DataFrame function parity check
HyukjinKwon commented on code in PR #37303:
URL: https://github.com/apache/spark/pull/37303#discussion_r949805524
##########
sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala:
##########
@@ -41,6 +42,98 @@ import org.apache.spark.sql.types._
class DataFrameFunctionsSuite extends QueryTest with SharedSparkSession {
import testImplicits._
+ test("DataFrame function and SQL functon parity") {
+ // This test compares the available list of DataFrame functions in
+ // org.apache.spark.sql.functions with the SQL function registry. This attempts to verify that
+ // the DataFrame functions are a subset of the functions in the SQL function registry (subject
+ // to exclusions and expectations). It also produces a list of the differences between the two.
+ // See also test_function_parity in test_functions.py.
+ //
+ // NOTE FOR DEVELOPERS:
+ // If this test fails one of the following needs to happen
+ // * If a function was added to org.apache.spark.sql.functions but not the function registry
+ // add it to the below expectedOnlyDataFrameFunctions set.
Review Comment:
It is nice to know the feature gap but this case actually happens pretty often. `org.apachep.spark.sql.functions._` will either have the commonly used functions or some feature parity w/ other libraries (e.g., pandas) as documented in that file.
cc @rxin
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org