Skip to content

Commit

Permalink
[SPARK-49567][PYTHON] Use classic instead of vanilla from PySpark…
Browse files Browse the repository at this point in the history
… code base

### What changes were proposed in this pull request?

This PR proposes to use classic instead of vanilla from PySpark code base

### Why are the changes needed?

For unifying the terms to avoid confusion on overall code base including docs

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

No API changes, but user-facing `pyspark.sql.DataFrame.offset` docs use the terms `classic` instead of `vanilla`

### How was this patch tested?

CI

### Was this patch authored or co-authored using generative AI tooling?

No

Closes #48044 from itholic/vanilla_classic.

Authored-by: Haejoon Lee <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
  • Loading branch information
itholic authored and HyukjinKwon committed Sep 10, 2024
1 parent b0c5642 commit a69c5ea
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion python/pyspark/sql/connect/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1783,7 +1783,7 @@ def __getitem__(
)
)
else:
# TODO: revisit vanilla Spark's Dataset.col
# TODO: revisit classic Spark's Dataset.col
# if (sparkSession.sessionState.conf.supportQuotedRegexColumnName) {
# colRegex(colName)
# } else {
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/sql/connect/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def __init__(

def __repr__(self) -> str:
# the expressions are not resolved here,
# so the string representation can be different from vanilla PySpark.
# so the string representation can be different from classic PySpark.
grouping_str = ", ".join(str(e._expr) for e in self._grouping_cols)
grouping_str = f"grouping expressions: [{grouping_str}]"

Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/sql/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,7 @@ def offset(self, num: int) -> "DataFrame":
.. versionadded:: 3.4.0
.. versionchanged:: 3.5.0
Supports vanilla PySpark.
Supports classic PySpark.
Parameters
----------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def test_slow_query(self):

def test_listener_throw(self):
"""
Following Vanilla Spark's behavior, when the callback of user-defined listener throws,
Following classic Spark's behavior, when the callback of user-defined listener throws,
other listeners should still proceed.
"""

Expand Down
6 changes: 3 additions & 3 deletions python/pyspark/sql/tests/connect/test_connect_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -2572,7 +2572,7 @@ def test_function_parity(self):

cf_fn = {name for (name, value) in getmembers(CF, isfunction) if name[0] != "_"}

# Functions in vanilla PySpark we do not expect to be available in Spark Connect
# Functions in classic PySpark we do not expect to be available in Spark Connect
sf_excluded_fn = set()

self.assertEqual(
Expand All @@ -2581,15 +2581,15 @@ def test_function_parity(self):
"Missing functions in Spark Connect not as expected",
)

# Functions in Spark Connect we do not expect to be available in vanilla PySpark
# Functions in Spark Connect we do not expect to be available in classic PySpark
cf_excluded_fn = {
"check_dependencies", # internal helper function
}

self.assertEqual(
cf_fn - sf_fn,
cf_excluded_fn,
"Missing functions in vanilla PySpark not as expected",
"Missing functions in classic PySpark not as expected",
)

# SPARK-45216: Fix non-deterministic seeded Dataset APIs
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/testing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def setUpClass(cls):
def tearDownClass(cls):
cls.sc.stop()

def test_assert_vanilla_mode(self):
def test_assert_classic_mode(self):
from pyspark.sql import is_remote

self.assertFalse(is_remote())
Expand Down

0 comments on commit a69c5ea

Please sign in to comment.