kyuubi/python/scripts/update_thrift_bindings.sh
Cheng Pan f8c7b93f55
[KYUUBI #5686][FOLLOWUP] Rename pyhive to python
# 🔍 Description

This is the follow-up of #5686, renaming `./pyhive` to `./python`, and also adding `**/python/*` to RAT exclusion list temporarily.

"PyHive" may not be a suitable name after being part of Apache Kyuubi, let's use a generic dir name `python`, and discuss the official name later(we probably keep the code at `./python` eventually).

## Types of changes 🔖

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

## Test Plan 🧪

Recover RAT checked.

---

# 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 #6279 from pan3793/pyhive-1.

Closes #5686

42d338e71 [Cheng Pan] [KYUUBI #5686][FOLLOWUP] Rename pyhive to python

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2024-04-09 20:30:02 +08:00

22 lines
644 B
Bash
Executable File

#!/bin/bash -eux
HIVE_VERSION='2.3.0' # Must be a released version
# Create a temporary directory
scriptdir=`dirname $0`
tmpdir=$scriptdir/.thrift_gen
# Clean up previous generation attempts, in case it breaks things
rm -rf $tmpdir
mkdir $tmpdir
# Download TCLIService.thrift from Hive
curl -o $tmpdir/TCLIService.thrift \
https://raw.githubusercontent.com/apache/hive/rel/release-$HIVE_VERSION/service-rpc/if/TCLIService.thrift
# Apply patch that adds legacy GetLog methods
patch -d $tmpdir < $scriptdir/thrift-patches/TCLIService.patch
thrift -r --gen py -out $scriptdir/../ $tmpdir/TCLIService.thrift
rm $scriptdir/../__init__.py