Skip to content

[SPARK-42253][PYTHON] Add test for detecting duplicated error class#39821

Closed
itholic wants to merge 3 commits intoapache:masterfrom
itholic:SPARK-42253
Closed

[SPARK-42253][PYTHON] Add test for detecting duplicated error class#39821
itholic wants to merge 3 commits intoapache:masterfrom
itholic:SPARK-42253

Conversation

@itholic
Copy link
Contributor

@itholic itholic commented Jan 31, 2023

What changes were proposed in this pull request?

This PR proposes to add test for detecting duplicated name of error classes to keep the error class unique.

Why are the changes needed?

The name of error class should be unique, so we should check if it's duplicated or not.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Manually test in case COLUMN_IN_LIST is duplicated as below:

======================================================================
FAIL [0.006s]: test_error_classes_duplicated (pyspark.errors.tests.test_errors.ErrorsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
...
AssertionError: False is not true : Duplicate error class: COLUMN_IN_LIST

----------------------------------------------------------------------
Ran 2 tests in 0.007s

FAILED (failures=1)

@HyukjinKwon
Copy link
Member

Merged to master and branch-3.4.

HyukjinKwon added a commit that referenced this pull request Feb 1, 2023
### What changes were proposed in this pull request?

This PR proposes to add test for detecting duplicated name of error classes to keep the error class unique.

### Why are the changes needed?

The name of error class should be unique, so we should check if it's duplicated or not.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Manually test in case `COLUMN_IN_LIST` is duplicated as below:
```shell
======================================================================
FAIL [0.006s]: test_error_classes_duplicated (pyspark.errors.tests.test_errors.ErrorsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
...
AssertionError: False is not true : Duplicate error class: COLUMN_IN_LIST

----------------------------------------------------------------------
Ran 2 tests in 0.007s

FAILED (failures=1)
```

Closes #39821 from itholic/SPARK-42253.

Lead-authored-by: itholic <haejoon.lee@databricks.com>
Co-authored-by: Hyukjin Kwon <gurwls223@gmail.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit 4d37e78)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
@itholic itholic deleted the SPARK-42253 branch April 22, 2023 05:47
snmvaughan pushed a commit to snmvaughan/spark that referenced this pull request Jun 20, 2023
### What changes were proposed in this pull request?

This PR proposes to add test for detecting duplicated name of error classes to keep the error class unique.

### Why are the changes needed?

The name of error class should be unique, so we should check if it's duplicated or not.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Manually test in case `COLUMN_IN_LIST` is duplicated as below:
```shell
======================================================================
FAIL [0.006s]: test_error_classes_duplicated (pyspark.errors.tests.test_errors.ErrorsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
...
AssertionError: False is not true : Duplicate error class: COLUMN_IN_LIST

----------------------------------------------------------------------
Ran 2 tests in 0.007s

FAILED (failures=1)
```

Closes apache#39821 from itholic/SPARK-42253.

Lead-authored-by: itholic <haejoon.lee@databricks.com>
Co-authored-by: Hyukjin Kwon <gurwls223@gmail.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit 4d37e78)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments