Skip to content

Commit 484b8da

Browse files
Update YdbDataReader.cs
1 parent d29ca25 commit 484b8da

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/Ydb.Sdk/src/Ado/YdbDataReader.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,7 @@ public override byte GetByte(int ordinal) =>
9494

9595
public sbyte GetSByte(int ordinal) => GetPrimitiveValue(Type.Types.PrimitiveTypeId.Int8, ordinal).GetInt8();
9696

97-
public byte[] GetBytes(int ordinal)
98-
{
99-
var type = UnwrapColumnType(ordinal);
100-
101-
return type.TypeId switch
102-
{
103-
Type.Types.PrimitiveTypeId.String => CurrentRow[ordinal].GetBytes(),
104-
Type.Types.PrimitiveTypeId.Yson => CurrentRow[ordinal].GetYson(),
105-
_ => throw InvalidCastException(Type.Types.PrimitiveTypeId.String, ordinal)
106-
};
107-
}
97+
public byte[] GetBytes(int ordinal) => GetPrimitiveValue(Type.Types.PrimitiveTypeId.String, ordinal).GetBytes();
10898

10999
public byte[] GetYson(int ordinal) => GetPrimitiveValue(Type.Types.PrimitiveTypeId.Yson, ordinal).GetYson();
110100

0 commit comments

Comments
 (0)