Conversation
hongzhi-gao
commented
Sep 15, 2026
| source = values.tolist() if hasattr(values, "tolist") else list(values) | ||
| if nulls is None: | ||
| return source | ||
| if data_type == TSDataType.BOOLEAN and len(source) == row_count: |
Contributor
Author
There was a problem hiding this comment.
For example, Boolean values=[True, False, True] with nulls=[False, True, False] must become [True, None, True]. Boolean blocks keep positional values, unlike other nullable columns that omit null entries.
hongzhi-gao
commented
Sep 15, 2026
| rows.extend(self.__row_buffer.popleft() for _ in range(remaining)) | ||
| return rows | ||
|
|
||
| def _fill_row_buffer(self): |
Contributor
Author
There was a problem hiding this comment.
Example: for 50,000 rows with fetch_size=10,000, this method drains the current RPC page into the row buffer first. It calls fetch_results() for the next page only after that buffer is empty.
hongzhi-gao
commented
Sep 15, 2026
| self.__data_type_for_tsblock_column[location], | ||
| ) | ||
| ) | ||
| return list(zip(*columns)) if columns else [tuple() for _ in range(row_count)] |
Contributor
Author
There was a problem hiding this comment.
A TSBlock is column-oriented. For example, Time=[1, 2] and s1=[10, 20] become row tuples [(1, 10), (2, 20)] through zip(*columns), without creating an intermediate DataFrame.
jt2594838
reviewed
Sep 15, 2026
jt2594838
approved these changes
Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SessionDataSet,RowRecord,Field, and DataFrame APIs.Performance
An end-to-end benchmark was run against a local single-node IoTDB.
The test queried 50,000 rows containing
INT32,DOUBLE, andTEXTcolumns with a fetch size of 10,000. Each measurement included query execution, RPC fetching, complete result consumption, and result-set closure.The client was warmed up before measurement. The before and after clients were tested in reversed order across two batches, with the median of 18 measured runs reported.
SessionDataSet.next()todf()End-to-end row iteration is approximately 4.64x faster, while DataFrame performance remains unchanged.