You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "eerhardt (via GitHub)" <gi...@apache.org> on 2023/02/10 22:34:34 UTC

[GitHub] [arrow] eerhardt commented on a diff in pull request #34125: GH-34076: [C#] Allow schema fields with duplicate names

eerhardt commented on code in PR #34125:
URL: https://github.com/apache/arrow/pull/34125#discussion_r1103317618


##########
csharp/src/Apache.Arrow/Schema.cs:
##########
@@ -22,32 +22,31 @@ namespace Apache.Arrow
 {
     public partial class Schema
     {
-        public IReadOnlyDictionary<string, Field> Fields
-        {
-            get => _fieldsDictionary;
-        }
+        [Obsolete("Use `FieldList` instead")]
+        public IReadOnlyDictionary<string, Field> Fields => _fieldsDictionary;

Review Comment:
   We could still support this API, couldn't we? We could use a custom `IReadOnlyDictionary` that stored multiple `Field` instances per string. And when someone tried accessing a field by name, if there was more than 1 field, we could define behavior of either:
   
   * throw an exception
   * return the last field with that name



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org