tustvold commented on code in PR #4098:
URL: https://github.com/apache/arrow-rs/pull/4098#discussion_r1169976013


##########
arrow-array/src/array/primitive_array.rs:
##########
@@ -320,6 +306,19 @@ impl<T: ArrowPrimitiveType> PrimitiveArray<T> {
         (self.data_type, self.values, self.nulls)
     }
 
+    /// Overrides the [`DataType`] of this [`PrimitiveArray`]
+    ///
+    /// Prefer using [`Self::with_timezone`] or 
[`Self::with_precision_and_scale`] where
+    /// the primitive type is suitably constrained, as these cannot panic
+    ///
+    /// # Panics
+    ///
+    /// Panics if ![Self::is_compatible]
+    pub fn with_data_type(self, data_type: DataType) -> Self {

Review Comment:
   I don't anticipate this getting much use, but it ensures we don't lose any 
functionality with this change



-- 
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]

Reply via email to