KalleOlaviNiemitalo commented on code in PR #1103: URL: https://github.com/apache/avro/pull/1103#discussion_r955995155
########## lang/csharp/src/apache/main/Schema/SchemaConfiguration.cs: ########## @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace Avro +{ + /// <summary> + /// Schema configuration + /// </summary> + public static class SchemaConfiguration + { + /// <summary> + /// Enables 'soft-match' algorithm for compatibility java and .net consumers + /// see https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/Resolver.java#L640 + /// </summary> + public static bool UseSoftMatch { get; set; } Review Comment: I don't like making this a static property. I'd prefer adding a SchemaConfiguration parameter in Schema.CanRead, if it is necessary to support an undocumented match algorithm. But it would be even better to fix the schemas so that they use the documented "aliases" feature. That way, the compatiblity would work the same in all programming languages. -- 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]
