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

yangjie01 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 0c5797aa3e74 [SPARK-53416][SS][TESTS] Use `createOrReplaceTempView` 
instead of `registerTempTable` in `StreamingQueryOptimizationCorrectnessSuite`
0c5797aa3e74 is described below

commit 0c5797aa3e74b8827bf604e02a549470d03a472f
Author: yangjie01 <yangji...@baidu.com>
AuthorDate: Thu Aug 28 21:15:34 2025 +0800

    [SPARK-53416][SS][TESTS] Use `createOrReplaceTempView` instead of 
`registerTempTable` in `StreamingQueryOptimizationCorrectnessSuite`
    
    ### What changes were proposed in this pull request?
    This pr aims to replace the deprecated API `registerTempTable` with 
`createOrReplaceTempView` in the `StreamingQueryOptimizationCorrectnessSuite`. 
Since `registerTempTable` has been deprecated since Spark 2.0.0, we should 
avoid using it outside of the `DeprecatedAPISuite`.
    
    ### Why are the changes needed?
    Clean up the usage of deprecated APIs
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    - Pass Github Actions
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No
    
    Closes #52161 from LuciferYang/SPARK-53416.
    
    Authored-by: yangjie01 <yangji...@baidu.com>
    Signed-off-by: yangjie01 <yangji...@baidu.com>
---
 .../sql/streaming/StreamingQueryOptimizationCorrectnessSuite.scala    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQueryOptimizationCorrectnessSuite.scala
 
b/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQueryOptimizationCorrectnessSuite.scala
index 1c702faf40c3..53fee34d43f1 100644
--- 
a/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQueryOptimizationCorrectnessSuite.scala
+++ 
b/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQueryOptimizationCorrectnessSuite.scala
@@ -458,11 +458,11 @@ class StreamingQueryOptimizationCorrectnessSuite extends 
StreamTest {
       withTempView("tv1", "tv2") {
         val inputStream1 = MemoryStream[Int]
         val ds1 = inputStream1.toDS()
-        ds1.registerTempTable("tv1")
+        ds1.createOrReplaceTempView("tv1")
 
         val inputStream2 = MemoryStream[Int]
         val ds2 = inputStream2.toDS()
-        ds2.registerTempTable("tv2")
+        ds2.createOrReplaceTempView("tv2")
 
         // DISTINCT is rewritten to AGGREGATE, hence an AGGREGATEs for each 
source
         val unioned = spark.sql(


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

Reply via email to