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

[GitHub] [arrow] DanTm99 commented on issue #34076: [C#] Exception thrown when creating schema with multiple columns with the same name

DanTm99 commented on issue #34076:
URL: https://github.com/apache/arrow/issues/34076#issuecomment-1423966649

   This exception is thrown when constructing the `_fieldsDictionary`, because the keys for it are the field names and a dictionary cannot have multiple entries with the same key.
   
   This is publicly exposed as `IReadOnlyDictionary<string, Field> Fields`, and avoiding this exception would require either skipping fields with duplicate names when constructing it (making the dictionary an inaccurate representation of the schema), or by replacing the `IReadOnlyDictionary<string, Field>` with another type (e.g. `ILookup<string, Field>` or `IReadOnlyList<Field>`) which would be a breaking change for anyone using `Fields` directly.
   
   @westonpace @eerhardt thoughts?


-- 
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