This is an automated email from the ASF dual-hosted git repository.
Jefffrey pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/main by this push:
new 005a2fd43f chore: fix `.gitattributes` and remove parquet `regen.sh`
(#10459)
005a2fd43f is described below
commit 005a2fd43f1b243ed43f4cfa356ebe8f0757939b
Author: Jeffrey Vo <[email protected]>
AuthorDate: Wed Jul 29 19:32:00 2026 +0900
chore: fix `.gitattributes` and remove parquet `regen.sh` (#10459)
Add `arrow-ipc` generated files to be marked as linguist-generated, also
remove the parquet thrift line and also remove its regen.sh which I
think is unused?
references:
- https://github.com/apache/arrow-rs/pull/8530
- https://github.com/apache/arrow-rs/issues/8572
---
.gitattributes | 2 +-
parquet/CONTRIBUTING.md | 6 ------
parquet/regen.sh | 44 --------------------------------------------
3 files changed, 1 insertion(+), 51 deletions(-)
diff --git a/.gitattributes b/.gitattributes
index b7b0d51ff4..ff474e9bd8 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,3 @@
-parquet/src/format.rs linguist-generated
arrow-flight/src/arrow.flight.protocol.rs linguist-generated
arrow-flight/src/sql/arrow.flight.protocol.sql.rs linguist-generated
+arrow-ipc/src/gen/*.rs linguist-generated
diff --git a/parquet/CONTRIBUTING.md b/parquet/CONTRIBUTING.md
index 922332b15d..febe57e56d 100644
--- a/parquet/CONTRIBUTING.md
+++ b/parquet/CONTRIBUTING.md
@@ -61,9 +61,3 @@ To build documentation, run `cargo doc --no-deps
--all-features`.
To compile and view in the browser, run `cargo doc --no-deps --all-features
--open`.
Before submitting a pull request, run `cargo fmt --all` to format the change.
-
-## Update Parquet Format
-
-To generate the parquet format (thrift definitions) code run
[`./regen.sh`](./regen.sh).
-
-You may need to manually patch up doc comments that contain unescaped `[]`
diff --git a/parquet/regen.sh b/parquet/regen.sh
deleted file mode 100755
index 1f2aee91bb..0000000000
--- a/parquet/regen.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/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.
-
-# using commit for parquet-format 2.11.0
-REVISION=848302e179d7bb52a64caea6a058b3c08212787c
-
-SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
-
-COMMENT='//! See [`crate::file`] for easier to use APIs.'
-
-# Note: add argument --platform=linux/amd64 to run on mac
-docker run -v $SOURCE_DIR:/thrift -it archlinux /bin/bash -c "\
- pacman -Sy --noconfirm wget thrift && \
- wget
https://raw.githubusercontent.com/apache/parquet-format/$REVISION/src/main/thrift/parquet.thrift
-O /tmp/parquet.thrift && \
- thrift --gen rs /tmp/parquet.thrift && \
- echo 'Removing TProcessor' && \
- sed -i '/use thrift::server::TProcessor;/d' parquet.rs && \
- echo 'Replacing TSerializable' && \
- sed -i 's/impl TSerializable for/impl crate::thrift::TSerializable for/g'
parquet.rs && \
- echo 'Rewriting write_to_out_protocol' && \
- sed -i 's/fn write_to_out_protocol(&self, o_prot: &mut dyn
TOutputProtocol)/fn write_to_out_protocol<T: TOutputProtocol>(\&self, o_prot:
\&mut T)/g' parquet.rs && \
- echo 'Rewriting read_from_in_protocol' && \
- sed -i 's/fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol)/fn
read_from_in_protocol<T: TInputProtocol>(i_prot: \&mut T)/g' parquet.rs && \
- echo 'Rewriting return value expectations' && \
- sed -i 's/Ok(ret.expect(\"return value should have been
constructed\"))/ret.ok_or_else(||
thrift::Error::Protocol(ProtocolError::new(ProtocolErrorKind::InvalidData,
\"return value should have been constructed\")))/g' parquet.rs && \
- sed -i '1i${COMMENT}' parquet.rs && \
- mv parquet.rs /thrift/src/format.rs
- "