C# Client support V2 read interface#37
Merged
CritasWang merged 14 commits intoapache:mainfrom Aug 26, 2025
Merged
Conversation
* add tsblock * develop tsblock and rpcdataset * improve code specifications * develop RpcDataSet api * coding api in SessionDataSet and rpcDataSet * fix bugs & pass test * adapted to IoTDBDataReader * adopted comments * add license and change ubuntu version * format code --------- Co-authored-by: xxhz22 <1791961174@qq.com>
CritasWang
requested changes
Jun 30, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a V2 data reading interface based on TSBlock and aligns the C# client design with the Go client. Key changes include:
- Changing default timezone identifiers from
"UTC+08:00"to"Asia/Shanghai". - Updating
SessionPoolcalls to new RPC methods (droppingAsyncsuffix) and wiring up TSBlock-based streaming. - Adding core data‐structure support:
TsBlock,RpcDataSet,ColumnDecoder,Column, and extendingByteBuffer.
Reviewed Changes
Copilot reviewed 22 out of 125 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| TableSessionPool.Builder.cs, SessionPool.Builder.cs | Updated default _zoneId initialization to "Asia/Shanghai". |
| SessionPool.cs | Swapped deprecated async calls for new V2 methods; updated timezone. |
| DataStructure/TsBlock.cs | Added TsBlock deserialization and validation logic. |
| DataStructure/RpcDataSet.cs | New streaming class to iterate through TSBlocks over RPC V2. |
| DataStructure/ColumnDecoder.cs, Column.cs | Core interfaces and implementations for decoding column data. |
| DataStructure/ByteBuffer.cs | Added GetBytesbyLength helper for length‐based reads. |
| DataStructure/SessionDataSet.cs | Refactored to delegate to RpcDataSet with new constructor. |
| Client.cs | Added GetDataTypeByStr helper for mapping string types to enum. |
| IoTDBDataReader.cs | Updated to use Next()/GetRow() instead of HasNext()/Next(). |
| IoTDBConnectionStringBuilder.cs | Updated default _zoneId to "Asia/Shanghai". |
| samples/… | Refactored sample tests to use PrintDataSetByString and Next(). |
| .github/workflows/pre-commit-format.yml | Upgraded runner from Ubuntu 20.04 to Ubuntu 22.04. |
Comments suppressed due to low confidence (4)
src/Apache.IoTDB/DataStructure/ByteBuffer.cs:149
- Method name 'GetBytesbyLength' uses inconsistent casing; consider renaming to 'GetBytesByLength' to match .NET naming conventions.
public byte[] GetBytesbyLength(int length)
src/Apache.IoTDB/DataStructure/SessionDataSet.cs:52
- [nitpick] Parameter '_clientQueueS' begins with an underscore and uppercase letter, which conflicts with C# parameter naming conventions. Consider renaming to 'clientQueue'.
public SessionDataSet(
src/Apache.IoTDB/DataStructure/TsBlock.cs:80
- [nitpick] Variable 'valuecolumnEncodings' should be renamed to 'valueColumnEncodings' to follow camelCase convention and improve readability.
var valuecolumnEncodings = new ColumnEncoding[valueColumnCount];
src/Apache.IoTDB/DataStructure/RpcDataSet.cs:29
- Public types and methods lack XML documentation comments. Consider adding summaries to explain usage for key public APIs like RpcDataSet.
public class RpcDataSet : System.IDisposable
| public class IntColumn : PrimitiveColumn<int> | ||
| { | ||
| public IntColumn(int arrayOffset, int positionCount, bool[] valueIsNull, int[] values) | ||
| : base( |
There was a problem hiding this comment.
Constructors ignore the passed 'valueIsNull' array by hardcoding it to null; this discards null-indicator information. Pass the actual 'valueIsNull' parameter to the base class.
Contributor
* add tsblock * develop tsblock and rpcdataset * improve code specifications * develop RpcDataSet api * coding api in SessionDataSet and rpcDataSet * fix bugs & pass test * adapted to IoTDBDataReader * adopted comments * add license and change ubuntu version * format code * fix pull request * fix valueIsNull --------- Co-authored-by: xxhz22 <1791961174@qq.com>
Collaborator
Author
…endpoint parsing and utility functions
CritasWang
approved these changes
Aug 26, 2025
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.


Introduced a V2 data reading interface based on TSBlock, aligned with the design of the Go client