Skip to content

ARROW-10541: [C++] Add re2 library to core arrow / ARROW_WITH_RE2 - #8756

Closed
xhochy wants to merge 7 commits into
apache:masterfrom
xhochy:ARROW-10541
Closed

ARROW-10541: [C++] Add re2 library to core arrow / ARROW_WITH_RE2#8756
xhochy wants to merge 7 commits into
apache:masterfrom
xhochy:ARROW-10541

Conversation

@xhochy

Copy link
Copy Markdown
Member

No description provided.

@github-actions

Copy link
Copy Markdown

@xhochy

Copy link
Copy Markdown
MemberAuthor

@github-actions autotune everything

define_option(ARROW_WITH_UTF8PROC
"Build with support for Unicode properties using the utf8proc library" ON)
define_option(ARROW_WITH_RE2
"Build with support for regular expressions using the re2 library" ON)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I find this confusing. I understand how it works--if ARROW_COMPUTE is on, these are on too unless you set them to OFF--but it looks like they're always built by default, unlike the compression libs listed above.

Maybe it's irrelevant that it looks confusing here. Or maybe at least we should add a comment here explaining how the default is really ON iff ARROW_COMPUTE is ON too. Or is it possible to define the default option here to be literally whatever ARROW_COMPUTE is, like define_option(ARROW_WITH_RE2 "..." ARROW_COMPUTE)?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

This is sadly the prettiest solution I can think of at the moment. You can define conditional options in CMake but they only make sense based on attributes that are not set by the user but the environment (e.g. which operating system).

I'll add a comment to this and the above option explaining that they are only used in certain situations.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Instead of a comment could that explanation be a parenthesis of the description for this option?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

@bkietz Done 👍

@xhochy
xhochy marked this pull request as ready for review November 25, 2020 13:25
@xhochy

Copy link
Copy Markdown
MemberAuthor

Everything failing in #8759 is past the CMake additions I did here, so this should be good to go.

@maartenbreddels

Copy link
Copy Markdown
Contributor

#8459 builds on Travis, looking good 👍

Comment threadcpp/CMakeLists.txt

if(ARROW_GANDIVA)
set(ARROW_WITH_RE2 ON)
endif()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How about forcing to enable/disable ARROW_WITH_RE2 in ThridpartyToolchain.cmake like ARROW_WITH_THRIFT?

Comment threadcpp/CMakeLists.txt Outdated
"Build with support for Unicode properties using the utf8proc library" ON)
"Build with support for Unicode properties using the utf8proc library (only used if ARROW_COMPUTE is ON)" ON)
define_option(ARROW_WITH_RE2
"Build with support for regular expressions using the re2 library (only used if ARROW_COMPUTE or ARROW_GANDIVA is ON)" ON)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can remove ARROW_WITH_UTF8PROC and ARROW_WITH_RE2 if we set them in ThirdpartyToolchain.cmake internally like ARROW_WITH_THRIFT.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

No, the difference to ARROW_WITH_THRIFT is that you can still build ARROW_COMPUTE even if ARROW_WITH_UTF8PROC=OFF. In that case, only some features of compute won't be build but the majority will work.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I understand.

xhochyand others added 2 commits November 26, 2020 11:46
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
@xhochy

Copy link
Copy Markdown
MemberAuthor

@github-actions autotune

@xhochyxhochy closed this Nov 26, 2020
@xhochyxhochy reopened this Nov 26, 2020
kou
kou approved these changes Nov 27, 2020

@koukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

@koukou closed this in 1b51b71Nov 27, 2020
kou added a commit to kou/arrow that referenced this pull request Nov 27, 2020
Because we require RE2 with ARROW_COMPUTE by default.
See also: ARROW-10541 and apache#8756
pitrou pushed a commit that referenced this pull request Nov 30, 2020
Because we require RE2 with ARROW_COMPUTE by default.
See also: ARROW-10541 and #8756Closes#8786 from kou/cpp-example-static
Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
Sign up for freeto 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.

5 participants

@xhochy@maartenbreddels@kou@bkietz@nealrichardson