Skip to content

Conversation

@bkietz
Copy link
Member

@bkietz bkietz commented Jan 19, 2021

/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

[](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{};
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

https://github.com/bkietz/arrow/blob/17f2df78f1fa623d05dd01f245f8f65f828f510d/cpp/src/arrow/datum.h#L118-L119

Datum has one already; resolution of that constructor is just failing here

Copy link
Member

Choose a reason for hiding this comment

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

Uh.

Copy link
Member Author

Choose a reason for hiding this comment

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

precisely

Copy link
Member

@pitrou pitrou left a 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

@jeroen
Copy link
Contributor

jeroen commented Jan 19, 2021

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....)

@jeroen
Copy link
Contributor

jeroen commented Jan 19, 2021

Thanks confirmed this works. With this patch I can build rc2 on macos 10.11

@github-actions
Copy link

kszucs pushed a commit that referenced this pull request Jan 25, 2021
…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>
@bkietz bkietz deleted the 11277-Fix-compilation-error-in- branch February 25, 2021 16:11
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.

3 participants