Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/.licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ header:
- 'requirements.txt'
- 'src/iceberg/util/murmurhash3_internal.*'
- 'src/iceberg/test/resources/**'
- 'src/iceberg/catalog/hive/gen-cpp/**'
- 'thirdparty/**'

comment: on-failure
2 changes: 1 addition & 1 deletion .github/workflows/cpp-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
files-changed-only: true
lines-changed-only: true
thread-comments: true
ignore: 'build|cmake_modules|ci'
ignore: 'build|cmake_modules|ci|src/iceberg/catalog/hive/gen-cpp'
database: build
verbosity: 'debug'
# need '-fno-builtin-std-forward_like', see https://github.com/llvm/llvm-project/issues/101614
Expand Down
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,19 @@ repos:
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: ^src/iceberg/catalog/hive/gen-cpp/
- id: end-of-file-fixer
exclude: ^src/iceberg/catalog/hive/gen-cpp/
- id: check-yaml
- id: check-added-large-files
exclude: ^src/iceberg/catalog/hive/gen-cpp/

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.8
hooks:
- id: clang-format
exclude_types: [json]
exclude: ^src/iceberg/catalog/hive/gen-cpp/

- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.10
Expand Down
45 changes: 45 additions & 0 deletions dev/update_hive_thrift.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Regenerate the committed Hive Metastore C++ bindings from the vendored
# Thrift IDL. Run this whenever thirdparty/hive_metastore/*.thrift changes.
# Requires the Apache Thrift IDL compiler ("thrift") on PATH; the generated
# sources are checked in so a normal build needs no Thrift compiler.

set -euo pipefail

repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
idl_dir="${repo_root}/thirdparty/hive_metastore"
out_dir="${repo_root}/src/iceberg/catalog/hive/gen-cpp"

if ! command -v thrift >/dev/null 2>&1; then
echo "error: 'thrift' IDL compiler not found on PATH" >&2
echo " install it (e.g. 'brew install thrift' or 'apt install thrift-compiler')" >&2
exit 1
fi

rm -rf "${out_dir}"
mkdir -p "${out_dir}"

# -r recurses into included IDL (fb303); cpp:no_skeleton omits server stubs.
thrift -r --gen cpp:no_skeleton -out "${out_dir}" \
-I "${idl_dir}" "${idl_dir}/hive_metastore.thrift"

echo "Regenerated Hive Metastore bindings in ${out_dir}"
echo "Review the diff and commit the result."
Loading
Loading