[
https://issues.apache.org/jira/browse/SPARK-42017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17683594#comment-17683594
]
Takuya Ueshin commented on SPARK-42017:
---------------------------------------
The error class hierarchy is one of the issues, but the test in the description
has a different issue,
{code:python}
df["bad_key"]
{code}
does not raise any error at the point because Spark Connect doesn't analyze
whether the column name is valid or not yet.
> Different error type AnalysisException vs SparkConnectAnalysisException
> -----------------------------------------------------------------------
>
> Key: SPARK-42017
> URL: https://issues.apache.org/jira/browse/SPARK-42017
> Project: Spark
> Issue Type: Sub-task
> Components: Connect, Tests
> Affects Versions: 3.4.0
> Reporter: Hyukjin Kwon
> Priority: Major
>
> e.g.)
> {code}
> 23/01/12 14:33:43 WARN NativeCodeLoader: Unable to load native-hadoop library
> for your platform... using builtin-java classes where applicable
> Setting default log level to "WARN".
> To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use
> setLogLevel(newLevel).
> FAILED [ 8%]
> pyspark/sql/tests/test_column.py:105 (ColumnParityTests.test_access_column)
> self = <pyspark.sql.tests.connect.test_parity_column.ColumnParityTests
> testMethod=test_access_column>
> def test_access_column(self):
> df = self.df
> self.assertTrue(isinstance(df.key, Column))
> self.assertTrue(isinstance(df["key"], Column))
> self.assertTrue(isinstance(df[0], Column))
> self.assertRaises(IndexError, lambda: df[2])
> > self.assertRaises(AnalysisException, lambda: df["bad_key"])
> E AssertionError: AnalysisException not raised by <lambda>
> ../test_column.py:112: AssertionError
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]