jayzhan211 commented on code in PR #26039:
URL: https://github.com/apache/datafusion/pull/26039#discussion_r4184841985
##########
datafusion/functions/src/strings.rs:
##########
@@ -1217,6 +1219,73 @@ pub(crate) fn append_view(
views_buffer.push(sub_view);
}
+/// Values of at most this many bytes are stored inline in their view.
+const MAX_INLINE_LEN: usize = MAX_INLINE_VIEW_LEN as usize;
Review Comment:
nit: `MAX_INLINE_LEN` could be `pub(crate)` and reused in
`unicode/common.rs`, which currently re-casts `MAX_INLINE_VIEW_LEN as usize`
(rustfmt/clippy clean):
```diff
-const MAX_INLINE_LEN: usize = MAX_INLINE_VIEW_LEN as usize;
+pub(crate) const MAX_INLINE_LEN: usize = MAX_INLINE_VIEW_LEN as usize;
```
```diff
-use crate::strings::sub_view;
+use crate::strings::{MAX_INLINE_LEN, sub_view};
use arrow::array::{
- Array, ArrayRef, GenericStringArray, Int64Array, MAX_INLINE_VIEW_LEN,
- OffsetSizeTrait, StringViewArray,
+ Array, ArrayRef, GenericStringArray, Int64Array, OffsetSizeTrait,
StringViewArray,
};
@@
- if range.len() > MAX_INLINE_VIEW_LEN as usize {
+ if range.len() > MAX_INLINE_LEN {
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]