-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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-44541: [C++] NumericArray<T> should not use ctor from parent directly #44542
base: main
Are you sure you want to change the base?
Conversation
|
a8169c4
to
1896d63
Compare
@@ -119,8 +129,6 @@ class NumericArray : public PrimitiveArray { | |||
IteratorType end() const { return IteratorType(*this, length()); } | |||
|
|||
protected: | |||
using PrimitiveArray::PrimitiveArray; |
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.
Do we need to add NumericArray()
if this line is deleted?
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.
Nice catch 🤔
@@ -585,6 +585,18 @@ TEST_F(TestArray, TestValidateNullCount) { | |||
} | |||
} | |||
|
|||
TEST_F(TestArray, TestValidValues) { |
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.
Should we add a test case for TimestampArray specifically?
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.
done
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. Thanks!
@@ -119,7 +129,7 @@ class NumericArray : public PrimitiveArray { | |||
IteratorType end() const { return IteratorType(*this, length()); } | |||
|
|||
protected: |
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.
The use of protected
is odd here; nothing inherits from NumericArray inside arrow. Is it intended to support user subclassing of NumericArray? Or could we just mark NumericArray final? @pitrou
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.
This might keep same style from PrimitiveArray
, which initializes raw_values_
in ctor. Don't know should we change here
Gentle ping @pitrou |
Rationale for this change
See #44541
What changes are included in this PR?
NumericArray<T>
not using child's ctor.Are these changes tested?
Yes
Are there any user-facing changes?
Bugfix