Skip to content

Unexpected behavior of the CurrentBatchRowCount() method #53

Open

Description

@HXCK3D

In version 2.0.8 of the library, this method always returns 0, even though the dataset contains records. In earlier versions of the library, the RowCount property worked correctly and returned the actual number of records.

Code example:

var count = dataset.CurrentBatchRowCount();
// variable count always contains 0

var list = new List<DataItem>(count);
while (await dataset.HasNextAsync())
{
    var row = dataset.Next();
    list.Add(new DataItem(row, false));
}

Activity

  1. HTHou commented on Apr 28, 2026

    @HTHou
    Contributor

    Thanks for reporting this. This has been fixed in #56, which has been merged into main.

    CurrentBatchRowCount() now has the first TsBlock constructed eagerly when initial query data is available, so it can return the current batch row count before the first row is consumed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions