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

dongjoon 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 d868133f257 Revert "[SPARK-38750][SQL][TESTS] Test the error class: 
SECOND_FUNCTION_ARGUMENT_NOT_INTEGER"
d868133f257 is described below

commit d868133f2573c4411a813579a9afe262bf5c5dfc
Author: Max Gekk <max.g...@gmail.com>
AuthorDate: Sat Apr 16 18:03:33 2022 -0700

    Revert "[SPARK-38750][SQL][TESTS] Test the error class: 
SECOND_FUNCTION_ARGUMENT_NOT_INTEGER"
    
    ### What changes were proposed in this pull request?
    This reverts commit 
https://github.com/apache/spark/commit/7246d25cc9ec36dafe6b7df16c78b704c5934d84.
    
    ### Why are the changes needed?
    The new test fails with the error in one of GAs:
    ```
    [info] - SECOND_FUNCTION_ARGUMENT_NOT_INTEGER: the second argument of 
'date_add' function needs to be an integer *** FAILED *** (22 milliseconds)
    [info]   Expected exception org.apache.spark.sql.AnalysisException to be 
thrown, but java.lang.NumberFormatException was thrown 
(QueryCompilationErrorsSuite.scala:316)
    [info]   org.scalatest.exceptions.TestFailedException:
    [info]   at 
org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:472)
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    ### How was this patch tested?
    By existing GAs.
    
    Closes #36227 from 
MaxGekk/fix-test-for-SECOND_FUNCTION_ARGUMENT_NOT_INTEGER.
    
    Authored-by: Max Gekk <max.g...@gmail.com>
    Signed-off-by: Dongjoon Hyun <dongj...@apache.org>
---
 .../apache/spark/sql/errors/QueryCompilationErrorsSuite.scala | 11 -----------
 1 file changed, 11 deletions(-)

diff --git 
a/sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala
 
b/sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala
index 34e3f305530..de671df74c8 100644
--- 
a/sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala
+++ 
b/sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala
@@ -310,17 +310,6 @@ class QueryCompilationErrorsSuite extends QueryTest with 
SharedSparkSession {
       }
     }
   }
-
-  test("SECOND_FUNCTION_ARGUMENT_NOT_INTEGER: " +
-    "the second argument of 'date_add' function needs to be an integer") {
-    val e = intercept[AnalysisException] {
-      sql("select date_add('1982-08-15', 'x')").collect()
-    }
-    assert(e.getErrorClass === "SECOND_FUNCTION_ARGUMENT_NOT_INTEGER")
-    assert(e.getSqlState === "22023")
-    assert(e.getMessage ===
-      "The second argument of 'date_add' function needs to be an integer.")
-  }
 }
 
 class MyCastToString extends SparkUserDefinedFunction(


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

Reply via email to