Skip to content

[SPARK-43943][FOLLOWUP] Correct a function alias#42642

Closed
zhengruifeng wants to merge 1 commit intoapache:masterfrom
zhengruifeng:spark_43943_followup
Closed

[SPARK-43943][FOLLOWUP] Correct a function alias#42642
zhengruifeng wants to merge 1 commit intoapache:masterfrom
zhengruifeng:spark_43943_followup

Conversation

@zhengruifeng
Copy link
Copy Markdown
Contributor

@zhengruifeng zhengruifeng commented Aug 24, 2023

What changes were proposed in this pull request?

Correct a function alias

Why are the changes needed?

it should be sign

Does this PR introduce any user-facing change?

actually no, since pyspark.sql.connect.function shares the same namespace with pyspark.sql.function

also manually check (before this PR)

Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /__ / .__/\_,_/_/ /_/\_\   version 4.0.0.dev0
      /_/

Using Python version 3.10.11 (main, May 17 2023 14:30:36)
Client connected to the Spark Connect server at localhost
SparkSession available as 'spark'.

In [1]: from pyspark.sql import functions as sf

In [2]: sf.sign
Out[2]: <function pyspark.sql.functions.signum(col: 'ColumnOrName') -> pyspark.sql.column.Column>

In [3]: sf.sigh
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[3], line 1
----> 1 sf.sigh

AttributeError: module 'pyspark.sql.functions' has no attribute 'sigh'

How was this patch tested?

CI

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

NO

@zhengruifeng zhengruifeng changed the title [SPARK-43943][PYTHON] Correct a function alias [SPARK-43943][FOLLOWUP] Correct a function alias Aug 24, 2023
zhengruifeng added a commit that referenced this pull request Aug 24, 2023
### What changes were proposed in this pull request?
Correct a function alias

### Why are the changes needed?
it should be `sign`

### Does this PR introduce _any_ user-facing change?
actually no, since `pyspark.sql.connect.function` shares the same namespace with `pyspark.sql.function`

also manually check (before this PR)
```
Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /__ / .__/\_,_/_/ /_/\_\   version 4.0.0.dev0
      /_/

Using Python version 3.10.11 (main, May 17 2023 14:30:36)
Client connected to the Spark Connect server at localhost
SparkSession available as 'spark'.

In [1]: from pyspark.sql import functions as sf

In [2]: sf.sign
Out[2]: <function pyspark.sql.functions.signum(col: 'ColumnOrName') -> pyspark.sql.column.Column>

In [3]: sf.sigh
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[3], line 1
----> 1 sf.sigh

AttributeError: module 'pyspark.sql.functions' has no attribute 'sigh'
```

### How was this patch tested?
CI

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

Closes #42642 from zhengruifeng/spark_43943_followup.

Authored-by: Ruifeng Zheng <ruifengz@apache.org>
Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
(cherry picked from commit c660eb3)
Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
@zhengruifeng
Copy link
Copy Markdown
Contributor Author

merged to master and branch-3.5

@zhengruifeng zhengruifeng deleted the spark_43943_followup branch August 24, 2023 06:56
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.

1 participant