Skip to content

Conversation

@amaliujia
Copy link
Contributor

@amaliujia amaliujia commented Nov 24, 2022

What changes were proposed in this pull request?

The server guarantees to send at least one arrow batch with schema even there is empty result. In this case, DataFrame. toPandas always can return a Pandas DataFrame.

This PR decouples the client side execution path for Command and Relation to remove Optional from the returneed type of DataFrame. toPandas .

Why are the changes needed?

API coverage.

Does this PR introduce any user-facing change?

NO

How was this patch tested?

UT

@amaliujia
Copy link
Contributor Author

@amaliujia amaliujia changed the title [SPARK-41250][CONNECT][PYTHON] DataFrame.to_pandas should not return optional pandas dataframe [SPARK-41250][CONNECT][PYTHON] DataFrame. toPandas should not return optional pandas dataframe Nov 24, 2022
@HyukjinKwon
Copy link
Member

Merged to master.

beliefer pushed a commit to beliefer/spark that referenced this pull request Dec 15, 2022
…optional pandas dataframe

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

The server guarantees to send at least one arrow batch with schema even there is empty result. In this case, `DataFrame. toPandas` always can return a Pandas DataFrame.

This PR decouples the client side execution path for `Command` and `Relation` to remove `Optional` from the returneed type of `DataFrame. toPandas `.

### Why are the changes needed?

API coverage.

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

NO

### How was this patch tested?

UT

Closes apache#38786 from amaliujia/returned_pandas_not_optional.

Authored-by: Rui Wang <rui.wang@databricks.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
beliefer pushed a commit to beliefer/spark that referenced this pull request Dec 18, 2022
…optional pandas dataframe

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

The server guarantees to send at least one arrow batch with schema even there is empty result. In this case, `DataFrame. toPandas` always can return a Pandas DataFrame.

This PR decouples the client side execution path for `Command` and `Relation` to remove `Optional` from the returneed type of `DataFrame. toPandas `.

### Why are the changes needed?

API coverage.

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

NO

### How was this patch tested?

UT

Closes apache#38786 from amaliujia/returned_pandas_not_optional.

Authored-by: Rui Wang <rui.wang@databricks.com>
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