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 7d3f5bde323 [SPARK-45697][BUILD] Fix `Unicode escapes in triple quoted 
strings are deprecated`
7d3f5bde323 is described below

commit 7d3f5bde323ba8fbc926ad1d24c787eac7e39808
Author: panbingkun <[email protected]>
AuthorDate: Wed Nov 22 12:03:32 2023 +0800

    [SPARK-45697][BUILD] Fix `Unicode escapes in triple quoted strings are 
deprecated`
    
    ### What changes were proposed in this pull request?
    The pr aims to fix `Unicode escapes in triple quoted strings are 
deprecated` in scala 2.13.
    
    ### Why are the changes needed?
    Eliminate compile warnings.
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    ### How was this patch tested?
    - Pass GA.
    - Manually test:
      ```
      ./build/sbt "catalyst/testOnly 
org.apache.spark.sql.catalyst.parser.PlanParserSuite"
      ```
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No.
    
    Closes #43603 from panbingkun/SPARK-45697.
    
    Authored-by: panbingkun <[email protected]>
    Signed-off-by: yangjie01 <[email protected]>
---
 .../org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala
 
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala
index df396bf0548..c483aa1997f 100644
--- 
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala
+++ 
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala
@@ -17,6 +17,8 @@
 
 package org.apache.spark.sql.catalyst.parser
 
+import scala.annotation.nowarn
+
 import org.apache.spark.SparkThrowable
 import org.apache.spark.sql.catalyst.{FunctionIdentifier, TableIdentifier}
 import org.apache.spark.sql.catalyst.analysis.{AnalysisTest, NamedParameter, 
PosParameter, RelationTimeTravel, UnresolvedAlias, UnresolvedAttribute, 
UnresolvedFunction, UnresolvedGenerator, UnresolvedInlineTable, 
UnresolvedRelation, UnresolvedStar, UnresolvedSubqueryColumnAliases, 
UnresolvedTableValuedFunction, UnresolvedTVFAliases}
@@ -1678,7 +1680,8 @@ class PlanParserSuite extends AnalysisTest {
           List.empty, List.empty, None, None, false)))
 
     // verify with ROW FORMAT DELIMETED
-    assertEqual(
+    @nowarn("cat=deprecation")
+    val sqlWithRowFormatDelimiters: String =
       """
         |SELECT TRANSFORM(a, b, c)
         |  ROW FORMAT DELIMITED
@@ -1695,7 +1698,9 @@ class PlanParserSuite extends AnalysisTest {
         |  LINES TERMINATED BY '\n'
         |  NULL DEFINED AS 'NULL'
         |FROM testData
-      """.stripMargin,
+      """.stripMargin
+    assertEqual(
+      sqlWithRowFormatDelimiters,
       ScriptTransformation(
         "cat",
         Seq(AttributeReference("a", StringType)(),


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to