This is an automated email from the ASF dual-hosted git repository. caogaofei pushed a commit to branch benchants_branch in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 116d6f7600c07c34532596ab3f80aec2cc89cd0a Author: Beyyes <[email protected]> AuthorDate: Wed Jun 7 11:27:10 2023 +0800 add executeGroupByQueryIntervalQuery method --- .../thrift/src/main/thrift/client.thrift | 16 ++++++++++++++++ .../service/thrift/impl/ClientRPCServiceImpl.java | 22 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/iotdb-protocol/thrift/src/main/thrift/client.thrift b/iotdb-protocol/thrift/src/main/thrift/client.thrift index 8f6cf8e6297..14a9ab2e6e1 100644 --- a/iotdb-protocol/thrift/src/main/thrift/client.thrift +++ b/iotdb-protocol/thrift/src/main/thrift/client.thrift @@ -352,6 +352,20 @@ struct TSAggregationQueryReq { 11: optional bool legalPathNodes } +struct TSGroupByQueryIntervalReq { + 1: required i64 sessionId + 2: required i64 statementId + 3: required string device + 4: required string measurement + 5: required string dataType + 6: required common.TAggregationType aggregationType + 7: optional i64 startTime + 8: optional i64 endTime + 9: optional i64 interval + 10: optional i32 fetchSize + 11: optional i64 timeout +} + struct TSCreateMultiTimeseriesReq { 1: required i64 sessionId 2: required list<string> paths @@ -582,6 +596,8 @@ service IClientRPCService { TSExecuteStatementResp executeAggregationQuery(1:TSAggregationQueryReq req); + TSExecuteStatementResp executeGroupByQueryIntervalQuery(1:TSGroupByQueryIntervalReq req); + i64 requestStatementId(1:i64 sessionId); common.TSStatus createSchemaTemplate(1:TSCreateSchemaTemplateReq req); diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java index bccd8f24a14..eace12f85b0 100644 --- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java +++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java @@ -22,6 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TAggregationType; import org.apache.iotdb.common.rpc.thrift.TSStatus; import org.apache.iotdb.commons.conf.CommonDescriptor; import org.apache.iotdb.commons.conf.IoTDBConstant; +import org.apache.iotdb.commons.consensus.DataRegionId; import org.apache.iotdb.commons.exception.IllegalPathException; import org.apache.iotdb.commons.exception.IoTDBException; import org.apache.iotdb.commons.path.AlignedPath; @@ -34,6 +35,7 @@ import org.apache.iotdb.db.auth.AuthorityChecker; import org.apache.iotdb.db.conf.IoTDBConfig; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.conf.OperationType; +import org.apache.iotdb.db.engine.StorageEngine; import org.apache.iotdb.db.engine.querycontext.QueryDataSource; import org.apache.iotdb.db.engine.storagegroup.DataRegion; import org.apache.iotdb.db.metadata.template.TemplateQueryType; @@ -114,6 +116,7 @@ import org.apache.iotdb.service.rpc.thrift.TSFetchMetadataResp; import org.apache.iotdb.service.rpc.thrift.TSFetchResultsReq; import org.apache.iotdb.service.rpc.thrift.TSFetchResultsResp; import org.apache.iotdb.service.rpc.thrift.TSGetTimeZoneResp; +import org.apache.iotdb.service.rpc.thrift.TSGroupByQueryIntervalReq; import org.apache.iotdb.service.rpc.thrift.TSInsertRecordReq; import org.apache.iotdb.service.rpc.thrift.TSInsertRecordsOfOneDeviceReq; import org.apache.iotdb.service.rpc.thrift.TSInsertRecordsReq; @@ -1800,6 +1803,25 @@ public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler { return executeAggregationQueryInternal(req, OLD_SELECT_RESULT); } + @Override + public TSExecuteStatementResp executeGroupByQueryIntervalQuery(TSGroupByQueryIntervalReq req) + throws TException { + +// DataRegionId dataRegionId = new DataRegionId(5); +// StorageEngine.getInstance().getDataRegion(dataRegionId); +// +// List<TsBlock> ret = executeGroupByQueryInternal( +// req.getDevice(), +// req.getMeasurement(), +// req.get, +// req.getStartTime(), +// req.getEndTime(), +// req.getInterval(), +// req.getAggregationType(), +// List<DataRegion> dataRegionList) + return null; + } + @Override public long requestStatementId(long sessionId) { return SESSION_MANAGER.requestStatementId(SESSION_MANAGER.getCurrSession());
