-
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
GH-44541: [C++] NumericArray<T> should not use ctor from parent directly #44542
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 |
cc @kou @emkornfield |
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
Would merge this in next monday if no negative comments, hope it would be in 18.0.1 @pitrou |
I merge this firstly, negative comment can by addressed later |
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 95b7181. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them. |
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