Platob opened a new issue, #35243:
URL: https://github.com/apache/arrow/issues/35243
### Describe the enhancement requested
Hello,
i started dev on new implementation of MapType, im wondering how it should
be built ?
I think is a list of Struct which are like `KeyValuePair` c# class
```csharp
using System.Collections.Generic;
namespace Apache.Arrow.Types
{
public class MapType : NestedType
{
public override ArrowTypeId TypeId => ArrowTypeId.Map;
public override string Name => "map";
public Field KeyField => Fields[0];
public Field ValueField => Fields[0];
public IArrowType ValueDataType => Fields[0].DataType;
public MapType(IArrowType keyType, IArrowType valueType, bool
nullable)
: this(new Field("key", keyType, false), new Field("value",
keyType, false), nullable)
{
}
public MapType(Field keyField, Field valueField, bool nullable)
: this(new StructType(new List<Field>() { keyField, valueField
}), nullable)
{
}
public MapType(StructType structType, bool nullable) : this(new
ListType(new Field("key_value", structType, nullable)), nullable)
{
}
public MapType(ListType listType, bool nullable) : this(new
Field("key_values", listType, nullable))
{
}
public MapType(Field keyValueField) : base(keyValueField)
{
}
public override void Accept(IArrowTypeVisitor visitor) =>
Accept(this, visitor);
}
}
```
### Component(s)
C#
--
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]