yanivru commented on a change in pull request #1597:
URL: https://github.com/apache/avro/pull/1597#discussion_r827438307
##########
File path: lang/csharp/src/apache/main/Schema/UnionSchema.cs
##########
@@ -161,5 +164,17 @@ public override int GetHashCode()
result += getHashCode(Props);
return result;
}
+
+ private void VerifyChildSchemas(List<Schema> schemas)
+ {
+ if (schemas.Any(schema => schema.Tag == Type.Union))
+ throw new ArgumentException("Unions may not immediately
contain other unions", nameof(schemas));
Review comment:
I took that expression from the avro documentation. I believe it's
better to be in sync with the documentation
(https://avro.apache.org/docs/current/spec.html#Unions).
--
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]