You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2025/05/12 20:47:11 UTC

(spark-connect-swift) branch main updated: [SPARK-52091] Add `function` SQL test file and answer file

This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-connect-swift.git


The following commit(s) were added to refs/heads/main by this push:
     new 2e8324a  [SPARK-52091] Add `function` SQL test file and answer file
2e8324a is described below

commit 2e8324aae2c606833895e3754ddad9b81b1782ba
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Mon May 12 13:47:04 2025 -0700

    [SPARK-52091] Add `function` SQL test file and answer file
    
    ### What changes were proposed in this pull request?
    
    This PR aims to add `function` SQL test file and answer file.
    
    ### Why are the changes needed?
    
    Not only a built-in function, we can use `java_method` to use any Java function.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Pass the CIs.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #138 from dongjoon-hyun/SPARK-52091.
    
    Authored-by: Dongjoon Hyun <do...@apache.org>
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 Tests/SparkConnectTests/Resources/queries/function.sql        | 1 +
 Tests/SparkConnectTests/Resources/queries/function.sql.answer | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/Tests/SparkConnectTests/Resources/queries/function.sql b/Tests/SparkConnectTests/Resources/queries/function.sql
new file mode 100644
index 0000000..6d89767
--- /dev/null
+++ b/Tests/SparkConnectTests/Resources/queries/function.sql
@@ -0,0 +1 @@
+SELECT length(java_method('java.util.UUID', 'randomUUID'))
diff --git a/Tests/SparkConnectTests/Resources/queries/function.sql.answer b/Tests/SparkConnectTests/Resources/queries/function.sql.answer
new file mode 100644
index 0000000..8a47000
--- /dev/null
+++ b/Tests/SparkConnectTests/Resources/queries/function.sql.answer
@@ -0,0 +1,5 @@
++-----------------------------------------------+
+|length(java_method(java.util.UUID, randomUUID))|
++-----------------------------------------------+
+|                                             36|
++-----------------------------------------------+
\ No newline at end of file


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