pitrou commented on code in PR #44053:
URL: https://github.com/apache/arrow/pull/44053#discussion_r1753662844
##########
cpp/src/arrow/compute/row/grouper.cc:
##########
@@ -170,42 +169,137 @@ struct SimpleKeySegmenter : public BaseRowSegmenter {
return extends;
}
- Result<Segment> GetNextSegment(const Scalar& scalar, int64_t offset, int64_t
length) {
+ ARROW_DEPRECATED("Deprecated in 18.0.0 along with GetSegments.")
+ Result<Segment> GetNextSegmentDeprecated(const Scalar& scalar, int64_t
offset,
+ int64_t length) {
+ ARROW_SUPPRESS_DEPRECATION_WARNING
ARROW_RETURN_NOT_OK(CheckType(*scalar.type));
if (!scalar.is_valid) {
return Status::Invalid("segmenting an invalid scalar");
}
auto data = checked_cast<const PrimitiveScalarBase&>(scalar).data();
- bool extends = length > 0 ? Extend(data) : kEmptyExtends;
+ bool extends = length > 0 ? ExtendDeprecated(data) : kEmptyExtends;
return MakeSegment(length, offset, length, extends);
+ ARROW_UNSUPPRESS_DEPRECATION_WARNING
}
- Result<Segment> GetNextSegment(const DataType& array_type, const uint8_t*
array_bytes,
- int64_t offset, int64_t length) {
+ ARROW_DEPRECATED("Deprecated in 18.0.0 along with GetSegments.")
+ Result<Segment> GetNextSegmentDeprecated(const DataType& array_type,
+ const uint8_t* array_bytes, int64_t
offset,
+ int64_t length) {
+ ARROW_SUPPRESS_DEPRECATION_WARNING
RETURN_NOT_OK(CheckType(array_type));
DCHECK_LE(offset, length);
int64_t byte_width = array_type.byte_width();
int64_t match_length = GetMatchLength(array_bytes + offset * byte_width,
byte_width,
array_bytes, offset, length);
- bool extends = length > 0 ? Extend(array_bytes + offset * byte_width) :
kEmptyExtends;
+ bool extends =
+ length > 0 ? ExtendDeprecated(array_bytes + offset * byte_width) :
kEmptyExtends;
return MakeSegment(length, offset, match_length, extends);
+ ARROW_UNSUPPRESS_DEPRECATION_WARNING
}
+ ARROW_DEPRECATED("Deprecated in 18.0.0. Use GetSegments instead.")
Review Comment:
It's already in the declaration, is it useful to duplicate the deprecation
here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]