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 20d7bc2bf9580f0cd8257a54a366e1d5ffe442c8 Merge: 116d6f7600c fa90736430d Author: Beyyes <[email protected]> AuthorDate: Wed Jun 7 11:44:55 2023 +0800 fix conflict .../thrift/src/main/thrift/client.thrift | 2 +- .../fragment/FragmentInstanceContext.java | 2 +- .../fragment/FragmentInstanceManager.java | 2 +- .../service/thrift/impl/ClientRPCServiceImpl.java | 90 +++++++++++++++++----- 4 files changed, 73 insertions(+), 23 deletions(-) diff --cc iotdb-protocol/thrift/src/main/thrift/client.thrift index 14a9ab2e6e1,8f6cf8e6297..ec35e8f5020 --- a/iotdb-protocol/thrift/src/main/thrift/client.thrift +++ b/iotdb-protocol/thrift/src/main/thrift/client.thrift @@@ -352,20 -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 ++ 5: required i32 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 diff --cc server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java index eace12f85b0,67db441a311..5c3cba12996 --- 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 @@@ -35,10 -34,10 +35,11 @@@ import org.apache.iotdb.db.auth.Authori 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; + import org.apache.iotdb.db.mpp.aggregation.AccumulatorFactory; + import org.apache.iotdb.db.mpp.aggregation.Aggregator; import org.apache.iotdb.db.mpp.common.FragmentInstanceId; import org.apache.iotdb.db.mpp.common.PlanFragmentId; import org.apache.iotdb.db.mpp.common.QueryId; @@@ -1803,25 -1842,6 +1845,33 @@@ public class ClientRPCServiceImpl imple return executeAggregationQueryInternal(req, OLD_SELECT_RESULT); } + @Override + public TSExecuteStatementResp executeGroupByQueryIntervalQuery(TSGroupByQueryIntervalReq req) + throws TException { ++ try { ++ IClientSession clientSession = SESSION_MANAGER.getCurrSessionAndUpdateIdleTime(); + - // 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) ++ DataRegionId dataRegionId = new DataRegionId(5); ++ List<DataRegion> dataRegionList = null; ++ StorageEngine.getInstance().getDataRegion(dataRegionId); ++ ++ List<TsBlock> ret = ++ executeGroupByQueryInternal( ++ SESSION_MANAGER.getSessionInfo(clientSession), ++ req.getDevice(), ++ req.getMeasurement(), ++ TSDataType.getTsDataType((byte) 2), ++ req.getStartTime(), ++ req.getEndTime(), ++ req.getInterval(), ++ req.getAggregationType(), ++ dataRegionList); ++ } catch (Exception e) { ++ ++ } + return null; + } + @Override public long requestStatementId(long sessionId) { return SESSION_MANAGER.requestStatementId(SESSION_MANAGER.getCurrSession());
