srielau commented on code in PR #36891:
URL: https://github.com/apache/spark/pull/36891#discussion_r899741756


##########
python/pyspark/pandas/tests/test_indexops_spark.py:
##########
@@ -39,7 +39,11 @@ def test_series_transform_negative(self):
         ):
             self.psser.spark.transform(lambda scol: 1)
 
-        with self.assertRaisesRegex(AnalysisException, 
"Column.*non-existent.*does not exist"):
+        with self.assertRaisesRegex(
+                AnalysisException,
+                "[UNRESOLVED_COLUMN] A column or function parameter with name 
`non-existent` " +
+                "cannot be resolved. Did you mean one of the following? 
[`__index_level_0__`, " +
+                "`x`, `__natural_order__`]"):

Review Comment:
   ```suggestion
               AnalysisException,
               "[UNRESOLVED_COLUMN] A column or function parameter with name 
`non-existent` " +
               "cannot be resolved. Did you mean one of the following? 
[`__index_level_0__`, " +
               "`x`, `__natural_order__`]"
           ):
   ```



##########
python/pyspark/sql/tests/test_utils.py:
##########
@@ -36,7 +36,9 @@ def test_capture_user_friendly_exception(self):
         try:
             self.spark.sql("select `中文字段`")
         except AnalysisException as e:
-            self.assertRegex(str(e), "Column '`中文字段`' does not exist")
+            self.assertRegex(str(e),
+                             "[UNRESOLVED_COLUMN] A column or function 
parameter with name " +
+                             "`中文字段` cannot be resolved. Did you mean one of 
the following? []")

Review Comment:
   ```suggestion
               self.assertRegex(
                   str(e),
                   "[UNRESOLVED_COLUMN] A column or function parameter with 
name " +
                   "`中文字段` cannot be resolved. Did you mean one of the 
following? []"
               )
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to