klion26 commented on code in PR #8149:
URL: https://github.com/apache/arrow-rs/pull/8149#discussion_r2278895165


##########
parquet-variant/src/builder.rs:
##########
@@ -198,6 +199,23 @@ impl ValueBuffer {
         self.append_slice(&micros_from_midnight.to_le_bytes());
     }
 
+    fn append_timestamp_nanos(&mut self, value: chrono::DateTime<chrono::Utc>) 
{
+        self.append_primitive_header(VariantPrimitiveType::TimestampNanos);
+        let nanos = value.timestamp_nanos_opt().unwrap();
+        self.append_slice(&nanos.to_le_bytes());
+    }
+
+    fn append_timestamp_ntz_nanos(&mut self, value: chrono::NaiveDateTime) {
+        self.append_primitive_header(VariantPrimitiveType::TimestampNtzNanos);
+        let nanos = value.and_utc().timestamp_nanos_opt().unwrap();
+        self.append_slice(&nanos.to_le_bytes());
+    }
+
+    fn append_uuid(&mut self, value: Uuid) {
+        self.append_primitive_header(VariantPrimitiveType::Uuid);

Review Comment:
   UUID is stored as big-endian



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