Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-36927: [Java][Docs] Enable Gandiva build as part of Java maven commands #36929

Merged
merged 3 commits into from
Aug 1, 2023

Conversation

davisusanibar
Copy link
Contributor

@davisusanibar davisusanibar commented Jul 28, 2023

Rationale for this change

To close: #36927

What changes are included in this PR?

  • Enable MacOS Gandiva build as part of Java maven commands
  • Enable Windows ORC build as part of Java maven commands

Are these changes tested?

Yes:

  • Gandiva: mvn generate-resources -Pgenerate-libs-jni-macos-linux -N
  • ORC: mvn generate-resources -Pgenerate-libs-jni-windows -N

Are there any user-facing changes?

No

@github-actions github-actions bot added the awaiting review Awaiting review label Jul 28, 2023
@github-actions
Copy link

⚠️ GitHub issue #36927 has been automatically assigned in GitHub to PR creator.

@davisusanibar
Copy link
Contributor Author

Hi @danepitkin please could you help me to validate if this changes works properly on your OS environment?

Steps:

  1. Make sure the local folder used by Java mvn commands is clean::
    $ cd arrow
    $ rm -rf cpp-jni java-dist java-jni
  2. Build MacOS artifacts:
    $ mvn generate-resources -Pgenerate-libs-jni-macos-linux -N

Thank you in advance.

<ARROW_CSV>ON</ARROW_CSV>
<ARROW_ORC>OFF</ARROW_ORC>
<ARROW_DATASET>ON</ARROW_DATASET>
<ARROW_GANDIVA>OFF</ARROW_GANDIVA>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ARROW_GANDIVA is accidentally set to OFF here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or is it not supported on Windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't have JNI yet because we need to install LLVM to build Gandiva (Could NOT find LLVM (missing: LLVM_DIR)).

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Jul 28, 2023
@danepitkin
Copy link
Member

danepitkin commented Jul 28, 2023

Hi @danepitkin please could you help me to validate if this changes works properly on your OS environment?

Steps:

  1. Make sure the local folder used by Java mvn commands is clean::
    $ cd arrow
    $ rm -rf cpp-jni java-dist java-jni
  2. Build MacOS artifacts:
    $ mvn generate-resources -Pgenerate-libs-jni-macos-linux -N

Thank you in advance.

Works for me! I checked out your branch, deleted local artifacts, and can confirm it successfully built dataset/gandiva/orc modules.

Copy link
Member

@danepitkin danepitkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. Thanks @davisusanibar !

Comment on lines +1073 to +1074
-DProtobuf_USE_STATIC_LIBS=ON
-DProtobuf_ROOT=${project.basedir}/../cpp-jni/protobuf_ep-install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, why are we making this change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, is this for https://github.com/apache/arrow/blob/main/java/gandiva/CMakeLists.txt#L41 ?

We can use this solution for now but we should find a better solution that doesn't require additional CMake options such as Protobuf_ROOT and Protobuf_USE_STATIC_LIBS. Could you open an issue for it?
(We may add support for installing bundled protoc for this case.)

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

java/pom.xml Outdated
Comment on lines 1152 to 1154
-DPARQUET_BUILD_EXAMPLES=OFF
-DPARQUET_BUILD_EXECUTABLES=OFF
-DPARQUET_REQUIRE_ENCRYPTION=OFF
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: They are not harmful but they are redundant because they are OFF by default.

Comment on lines 274 to 276
-DPARQUET_BUILD_EXAMPLES=OFF ^
-DPARQUET_BUILD_EXECUTABLES=OFF ^
-DPARQUET_REQUIRE_ENCRYPTION=OFF ^
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: They are not harmful but they are redundant because they are OFF by default.

@@ -227,6 +223,7 @@ CMake
-DCMAKE_INSTALL_PREFIX=java-dist \
-DCMAKE_UNITY_BUILD=ON
$ cmake --build cpp-jni --target install --config Release
$ export JAVA_JNI_CMAKE_ARGS="-DProtobuf_ROOT=$PWD/cpp-jni/protobuf_ep-install"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to specify this in the following cmake ... command line because JAVA_JNI_CMAKE_ARGS is only for ci/scripts/java_*_build.sh.

Comment on lines +1073 to +1074
-DProtobuf_USE_STATIC_LIBS=ON
-DProtobuf_ROOT=${project.basedir}/../cpp-jni/protobuf_ep-install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, is this for https://github.com/apache/arrow/blob/main/java/gandiva/CMakeLists.txt#L41 ?

We can use this solution for now but we should find a better solution that doesn't require additional CMake options such as Protobuf_ROOT and Protobuf_USE_STATIC_LIBS. Could you open an issue for it?
(We may add support for installing bundled protoc for this case.)

@github-actions github-actions bot added awaiting merge Awaiting merge awaiting review Awaiting review and removed awaiting committer review Awaiting committer review labels Jul 28, 2023
@github-actions github-actions bot added awaiting review Awaiting review and removed awaiting review Awaiting review awaiting merge Awaiting merge labels Jul 31, 2023
@davisusanibar
Copy link
Contributor Author

Issues open for:

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@github-actions github-actions bot added awaiting changes Awaiting changes awaiting change review Awaiting change review and removed awaiting review Awaiting review awaiting changes Awaiting changes labels Aug 1, 2023
@kou kou merged commit 8273f7a into apache:main Aug 1, 2023
16 checks passed
@kou kou removed the awaiting change review Awaiting change review label Aug 1, 2023
@github-actions github-actions bot added the awaiting merge Awaiting merge label Aug 1, 2023
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit 8273f7a.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

R-JunmingChen pushed a commit to R-JunmingChen/arrow that referenced this pull request Aug 20, 2023
…en commands (apache#36929)

### Rationale for this change

To close: apache#36927

### What changes are included in this PR?

- Enable MacOS Gandiva build as part of Java maven commands
- Enable Windows ORC build as part of Java maven commands

### Are these changes tested?

Yes:
- Gandiva: mvn generate-resources -Pgenerate-libs-jni-macos-linux -N
- ORC: mvn generate-resources -Pgenerate-libs-jni-windows -N

### Are there any user-facing changes?

No
* Closes: apache#36927

Lead-authored-by: david dali susanibar arce <davi.sarces@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…en commands (apache#36929)

### Rationale for this change

To close: apache#36927

### What changes are included in this PR?

- Enable MacOS Gandiva build as part of Java maven commands
- Enable Windows ORC build as part of Java maven commands

### Are these changes tested?

Yes:
- Gandiva: mvn generate-resources -Pgenerate-libs-jni-macos-linux -N
- ORC: mvn generate-resources -Pgenerate-libs-jni-windows -N

### Are there any user-facing changes?

No
* Closes: apache#36927

Lead-authored-by: david dali susanibar arce <davi.sarces@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Java][Docs] Enable Gandiva build as part of Java maven commands
3 participants