Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Aug 15, 2025

What changes were proposed in this pull request?

This PR aims to use int64_t instead of google::protobuf::int64 to follow ProtocolBuff v22.0 changes.

Fixed C++ code generation for protos that use int32_t, uint32_t, int64_t, uint64_t, size_t as field names.

Why are the changes needed?

Currently, main branch CIs are broken like the following.

/Users/runner/work/orc/orc/c++/src/io/InputStream.hh:76:31: error: no type named 'int64' in namespace 'google::protobuf'
    virtual google::protobuf::int64 ByteCount() const override;
            ~~~~~~~~~~~~~~~~~~^
/Users/runner/work/orc/orc/c++/src/io/InputStream.cc:115:21: error: no type named 'int64' in namespace 'google::protobuf'
  google::protobuf::int64 SeekableArrayInputStream::ByteCount() const {
  ~~~~~~~~~~~~~~~~~~^
/Users/runner/work/orc/orc/c++/src/io/InputStream.cc:116:42: error: no type named 'int64' in namespace 'google::protobuf'
    return static_cast<google::protobuf::int64>(position_);
                       ~~~~~~~~~~~~~~~~~~^
3 errors generated.
make[2]: *** [c++/src/CMakeFiles/orc.dir/io/InputStream.cc.o] Error 1

How was this patch tested?

Pass the CIs.

Was this patch authored or co-authored using generative AI tooling?

No.

@dongjoon-hyun dongjoon-hyun changed the title ORC-1973: [C++] Use int64_t instead of google::protobuf::int64 ORC-1973: [C++] Use int64_t instead of google::protobuf::int64 for Protobuf v22+ Aug 15, 2025
@dongjoon-hyun dongjoon-hyun changed the title ORC-1973: [C++] Use int64_t instead of google::protobuf::int64 for Protobuf v22+ ORC-1973: [C++] Use int64_t instead of google::protobuf::int64 for Protobu v22+ Aug 15, 2025
@dongjoon-hyun dongjoon-hyun changed the title ORC-1973: [C++] Use int64_t instead of google::protobuf::int64 for Protobu v22+ ORC-1973: [C++] Use int64_t instead of google::protobuf::int64 for Protobuf v22+ Aug 15, 2025
@dongjoon-hyun
Copy link
Member Author

All tests passed except the debug string issue. It will be resolved independently in ORC-1973 .

 Raw file tail: /Users/runner/work/orc/orc/examples/orc_split_elim.orc
+goo.gle/debugproto    

@dongjoon-hyun dongjoon-hyun modified the milestones: 2.2.1, 2.0.7, 2.1.4 Aug 15, 2025
@dongjoon-hyun
Copy link
Member Author

cc @wgtmac and @williamhyun

@dongjoon-hyun
Copy link
Member Author

Let me merge this to recover the CIs.

dongjoon-hyun added a commit that referenced this pull request Aug 15, 2025
…r `Protobuf` v22+

### What changes were proposed in this pull request?

This PR aims to use `int64_t` instead of `google::protobuf::int64` to follow ProtocolBuff v22.0 changes.

- https://github.com/protocolbuffers/protobuf/releases/tag/v22.0

> Fixed C++ code generation for protos that use int32_t, uint32_t, int64_t, uint64_t, size_t as field names.

### Why are the changes needed?

Currently, `main` branch CIs are broken like the following.
- #2356
  - https://github.com/apache/orc/actions/runs/16997271813/job/48190883401?pr=2356

```
/Users/runner/work/orc/orc/c++/src/io/InputStream.hh:76:31: error: no type named 'int64' in namespace 'google::protobuf'
    virtual google::protobuf::int64 ByteCount() const override;
            ~~~~~~~~~~~~~~~~~~^
/Users/runner/work/orc/orc/c++/src/io/InputStream.cc:115:21: error: no type named 'int64' in namespace 'google::protobuf'
  google::protobuf::int64 SeekableArrayInputStream::ByteCount() const {
  ~~~~~~~~~~~~~~~~~~^
/Users/runner/work/orc/orc/c++/src/io/InputStream.cc:116:42: error: no type named 'int64' in namespace 'google::protobuf'
    return static_cast<google::protobuf::int64>(position_);
                       ~~~~~~~~~~~~~~~~~~^
3 errors generated.
make[2]: *** [c++/src/CMakeFiles/orc.dir/io/InputStream.cc.o] Error 1
```

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #2357 from dongjoon-hyun/ORC-1973.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 972f858)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun dongjoon-hyun deleted the ORC-1973 branch August 15, 2025 20:16
@dongjoon-hyun
Copy link
Member Author

Merged to main/2.2.

raulcd pushed a commit to apache/arrow that referenced this pull request Aug 25, 2025
#47408)

### Rationale for this change

apache/orc#2357 is needed for recent Protobuf.

### What changes are included in this PR?

* Update bundled Apache ORC to 2.2.0.
  *  apache/orc#2345 is needed for MSVC.
* Apply apache/orc#2357 because it's not released yet.
* Enable `CMP0077` for bundled dependencies by default to avoid `set(CACHE)`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* GitHub Issue: #47399

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
dongjoon-hyun added a commit to dongjoon-hyun/orc that referenced this pull request Sep 12, 2025
…r `Protobuf` v22+

### What changes were proposed in this pull request?

This PR aims to use `int64_t` instead of `google::protobuf::int64` to follow ProtocolBuff v22.0 changes.

- https://github.com/protocolbuffers/protobuf/releases/tag/v22.0

> Fixed C++ code generation for protos that use int32_t, uint32_t, int64_t, uint64_t, size_t as field names.

### Why are the changes needed?

Currently, `main` branch CIs are broken like the following.
- apache#2356
  - https://github.com/apache/orc/actions/runs/16997271813/job/48190883401?pr=2356

```
/Users/runner/work/orc/orc/c++/src/io/InputStream.hh:76:31: error: no type named 'int64' in namespace 'google::protobuf'
    virtual google::protobuf::int64 ByteCount() const override;
            ~~~~~~~~~~~~~~~~~~^
/Users/runner/work/orc/orc/c++/src/io/InputStream.cc:115:21: error: no type named 'int64' in namespace 'google::protobuf'
  google::protobuf::int64 SeekableArrayInputStream::ByteCount() const {
  ~~~~~~~~~~~~~~~~~~^
/Users/runner/work/orc/orc/c++/src/io/InputStream.cc:116:42: error: no type named 'int64' in namespace 'google::protobuf'
    return static_cast<google::protobuf::int64>(position_);
                       ~~~~~~~~~~~~~~~~~~^
3 errors generated.
make[2]: *** [c++/src/CMakeFiles/orc.dir/io/InputStream.cc.o] Error 1
```

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#2357 from dongjoon-hyun/ORC-1973.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 972f858)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit b124466)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
gitmodimo pushed a commit to gitmodimo/arrow that referenced this pull request Oct 2, 2025
…f patch (apache#47408)

### Rationale for this change

apache/orc#2357 is needed for recent Protobuf.

### What changes are included in this PR?

* Update bundled Apache ORC to 2.2.0.
  *  apache/orc#2345 is needed for MSVC.
* Apply apache/orc#2357 because it's not released yet.
* Enable `CMP0077` for bundled dependencies by default to avoid `set(CACHE)`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* GitHub Issue: apache#47399

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant