You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/01/17 15:40:38 UTC

[GitHub] [arrow-rs] alamb commented on a change in pull request #1172: Support DecimalType in `sort` and `take` kernels

alamb commented on a change in pull request #1172:
URL: https://github.com/apache/arrow-rs/pull/1172#discussion_r786118258



##########
File path: arrow/src/compute/kernels/take.rs
##########
@@ -483,6 +487,38 @@ where
     Ok((buffer, nulls))
 }
 
+/// `take` implementation for decimal arrays
+fn take_decimal128<IndexType>(
+    decimal_values: &DecimalArray,
+    indices: &PrimitiveArray<IndexType>,
+) -> Result<DecimalArray>
+where
+    IndexType: ArrowNumericType,
+    IndexType::Native: ToPrimitive,
+{
+    // TODO optimize decimal take and construct decimal array from MutableBuffer

Review comment:
       This would be a great follow on task / PR for someone -- I'll file a ticket




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org