Skip to content

Commit edcd170

Browse files
msrathore-dbclaude
andcommitted
fix: revert AffectedRows/RowCount default back to 0
Reverts the ?? -1 change back to ?? 0 for both ExecuteQuery and ExecuteUpdate. SEA API returns 0 for DDL, not -1. Keeping original SEA behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 81a779a commit edcd170

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

csharp/src/StatementExecution/StatementExecutionStatement.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ public async Task<QueryResult> ExecuteQueryAsync(
304304
// Get schema from reader
305305
var schema = reader.Schema;
306306

307-
// Return query result - use -1 if row count is not available
308-
long rowCount = response.Manifest?.TotalRowCount ?? -1;
307+
// Return query result - use 0 if row count is not available
308+
long rowCount = response.Manifest?.TotalRowCount ?? 0;
309309
return new QueryResult(rowCount, reader);
310310
}
311311

@@ -626,8 +626,7 @@ public async Task<UpdateResult> ExecuteUpdateAsync(CancellationToken cancellatio
626626
}
627627

628628
// For updates, we don't need to read the results - just return the row count.
629-
// Default to -1 (unknown) when no manifest/row count, matching Thrift behavior for DDL.
630-
long rowCount = response.Manifest?.TotalRowCount ?? -1;
629+
long rowCount = response.Manifest?.TotalRowCount ?? 0;
631630
return new UpdateResult(rowCount);
632631
}
633632

0 commit comments

Comments
 (0)