Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-43527][PYTHON] Fix catalog.listCatalogs in PySpark #41186

Closed
wants to merge 1 commit into from

Conversation

zhengruifeng
Copy link
Contributor

What changes were proposed in this pull request?

Fix catalog.listCatalogs in PySpark

Why are the changes needed?

existing implementation outputs incorrect results

Does this PR introduce any user-facing change?

yes

before this PR:

In [1]: spark.catalog.listCatalogs()
Out[1]: [CatalogMetadata(name=<py4j.java_gateway.JavaMember object at 0x1031f08b0>, description=<py4j.java_gateway.JavaMember object at 0x1049ac2e0>)]

after this PR:

In [1]: spark.catalog.listCatalogs()
Out[1]: [CatalogMetadata(name='spark_catalog', description=None)]

How was this patch tested?

added doctest

@zhengruifeng
Copy link
Contributor Author

this PR should be backported to branch-3.4

@zhengruifeng
Copy link
Contributor Author

cc @HyukjinKwon

@HyukjinKwon
Copy link
Member

Merged to master and branch-3.4.

HyukjinKwon pushed a commit that referenced this pull request May 16, 2023
### What changes were proposed in this pull request?
Fix `catalog.listCatalogs` in PySpark

### Why are the changes needed?
existing implementation outputs incorrect results

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

before this PR:
```
In [1]: spark.catalog.listCatalogs()
Out[1]: [CatalogMetadata(name=<py4j.java_gateway.JavaMember object at 0x1031f08b0>, description=<py4j.java_gateway.JavaMember object at 0x1049ac2e0>)]
```

after this PR:
```
In [1]: spark.catalog.listCatalogs()
Out[1]: [CatalogMetadata(name='spark_catalog', description=None)]
```

### How was this patch tested?
added doctest

Closes #41186 from zhengruifeng/py_list_catalog.

Authored-by: Ruifeng Zheng <ruifengz@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit a232083)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
@zhengruifeng zhengruifeng deleted the py_list_catalog branch May 17, 2023 00:10
snmvaughan pushed a commit to snmvaughan/spark that referenced this pull request Jun 20, 2023
### What changes were proposed in this pull request?
Fix `catalog.listCatalogs` in PySpark

### Why are the changes needed?
existing implementation outputs incorrect results

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

before this PR:
```
In [1]: spark.catalog.listCatalogs()
Out[1]: [CatalogMetadata(name=<py4j.java_gateway.JavaMember object at 0x1031f08b0>, description=<py4j.java_gateway.JavaMember object at 0x1049ac2e0>)]
```

after this PR:
```
In [1]: spark.catalog.listCatalogs()
Out[1]: [CatalogMetadata(name='spark_catalog', description=None)]
```

### How was this patch tested?
added doctest

Closes apache#41186 from zhengruifeng/py_list_catalog.

Authored-by: Ruifeng Zheng <ruifengz@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit a232083)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
GladwinLee pushed a commit to lyft/spark that referenced this pull request Oct 10, 2023
### What changes were proposed in this pull request?
Fix `catalog.listCatalogs` in PySpark

### Why are the changes needed?
existing implementation outputs incorrect results

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

before this PR:
```
In [1]: spark.catalog.listCatalogs()
Out[1]: [CatalogMetadata(name=<py4j.java_gateway.JavaMember object at 0x1031f08b0>, description=<py4j.java_gateway.JavaMember object at 0x1049ac2e0>)]
```

after this PR:
```
In [1]: spark.catalog.listCatalogs()
Out[1]: [CatalogMetadata(name='spark_catalog', description=None)]
```

### How was this patch tested?
added doctest

Closes apache#41186 from zhengruifeng/py_list_catalog.

Authored-by: Ruifeng Zheng <ruifengz@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit a232083)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
catalinii pushed a commit to lyft/spark that referenced this pull request Oct 10, 2023
### What changes were proposed in this pull request?
Fix `catalog.listCatalogs` in PySpark

### Why are the changes needed?
existing implementation outputs incorrect results

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

before this PR:
```
In [1]: spark.catalog.listCatalogs()
Out[1]: [CatalogMetadata(name=<py4j.java_gateway.JavaMember object at 0x1031f08b0>, description=<py4j.java_gateway.JavaMember object at 0x1049ac2e0>)]
```

after this PR:
```
In [1]: spark.catalog.listCatalogs()
Out[1]: [CatalogMetadata(name='spark_catalog', description=None)]
```

### How was this patch tested?
added doctest

Closes apache#41186 from zhengruifeng/py_list_catalog.

Authored-by: Ruifeng Zheng <ruifengz@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit a232083)
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
2 participants