Skip to content

Commit d70c9f1

Browse files
committed
fixup
1 parent 332eae4 commit d70c9f1

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

python/pyspark/sql/classic/dataframe.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,6 +1807,27 @@ def pandas_api(
18071807
)
18081808
return PandasOnSparkDataFrame(internal)
18091809

1810+
def mapInPandas(
1811+
self,
1812+
func: "PandasMapIterFunction",
1813+
schema: Union[StructType, str],
1814+
barrier: bool = False,
1815+
profile: Optional[ResourceProfile] = None,
1816+
) -> "DataFrame":
1817+
return super(PandasMapOpsMixin, self).mapInPandas(func, schema, barrier, profile)
1818+
1819+
def mapInArrow(
1820+
self,
1821+
func: "ArrowMapIterFunction",
1822+
schema: Union[StructType, str],
1823+
barrier: bool = False,
1824+
profile: Optional[ResourceProfile] = None,
1825+
) -> "DataFrame":
1826+
return super(PandasMapOpsMixin, self).mapInArrow(func, schema, barrier, profile)
1827+
1828+
def toPandas(self) -> "PandasDataFrameLike":
1829+
return super(PandasConversionMixin, self).toPandas()
1830+
18101831

18111832
def _to_scala_map(sc: "SparkContext", jm: Dict) -> "JavaObject":
18121833
"""

python/pyspark/sql/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def dispatch_df_method(f: FuncT) -> FuncT:
310310

311311
@functools.wraps(f)
312312
def wrapped(*args: Any, **kwargs: Any) -> Any:
313-
if is_remote():
313+
if is_remote() and "PYSPARK_NO_NAMESPACE_SHARE" not in os.environ:
314314
from pyspark.sql.connect.dataframe import DataFrame as ConnectDataFrame
315315

316316
if isinstance(args[0], ConnectDataFrame):

0 commit comments

Comments
 (0)