Skip to content

Commit

Permalink
fix: use no_std to supress generation of DeepCopy() methods to avoid …
Browse files Browse the repository at this point in the history
…conflicts
  • Loading branch information
lausannel committed Jul 8, 2024
1 parent a04926b commit f44923f
Show file tree
Hide file tree
Showing 88 changed files with 1,133 additions and 4,600 deletions.
1,995 changes: 274 additions & 1,721 deletions src/Apache.IoTDB/Rpc/Generated/IClientRPCService.cs

Large diffs are not rendered by default.

59 changes: 8 additions & 51 deletions src/Apache.IoTDB/Rpc/Generated/ServerProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,49 +130,6 @@ public ServerProperties(string version, List<string> supportedTimeAggregationOpe
this.TimestampPrecision = timestampPrecision;
}

public ServerProperties DeepCopy()
{
var tmp397 = new ServerProperties();
if((Version != null))
{
tmp397.Version = this.Version;
}
if((SupportedTimeAggregationOperations != null))
{
tmp397.SupportedTimeAggregationOperations = this.SupportedTimeAggregationOperations.DeepCopy();
}
if((TimestampPrecision != null))
{
tmp397.TimestampPrecision = this.TimestampPrecision;
}
if(__isset.maxConcurrentClientNum)
{
tmp397.MaxConcurrentClientNum = this.MaxConcurrentClientNum;
}
tmp397.__isset.maxConcurrentClientNum = this.__isset.maxConcurrentClientNum;
if(__isset.thriftMaxFrameSize)
{
tmp397.ThriftMaxFrameSize = this.ThriftMaxFrameSize;
}
tmp397.__isset.thriftMaxFrameSize = this.__isset.thriftMaxFrameSize;
if(__isset.isReadOnly)
{
tmp397.IsReadOnly = this.IsReadOnly;
}
tmp397.__isset.isReadOnly = this.__isset.isReadOnly;
if((BuildInfo != null) && __isset.buildInfo)
{
tmp397.BuildInfo = this.BuildInfo;
}
tmp397.__isset.buildInfo = this.__isset.buildInfo;
if((Logo != null) && __isset.logo)
{
tmp397.Logo = this.Logo;
}
tmp397.__isset.logo = this.__isset.logo;
return tmp397;
}

public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
{
iprot.IncrementRecursionDepth();
Expand Down Expand Up @@ -208,13 +165,13 @@ public ServerProperties DeepCopy()
if (field.Type == TType.List)
{
{
TList _list398 = await iprot.ReadListBeginAsync(cancellationToken);
SupportedTimeAggregationOperations = new List<string>(_list398.Count);
for(int _i399 = 0; _i399 < _list398.Count; ++_i399)
TList _list362 = await iprot.ReadListBeginAsync(cancellationToken);
SupportedTimeAggregationOperations = new List<string>(_list362.Count);
for(int _i363 = 0; _i363 < _list362.Count; ++_i363)
{
string _elem400;
_elem400 = await iprot.ReadStringAsync(cancellationToken);
SupportedTimeAggregationOperations.Add(_elem400);
string _elem364;
_elem364 = await iprot.ReadStringAsync(cancellationToken);
SupportedTimeAggregationOperations.Add(_elem364);
}
await iprot.ReadListEndAsync(cancellationToken);
}
Expand Down Expand Up @@ -339,9 +296,9 @@ public ServerProperties DeepCopy()
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.String, SupportedTimeAggregationOperations.Count), cancellationToken);
foreach (string _iter401 in SupportedTimeAggregationOperations)
foreach (string _iter365 in SupportedTimeAggregationOperations)
{
await oprot.WriteStringAsync(_iter401, cancellationToken);
await oprot.WriteStringAsync(_iter365, cancellationToken);
}
await oprot.WriteListEndAsync(cancellationToken);
}
Expand Down
15 changes: 0 additions & 15 deletions src/Apache.IoTDB/Rpc/Generated/TConfigNodeLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,6 @@ public TConfigNodeLocation(int configNodeId, TEndPoint internalEndPoint, TEndPoi
this.ConsensusEndPoint = consensusEndPoint;
}

public TConfigNodeLocation DeepCopy()
{
var tmp22 = new TConfigNodeLocation();
tmp22.ConfigNodeId = this.ConfigNodeId;
if((InternalEndPoint != null))
{
tmp22.InternalEndPoint = (TEndPoint)this.InternalEndPoint.DeepCopy();
}
if((ConsensusEndPoint != null))
{
tmp22.ConsensusEndPoint = (TEndPoint)this.ConsensusEndPoint.DeepCopy();
}
return tmp22;
}

public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
{
iprot.IncrementRecursionDepth();
Expand Down
8 changes: 0 additions & 8 deletions src/Apache.IoTDB/Rpc/Generated/TConsensusGroupId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ public TConsensusGroupId(TConsensusGroupType type, int id) : this()
this.Id = id;
}

public TConsensusGroupId DeepCopy()
{
var tmp8 = new TConsensusGroupId();
tmp8.Type = this.Type;
tmp8.Id = this.Id;
return tmp8;
}

