-
Notifications
You must be signed in to change notification settings - Fork 5
C# Client support V2 read interface #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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 <[email protected]>
|
||
var resp = task.ConfigureAwait(false).GetAwaiter().GetResult(); | ||
public RowRecord GetRow() => _rpcDataSet.GetRow(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep the user's performance unchanged
HasNext
Next
This can be used as a new method, but the semantics of the old method should not be changed
public RowRecord GetRow() => _rpcDataSet.GetRow();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
SessionPool
calls to new RPC methods (droppingAsync
suffix) 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Copilot uses AI. Check for mistakes.
Introduced a V2 data reading interface based on TSBlock, aligned with the design of the Go client