Skip to content

Commit 7ffa2ee

Browse files
committed
hot fix
1 parent 816dc9c commit 7ffa2ee

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

src/Ydb.Sdk/src/Ado/BulkUpsert/BulkUpsertFormat.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ namespace Ydb.Sdk.Ado.BulkUpsert;
22

33
public enum BulkUpsertFormat
44
{
5-
Proto = 0,
5+
Proto = 0
66
// Arrow = 1
77
}

src/Ydb.Sdk/src/Ado/BulkUpsert/YdbBulkUpsertProtoImporter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,15 @@ await _connection.BulkUpsertProtoAsync(
9494
private Type GetStructType()
9595
{
9696
var structType = new Type { StructType = new StructType() };
97-
for (int i = 0; i < _columns.Count; i++)
97+
for (var i = 0; i < _columns.Count; i++)
9898
{
9999
structType.StructType.Members.Add(new StructMember
100100
{
101101
Name = _columns[i],
102102
Type = _types[i]
103103
});
104104
}
105+
105106
return structType;
106107
}
107108

src/Ydb.Sdk/src/Ado/YdbConnection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public async Task BulkUpsertAsync(
101101
throw YdbException.FromServer(operation.Status, operation.Issues);
102102
}
103103
}
104-
104+
105105
public async Task BulkUpsertProtoAsync(
106106
string tablePath,
107107
Type structType,
@@ -118,7 +118,7 @@ public async Task BulkUpsertProtoAsync(
118118
var typedValue = new TypedValue { Type = structType, Value = listValue };
119119
var req = new BulkUpsertRequest { Table = tablePath, Rows = typedValue };
120120

121-
int attempt = 0;
121+
var attempt = 0;
122122
while (true)
123123
{
124124
try

src/Ydb.Sdk/test/Ydb.Sdk.Ado.Tests/YdbConnectionTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ PRIMARY KEY (Id)
538538
new Type { TypeId = Type.Types.PrimitiveTypeId.Utf8 }
539539
};
540540

541-
await using (var importer = new YdbBulkUpsertProtoImporter(conn, absTablePath, columns, types, maxBytes: 250))
541+
await using (var importer = new YdbBulkUpsertProtoImporter(conn, absTablePath, columns, types, maxBytes: 30))
542542
{
543543
await importer.AddRowAsync(
544544
YdbValue.MakeInt32(1), YdbValue.MakeUtf8("A"));
@@ -547,8 +547,6 @@ await importer.AddRowAsync(
547547
await importer.AddRowAsync(
548548
YdbValue.MakeInt32(3), YdbValue.MakeUtf8("C"));
549549

550-
await importer.DisposeAsync();
551-
552550
Assert.Empty(importer.GetBufferedRows());
553551
}
554552

0 commit comments

Comments
 (0)