public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
{
iprot.IncrementRecursionDepth();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,6 @@ public TCreateTimeseriesUsingSchemaTemplateReq(long sessionId, List<string> devi
this.DevicePathList = devicePathList;
}

public TCreateTimeseriesUsingSchemaTemplateReq DeepCopy()
{
var tmp439 = new TCreateTimeseriesUsingSchemaTemplateReq();
tmp439.SessionId = this.SessionId;
if((DevicePathList != null))
{
tmp439.DevicePathList = this.DevicePathList.DeepCopy();
}
return tmp439;
}

public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
{
iprot.IncrementRecursionDepth();
Expand Down Expand Up @@ -91,13 +80,13 @@ public TCreateTimeseriesUsingSchemaTemplateReq DeepCopy()
if (field.Type == TType.List)
{
{
TList _list440 = await iprot.ReadListBeginAsync(cancellationToken);
DevicePathList = new List<string>(_list440.Count);
for(int _i441 = 0; _i441 < _list440.Count; ++_i441)
TList _list395 = await iprot.ReadListBeginAsync(cancellationToken);
DevicePathList = new List<string>(_list395.Count);
for(int _i396 = 0; _i396 < _list395.Count; ++_i396)
{
string _elem442;
_elem442 = await iprot.ReadStringAsync(cancellationToken);
DevicePathList.Add(_elem442);
string _elem397;
_elem397 = await iprot.ReadStringAsync(cancellationToken);
DevicePathList.Add(_elem397);
}
await iprot.ReadListEndAsync(cancellationToken);
}
Expand Down Expand Up @@ -154,9 +143,9 @@ public TCreateTimeseriesUsingSchemaTemplateReq DeepCopy()
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.String, DevicePathList.Count), cancellationToken);
foreach (string _iter443 in DevicePathList)
foreach (string _iter398 in DevicePathList)
{
await oprot.WriteStringAsync(_iter443, cancellationToken);
await oprot.WriteStringAsync(_iter398, cancellationToken);
}
await oprot.WriteListEndAsync(cancellationToken);
}
Expand Down
14 changes: 0 additions & 14 deletions src/Apache.IoTDB/Rpc/Generated/TDataNodeConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ public TDataNodeConfiguration(TDataNodeLocation location, TNodeResource resource
this.Resource = resource;
}

public TDataNodeConfiguration DeepCopy()
{
var tmp26 = new TDataNodeConfiguration();
if((Location != null))
{
tmp26.Location = (TDataNodeLocation)this.Location.DeepCopy();
}
if((Resource != null))
{
tmp26.Resource = (TNodeResource)this.Resource.DeepCopy();
}
return tmp26;
}

public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
{
iprot.IncrementRecursionDepth();
Expand Down
27 changes: 0 additions & 27 deletions src/Apache.IoTDB/Rpc/Generated/TDataNodeLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,33 +58,6 @@ public TDataNodeLocation(int dataNodeId, TEndPoint clientRpcEndPoint, TEndPoint
this.SchemaRegionConsensusEndPoint = schemaRegionConsensusEndPoint;
}

public TDataNodeLocation DeepCopy()
{
var tmp24 = new TDataNodeLocation();
tmp24.DataNodeId = this.DataNodeId;
if((ClientRpcEndPoint != null))
{
tmp24.ClientRpcEndPoint = (TEndPoint)this.ClientRpcEndPoint.DeepCopy();
}
if((InternalEndPoint != null))
{
tmp24.InternalEndPoint = (TEndPoint)this.InternalEndPoint.DeepCopy();
}
if((MPPDataExchangeEndPoint != null))
{
tmp24.MPPDataExchangeEndPoint = (TEndPoint)this.MPPDataExchangeEndPoint.DeepCopy();
}
if((DataRegionConsensusEndPoint != null))
{
tmp24.DataRegionConsensusEndPoint = (TEndPoint)this.DataRegionConsensusEndPoint.DeepCopy();
}
if((SchemaRegionConsensusEndPoint != null))
{
tmp24.SchemaRegionConsensusEndPoint = (TEndPoint)this.SchemaRegionConsensusEndPoint.DeepCopy();
}
return tmp24;
}

public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
{
iprot.IncrementRecursionDepth();
Expand Down
11 changes: 0 additions & 11 deletions src/Apache.IoTDB/Rpc/Generated/TEndPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,6 @@ public TEndPoint(string ip, int port) : this()
this.Port = port;
}

public TEndPoint DeepCopy()
{
var tmp0 = new TEndPoint();
if((Ip != null))
{
tmp0.Ip = this.Ip;
}
tmp0.Port = this.Port;
return tmp0;
}

public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
{
iprot.IncrementRecursionDepth();
Expand Down
14 changes: 0 additions & 14 deletions src/Apache.IoTDB/Rpc/Generated/TFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ public TFile(string fileName, byte[] file) : this()
this.File = file;
}

public TFile DeepCopy()
{
var tmp61 = new TFile();
if((FileName != null))
{
tmp61.FileName = this.FileName;
}
if((File != null))
{
tmp61.File = this.File.ToArray();
}
return tmp61;
}

public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
{
iprot.IncrementRecursionDepth();
Expand Down
32 changes: 9 additions & 23 deletions src/Apache.IoTDB/Rpc/Generated/TFilesResp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ public TFilesResp(TSStatus status, List<TFile> files) : this()
this.Files = files;
}

public TFilesResp DeepCopy()
{
var tmp63 = new TFilesResp();
if((Status != null))
{
tmp63.Status = (TSStatus)this.Status.DeepCopy();
}
if((Files != null))
{
tmp63.Files = this.Files.DeepCopy();
}
return tmp63;
}

public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
{
iprot.IncrementRecursionDepth();
Expand Down Expand Up @@ -95,14 +81,14 @@ public TFilesResp DeepCopy()
if (field.Type == TType.List)
{
{
TList _list64 = await iprot.ReadListBeginAsync(cancellationToken);
Files = new List<TFile>(_list64.Count);
for(int _i65 = 0; _i65 < _list64.Count; ++_i65)
TList _list46 = await iprot.ReadListBeginAsync(cancellationToken);
Files = new List<TFile>(_list46.Count);
for(int _i47 = 0; _i47 < _list46.Count; ++_i47)
{
TFile _elem66;
_elem66 = new TFile();
await _elem66.ReadAsync(iprot, cancellationToken);
Files.Add(_elem66);
TFile _elem48;
_elem48 = new TFile();
await _elem48.ReadAsync(iprot, cancellationToken);
Files.Add(_elem48);
}
await iprot.ReadListEndAsync(cancellationToken);
}
Expand Down Expand Up @@ -162,9 +148,9 @@ public TFilesResp DeepCopy()
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.Struct, Files.Count), cancellationToken);
foreach (TFile _iter67 in Files)
foreach (TFile _iter49 in Files)
{
await _iter67.WriteAsync(oprot, cancellationToken);
await _iter49.WriteAsync(oprot, cancellationToken);
}
await oprot.WriteListEndAsync(cancellationToken);
}
Expand Down
38 changes: 11 additions & 27 deletions src/Apache.IoTDB/Rpc/Generated/TFlushReq.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,6 @@ public TFlushReq()
{
}

