-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ARROW-11277: [C++] Workaround macOS 10.11: don't default construct consts #9267
Conversation
@@ -681,7 +681,7 @@ Result<Expression> FoldConstants(Expression expr) { | |||
if (std::all_of(call->arguments.begin(), call->arguments.end(), | |||
[](const Expression& argument) { return argument.literal(); })) { | |||
// all arguments are literal; we can evaluate this subexpression *now* | |||
static const Datum ignored_input; | |||
static const Datum ignored_input = Datum{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can give Datum a default constructor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Datum has one already; resolution of that constructor is just failing here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
precisely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 since we have to deal with lousy compilers
Thanks I'm going to test this patch on top of rc2. Btw the MacOS 10.11 target be be EOL for us in april/may (but I imagine RHEL users will have the same issues....) |
Thanks confirmed this works. With this patch I can build rc2 on macos 10.11 |
…nsts ```c++ /tmp/apache-arrow-20210116-6233-1jyrhk8/apache-arrow-3.0.0/cpp/src/arrow/dataset/expression.cc /tmp/apache-arrow-20210116-6233-1jyrhk8/apache-arrow-3.0.0/cpp/src/arrow/dataset/expression.cc:684:30: error: default initialization of an object of const type 'const arrow::Datum' without a user-provided default constructor static const Datum ignored_input; ``` Datum defines a default constructor but it doesn't seem to be found for const/constexpr decls Closes #9267 from bkietz/11277-Fix-compilation-error-in- Authored-by: Benjamin Kietzman <bengilgit@gmail.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
…nsts ```c++ /tmp/apache-arrow-20210116-6233-1jyrhk8/apache-arrow-3.0.0/cpp/src/arrow/dataset/expression.cc /tmp/apache-arrow-20210116-6233-1jyrhk8/apache-arrow-3.0.0/cpp/src/arrow/dataset/expression.cc:684:30: error: default initialization of an object of const type 'const arrow::Datum' without a user-provided default constructor static const Datum ignored_input; ``` Datum defines a default constructor but it doesn't seem to be found for const/constexpr decls Closes apache#9267 from bkietz/11277-Fix-compilation-error-in- Authored-by: Benjamin Kietzman <bengilgit@gmail.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
…nsts ```c++ /tmp/apache-arrow-20210116-6233-1jyrhk8/apache-arrow-3.0.0/cpp/src/arrow/dataset/expression.cc /tmp/apache-arrow-20210116-6233-1jyrhk8/apache-arrow-3.0.0/cpp/src/arrow/dataset/expression.cc:684:30: error: default initialization of an object of const type 'const arrow::Datum' without a user-provided default constructor static const Datum ignored_input; ``` Datum defines a default constructor but it doesn't seem to be found for const/constexpr decls Closes apache#9267 from bkietz/11277-Fix-compilation-error-in- Authored-by: Benjamin Kietzman <bengilgit@gmail.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
Datum defines a default constructor but it doesn't seem to be found for const/constexpr decls