Beispiel #1
0
 public ArrowPropertyAttribute(ArrowTypeId arrowTypeId,
                               string name,
                               bool isNullable = false)
 {
     ArrowTypeId = arrowTypeId;
     Name        = name;
     IsNullable  = isNullable;
 }
 public static void EnsureDataType(this ArrayData data, ArrowTypeId id)
 {
     if (data.DataType.TypeId != id)
     {
         // TODO: Use localizable string resource
         throw new ArgumentException(
                   $"Specified array type <{data.DataType.TypeId}> does not match expected type(s) <{id}>",
                   nameof(data.DataType.TypeId));
     }
 }
Beispiel #3
0
        public static Type GetClrType(ArrowTypeId arrowTypeId)
        {
            if (ClrTypeMap.TryGetValue(arrowTypeId,
                                       out Type type))
            {
                return(type);
            }

            return(arrowTypeId.GetType());
        }
Beispiel #4
0
 public BinaryArray(ArrowTypeId typeId, ArrayData data)
     : base(data)
 {
     data.EnsureDataType(typeId);
     data.EnsureBufferCount(3);
 }
Beispiel #5
0
 public static DictionaryType Default(ArrowTypeId containedTypeId) => new DictionaryType(containedTypeId);
Beispiel #6
0
 DictionaryType(ArrowTypeId containedTypeId)
 {
     ContainedTypeId = containedTypeId;
 }