internal static void GetColumnTypeShape(ColumnType type, out Column.VectorKind vecKind, out ColumnType itemType, out bool isKey) { if (type.IsKnownSizeVector) { vecKind = Column.VectorKind.Vector; } else if (type.IsVector) { vecKind = Column.VectorKind.VariableVector; } else { vecKind = Column.VectorKind.Scalar; } itemType = type.ItemType; if (type.ItemType.IsKey) { itemType = PrimitiveType.FromKind(type.ItemType.RawKind); } isKey = type.ItemType.IsKey; }
internal static void GetColumnTypeShape(ColumnType type, out Column.VectorKind vecKind, out ColumnType itemType, out bool isKey) { if (type is VectorType vectorType) { if (vectorType.IsKnownSize) { vecKind = Column.VectorKind.Vector; } else { vecKind = Column.VectorKind.VariableVector; } itemType = vectorType.ItemType; } else { vecKind = Column.VectorKind.Scalar; itemType = type; } isKey = itemType is KeyType; if (isKey) { itemType = ColumnTypeExtensions.PrimitiveTypeFromType(itemType.RawType); } }