private static ColumnSchemaPB ToColumnSchemaPb( ColumnSchema columnSchema, bool isDeleted) { var type = isDeleted ? DataType.IsDeleted : (DataType)columnSchema.Type; var columnSchemaPb = new ColumnSchemaPB { Name = columnSchema.Name, Type = type, IsNullable = columnSchema.IsNullable, // Set isKey to false on the passed ColumnSchema. // This allows out of order key columns in projections. IsKey = false, TypeAttributes = columnSchema.TypeAttributes.ToTypeAttributesPb() }; ProtobufHelper.CopyDefaultValueToPb(columnSchema, columnSchemaPb); return(columnSchemaPb); }