Example #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));
     }
 }
Example #3
0
        public static Type GetClrType(ArrowTypeId arrowTypeId)
        {
            if (ClrTypeMap.TryGetValue(arrowTypeId,
                                       out Type type))
            {
                return(type);
            }

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