GregBowyer commented on a change in pull request #8698:
URL: https://github.com/apache/arrow/pull/8698#discussion_r534653577



##########
File path: rust/parquet/src/data_type.rs
##########
@@ -492,8 +579,14 @@ pub(crate) mod private {
         + super::SliceAsBytes
         + PartialOrd
     {
-        /// Return the most primitive version of encoding a given type
-        fn encoded(&self) -> EncodedValue<'_>;
+        /// Encode the value directly from a higher level encoder
+        fn encode<W: std::io::Write>(values: &[Self], writer: &mut W, 
bit_writer: &mut BitWriter) -> Result<()>;

Review comment:
       Performance notes:
   
   This is similar to specialisation in that it makes the required behaviours 
part of the trait implementation for the actual data carrying types in the code.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to