[
https://issues.apache.org/jira/browse/AVRO-2211?focusedWorklogId=744791&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-744791
]
ASF GitHub Bot logged work on AVRO-2211:
----------------------------------------
Author: ASF GitHub Bot
Created on: 20/Mar/22 22:34
Start Date: 20/Mar/22 22:34
Worklog Time Spent: 10m
Work Description: yanivru commented on a change in pull request #1597:
URL: https://github.com/apache/avro/pull/1597#discussion_r830683481
##########
File path: lang/csharp/src/apache/main/Schema/RecordSchema.cs
##########
@@ -28,10 +29,28 @@ namespace Avro
/// </summary>
public class RecordSchema : NamedSchema
{
+ private List<Field> fields;
+
/// <summary>
/// List of fields in the record
/// </summary>
- public List<Field> Fields { get; private set; }
+ public List<Field> Fields
+ {
+ get
+ {
+ return fields;
+ }
+
+ set
+ {
+ VerifyFieldsPositions(value);
Review comment:
Yes, exception can be avoided in this case. Now the setter clones the
fields and sets the 'pos' value of the fields.
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 744791)
Time Spent: 1h 40m (was: 1.5h)
> SchemaBuilder equivalent or other means of schema creation
> ----------------------------------------------------------
>
> Key: AVRO-2211
> URL: https://issues.apache.org/jira/browse/AVRO-2211
> Project: Apache Avro
> Issue Type: Wish
> Components: csharp
> Reporter: Dan Stelljes
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> Currently, the only way to create a schema is via the Schema.Parse method.
> We'd like to be able to build a schema programmatically—would it be possible
> to (1) introduce an analogue to the SchemaBuilder from the Java library or
> (2) expose constructors on Schema and its descendants?
> Would be more than happy to contribute work on this given some direction.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)