You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "martin-g (via GitHub)" <gi...@apache.org> on 2026/01/19 10:34:39 UTC
Re: [PR] fix: Calculate the RecordSchema's `lookup` table on build [avro-rs]
martin-g commented on code in PR #411:
URL: https://github.com/apache/avro-rs/pull/411#discussion_r2704180911
##########
avro/src/schema/record/schema.rs:
##########
@@ -49,3 +59,105 @@ pub(crate) enum RecordSchemaParseLocation {
/// When the parse is happening inside a record field
FromField,
}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use crate::Schema;
+ use apache_avro_test_helper::TestResult;
+ use pretty_assertions::assert_eq;
+
+ #[test]
+ fn avro_rs_403_record_schema_builder_no_fields() -> TestResult {
+ let name = Name::new("TestRecord")?;
+
+ let record_schema = RecordSchema::builder()
+ .name(name.clone())
+ .fields(vec![])
Review Comment:
I does not make much sense to have a RecordSchema without fields but it was possible until now, so I left it as is.
--
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: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org