public TFlushReq DeepCopy()
{
var tmp28 = new TFlushReq();
if((IsSeq != null) && __isset.isSeq)
{
tmp28.IsSeq = this.IsSeq;
}
tmp28.__isset.isSeq = this.__isset.isSeq;
if((StorageGroups != null) && __isset.storageGroups)
{
tmp28.StorageGroups = this.StorageGroups.DeepCopy();
}
tmp28.__isset.storageGroups = this.__isset.storageGroups;
return tmp28;
}

public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
{
iprot.IncrementRecursionDepth();
Expand Down Expand Up @@ -119,13 +103,13 @@ public TFlushReq DeepCopy()
if (field.Type == TType.List)
{
{
TList _list29 = await iprot.ReadListBeginAsync(cancellationToken);
StorageGroups = new List<string>(_list29.Count);
for(int _i30 = 0; _i30 < _list29.Count; ++_i30)
TList _list18 = await iprot.ReadListBeginAsync(cancellationToken);
StorageGroups = new List<string>(_list18.Count);
for(int _i19 = 0; _i19 < _list18.Count; ++_i19)
{
string _elem31;
_elem31 = await iprot.ReadStringAsync(cancellationToken);
StorageGroups.Add(_elem31);
string _elem20;
_elem20 = await iprot.ReadStringAsync(cancellationToken);
StorageGroups.Add(_elem20);
}
await iprot.ReadListEndAsync(cancellationToken);
}
Expand Down Expand Up @@ -176,9 +160,9 @@ public TFlushReq DeepCopy()
await oprot.WriteFieldBeginAsync(field, cancellationToken);
{
await oprot.WriteListBeginAsync(new TList(TType.String, StorageGroups.Count), cancellationToken);
foreach (string _iter32 in StorageGroups)
foreach (string _iter21 in StorageGroups)
{
await oprot.WriteStringAsync(_iter32, cancellationToken);
await oprot.WriteStringAsync(_iter21, cancellationToken);
}
await oprot.WriteListEndAsync(cancellationToken);
}
Expand Down Expand Up @@ -219,16 +203,16 @@ public override int GetHashCode() {
public override string ToString()
{
var sb = new StringBuilder("TFlushReq(");
int tmp33 = 0;
int tmp22 = 0;
if((IsSeq != null) && __isset.isSeq)
{
if(0 < tmp33++) { sb.Append(", "); }
if(0 < tmp22++) { sb.Append(", "); }
sb.Append("IsSeq: ");
IsSeq.ToString(sb);
}
if((StorageGroups != null) && __isset.storageGroups)
{
if(0 < tmp33++) { sb.Append(", "); }
if(0 < tmp22++) { sb.Append(", "); }
sb.Append("StorageGroups: ");
StorageGroups.ToString(sb);
}
Expand Down
Loading

0 comments on commit f44923f

Please sign in to comment.