Skip to content

[SPARK-50137][SQL] Avoid fallback to Hive-incompatible ways when table creation fails by thrift exception #50985

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

Closed
wants to merge 2 commits into from

Conversation

wecharyu
Copy link
Contributor

What changes were proposed in this pull request?

Enhance the datasource table creation, do not fallback to hive incompatible way if failure was caused by thrift exception.

Why are the changes needed?

Thrift exception is unrelated to hive compatibility of datasource table, so fallback is unnecessary in this case.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Add a unit test:

mvn test -Dtest=none -Dsuites="org.apache.spark.sql.hive.HiveExternalCatalogSuite @SPARK-50137: Avoid fallback to Hive-incompatible ways on thrift exception" -pl :spark-hive_2.13

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

No.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you for resubmission, @wecharyu .

cc @sunchao

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-50137][HIVE] Avoid fallback to Hive-incompatible ways when table creation fails by thrift exception [SPARK-50137][SQL] Avoid fallback to Hive-incompatible ways when table creation fails by thrift exception May 22, 2025
dongjoon-hyun pushed a commit that referenced this pull request May 22, 2025
…e creation fails by thrift exception

### What changes were proposed in this pull request?
Enhance the datasource table creation, do not fallback to hive incompatible way if failure was caused by thrift exception.

### Why are the changes needed?
Thrift exception is unrelated to hive compatibility of datasource table, so fallback is unnecessary in this case.

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

### How was this patch tested?
Add a unit test:
```bash
mvn test -Dtest=none -Dsuites="org.apache.spark.sql.hive.HiveExternalCatalogSuite SPARK-50137: Avoid fallback to Hive-incompatible ways on thrift exception" -pl :spark-hive_2.13
```

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

Closes #50985 from wecharyu/SPARK-50137_2.

Authored-by: wecharyu <yuwq1996@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit de3d44d)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun
Copy link
Member

Merged to master/4.0.

If you want this in branch-3.5, please make a backporting PR. I couldn't backport directly because there is a code conflict, @wecharyu .

@dongjoon-hyun
Copy link
Member

I assigned SPARK-50137 to you. Thank you for your contribution.

@sunchao
Copy link
Member

sunchao commented May 22, 2025

thank you @wecharyu for the quick fix

yhuang-db pushed a commit to yhuang-db/spark that referenced this pull request Jun 9, 2025
…e creation fails by thrift exception

### What changes were proposed in this pull request?
Enhance the datasource table creation, do not fallback to hive incompatible way if failure was caused by thrift exception.

### Why are the changes needed?
Thrift exception is unrelated to hive compatibility of datasource table, so fallback is unnecessary in this case.

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

### How was this patch tested?
Add a unit test:
```bash
mvn test -Dtest=none -Dsuites="org.apache.spark.sql.hive.HiveExternalCatalogSuite SPARK-50137: Avoid fallback to Hive-incompatible ways on thrift exception" -pl :spark-hive_2.13
```

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

Closes apache#50985 from wecharyu/SPARK-50137_2.

Authored-by: wecharyu <yuwq1996@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants