Ten0 commented on code in PR #1900:
URL: https://github.com/apache/avro/pull/1900#discussion_r1051679417
##########
lang/rust/avro/src/ser.rs:
##########
@@ -17,9 +17,24 @@
//! Logic for serde-compatible serialization.
use crate::{types::Value, Error};
+use ref_thread_local::{ref_thread_local, RefThreadLocal};
use serde::{ser, Serialize};
use std::{collections::HashMap, iter::once};
+ref_thread_local! {
+ /// A thread local that is used to decide how to serialize
+ /// a byte array into Avro `types::Value`.
+ ///
+ /// Depends on the fact that serde's serialization process is
single-threaded!
Review Comment:
Ah I see why this isn't possible now ^^' (had not analyzed in detail before)
Hmm I've added a comment at
https://issues.apache.org/jira/browse/AVRO-3631?focusedCommentId=17649103&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17649103
that suggests an alternate implementation (where we simply add knowledge about
the schema).
--
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]