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

HIVE-27815: Support update numModifiedRows #4819

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

wangyum
Copy link
Member

@wangyum wangyum commented Oct 21, 2023

What changes were proposed in this pull request?

This PR updates getUpdateCount() in HiveStatement.

Why are the changes needed?

Support update numModifiedRows if TGetOperationStatusResp contains this value.

Does this PR introduce any user-facing change?

No.

Is the change a dependency upgrade?

No.

How was this patch tested?

Manual test:

  1. Upgrade Spark's hive-service-rpc to 4.0.0-beta-1.
  2. Port HIVE-14388 to Spark.
  3. Execute the code:
val conn = DriverManager.getConnection("jdbc:hive2://localhost:10000/")
val stmt = conn.createStatement()
stmt.execute("insert into t select * from range(100);")
println(stmt.getUpdateCount)

@wangyum
Copy link
Member Author

wangyum commented Oct 23, 2023

cc @sunchao @pan3793

Copy link
Member

@sunchao sunchao left a comment

Choose a reason for hiding this comment

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

LGTM

@sunchao sunchao merged commit dc41acd into apache:branch-2.3 Oct 26, 2023
1 check failed
@sunchao
Copy link
Member

sunchao commented Oct 26, 2023

Merged, thanks @wangyum !

@wangyum wangyum deleted the HIVE-27815 branch October 26, 2023 03:25
@wangyum
Copy link
Member Author

wangyum commented Oct 26, 2023

Thank you @sunchao

pan3793 added a commit to apache/kyuubi that referenced this pull request Aug 26, 2024
# 🔍 Description

Backport apache/hive#4819

Note: it's only the JDBC driver side change, to make it work, we also need to modify the engines.

## Types of changes 🔖

- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

We can not test this feature so far because we don't have engine support that. Pass GHA to ensure it breaks nothing.

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6639 from pan3793/HIVE-27815.

Closes #6639

4b3bcd6 [Cheng Pan] fix
c16dc28 [Cheng Pan] Port HIVE-27815: Support update numModifiedRows

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@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