Skip to content

Commit

Permalink
apacheGH-37379: [C++][Parquet] Thrift: Generate movable types (apache…
Browse files Browse the repository at this point in the history
…#37461)

### Rationale for this change

Our generated Thrift bindings do not define move constructors, implying that copies are made when passing values around.

### What changes are included in this PR?

Enable the `moveable_types` option when generating Parquet Thrift.   It's introduced in Thrift 0.9.3 ( See apache/thrift@3c5a788 )

Also, exploit move construction and assignment to improve `TypedColumnIndex` construction performance.

### Are these changes tested?

By existing tests.

### Are there any user-facing changes?

1. Binary might grow larger
2. Some overhead might be reduced

* Closes: apache#37379

Authored-by: mwish <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
  • Loading branch information
mapleFU authored Aug 30, 2023
1 parent 4ee6688 commit edb5e09
Show file tree
Hide file tree
Showing 4 changed files with 1,419 additions and 687 deletions.
2 changes: 1 addition & 1 deletion cpp/build-support/update-thrift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@

# Run this from cpp/ directory. thrift is expected to be in your path

thrift --gen cpp -out src/generated src/parquet/parquet.thrift
thrift --gen cpp:moveable_types -out src/generated src/parquet/parquet.thrift
Loading

0 comments on commit edb5e09

Please sign in to comment.