• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

apache / iotdb / #10019

07 Sep 2023 04:50AM UTC coverage: 47.489% (-0.2%) from 47.655%
#10019

push

travis_ci

web-flow
Pipe: Fix ConcurrentModificationException caused by concurrently iterating through CachedSchemaPatternMatcher.extractors when an PipeHeartbeatEvent is being assigned (#11074)

* try to fix ConcurrentModificationException when assigning PipeHeartbeatEvent

* Update CachedSchemaPatternMatcher.java

---------

Co-authored-by: 马子坤 <55695098+DanielWang2035@users.noreply.github.com>

1 of 1 new or added line in 1 file covered. (100.0%)

80551 of 169622 relevant lines covered (47.49%)

0.47 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

67.86
/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/Analysis.java
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one
3
 * or more contributor license agreements.  See the NOTICE file
4
 * distributed with this work for additional information
5
 * regarding copyright ownership.  The ASF licenses this file
6
 * to you under the Apache License, Version 2.0 (the
7
 * "License"); you may not use this file except in compliance
8
 * with the License.  You may obtain a copy of the License at
9
 *
10
 *      http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing,
13
 * software distributed under the License is distributed on an
14
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
 * KIND, either express or implied.  See the License for the
16
 * specific language governing permissions and limitations
17
 * under the License.
18
 */
19

20
package org.apache.iotdb.db.queryengine.plan.analyze;
21

22
import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
23
import org.apache.iotdb.common.rpc.thrift.TEndPoint;
24
import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
25
import org.apache.iotdb.common.rpc.thrift.TSStatus;
26
import org.apache.iotdb.common.rpc.thrift.TSchemaNode;
27
import org.apache.iotdb.commons.partition.DataPartition;
28
import org.apache.iotdb.commons.partition.SchemaPartition;
29
import org.apache.iotdb.commons.path.PartialPath;
30
import org.apache.iotdb.db.queryengine.common.NodeRef;
31
import org.apache.iotdb.db.queryengine.common.header.DatasetHeader;
32
import org.apache.iotdb.db.queryengine.common.schematree.ISchemaTree;
33
import org.apache.iotdb.db.queryengine.plan.expression.Expression;
34
import org.apache.iotdb.db.queryengine.plan.expression.ExpressionType;
35
import org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.DeviceViewIntoPathDescriptor;
36
import org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.FillDescriptor;
37
import org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.GroupByParameter;
38
import org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.GroupByTimeParameter;
39
import org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.IntoPathDescriptor;
40
import org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.OrderByParameter;
41
import org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.model.ModelInferenceDescriptor;
42
import org.apache.iotdb.db.queryengine.plan.statement.Statement;
43
import org.apache.iotdb.db.queryengine.plan.statement.component.Ordering;
44
import org.apache.iotdb.db.queryengine.plan.statement.component.SortItem;
45
import org.apache.iotdb.db.queryengine.plan.statement.crud.QueryStatement;
46
import org.apache.iotdb.db.queryengine.plan.statement.sys.ShowQueriesStatement;
47
import org.apache.iotdb.db.schemaengine.template.Template;
48
import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
49
import org.apache.iotdb.tsfile.read.filter.basic.Filter;
50
import org.apache.iotdb.tsfile.utils.Pair;
51

52
import java.util.ArrayList;
53
import java.util.HashMap;
54
import java.util.HashSet;
55
import java.util.LinkedHashMap;
56
import java.util.List;
57
import java.util.Map;
58
import java.util.Set;
59

60
import static com.google.common.base.Preconditions.checkArgument;
61

62
/** Analysis used for planning a query. TODO: This class may need to store more info for a query. */
63
public class Analysis {
64

65
  /////////////////////////////////////////////////////////////////////////////////////////////////
66
  // Common Analysis
67
  /////////////////////////////////////////////////////////////////////////////////////////////////
68

69
  // Statement
70
  private Statement statement;
71

72
  private DataPartition dataPartition;
73

74
  private SchemaPartition schemaPartition;
75

76
  private ISchemaTree schemaTree;
77

78
  private List<TEndPoint> redirectNodeList;
79

80
  // map from output column name (for every node) to its datatype
81
  private final Map<NodeRef<Expression>, TSDataType> expressionTypes = new LinkedHashMap<>();
1✔
82

83
  private boolean finishQueryAfterAnalyze;
84

85
  // potential fail status when finishQueryAfterAnalyze is true. If failStatus is NULL, means no
86
  // fail.
87

88
  private TSStatus failStatus;
89

90
  /////////////////////////////////////////////////////////////////////////////////////////////////
91
  // Query Analysis (used in ALIGN BY TIME)
92
  /////////////////////////////////////////////////////////////////////////////////////////////////
93

94
  // map from device name to series/aggregation under this device
95
  private Set<Expression> sourceExpressions;
96

97
  // input expressions of aggregations to be calculated
98
  private Set<Expression> sourceTransformExpressions = new HashSet<>();
1✔
99

100
  private Expression whereExpression;
101

102
  private Expression groupByExpression;
103

104
  // all aggregations that need to be calculated
105
  private Set<Expression> aggregationExpressions;
106

107
  // An ordered map from cross-timeseries aggregation to list of inner-timeseries aggregations. The
108
  // keys' order is the output one.
109
  private LinkedHashMap<Expression, Set<Expression>> crossGroupByExpressions;
110

111
  // tag keys specified in `GROUP BY TAG` clause
112
  private List<String> tagKeys;
113

114
  /*
115
  tag values -> (grouped expression -> output expressions)
116
  For different combination of tag keys, the grouped expression may be different. Let's say there
117
   are 3 timeseries root.sg.d1.temperature, root.sg.d1.status, root.sg.d2.temperature, and their
118
   tags are [k1=v1], [k1=v1] and [k1=v2] respectively. For query "SELECT last_value(**) FROM root
119
   GROUP BY k1", timeseries are grouped by their tags into 2 buckets. Bucket [v1] has
120
   [root.sg.d1.temperature, root.sg.d1.status], while bucket [v2] has [root.sg.d2.temperature].
121
   Thus, the aggregation results of bucket [v1] and [v2] are different. Bucket [v1] has 2
122
   aggregation results last_value(temperature) and last_value(status), whereas bucket [v2] only
123
  has [last_value(temperature)].
124
   */
125
  private Map<List<String>, LinkedHashMap<Expression, List<Expression>>>
126
      tagValuesToGroupedTimeseriesOperands;
127

128
  /////////////////////////////////////////////////////////////////////////////////////////////////
129
  // Query Analysis (used in ALIGN BY DEVICE)
130
  /////////////////////////////////////////////////////////////////////////////////////////////////
131

132
  // the list of device names
133
  private List<PartialPath> deviceList;
134

135
  // map from output device name to queried devices
136
  private Map<String, List<String>> outputDeviceToQueriedDevicesMap;
137

138
  // map from device name to series/aggregation under this device
139
  private Map<String, Set<Expression>> deviceToSourceExpressions;
140

141
  // input expressions of aggregations to be calculated
142
  private Map<String, Set<Expression>> deviceToSourceTransformExpressions = new HashMap<>();
1✔
143

144
  // map from device name to query filter under this device
145
  private Map<String, Expression> deviceToWhereExpression;
146

147
  // all aggregations that need to be calculated
148
  private Map<String, Set<Expression>> deviceToAggregationExpressions = new HashMap<>();
1✔
149

150
  // expression of output column to be calculated
151
  private Map<String, Set<Expression>> deviceToSelectExpressions;
152

153
  // expression of group by that need to be calculated
154
  private Map<String, Expression> deviceToGroupByExpression;
155

156
  // expression of order by that need to be calculated
157
  private Map<String, Set<Expression>> deviceToOrderByExpressions;
158

159
  // the sortItems used in order by push down of align by device
160
  private Map<String, List<SortItem>> deviceToSortItems;
161

162
  // e.g. [s1,s2,s3] is query, but [s1, s3] exists in device1, then device1 -> [1, 3], s1 is 1 but
163
  // not 0 because device is the first column
164
  private Map<String, List<Integer>> deviceViewInputIndexesMap;
165

166
  private Set<Expression> deviceViewOutputExpressions;
167

168
  private final Map<String, Set<Expression>> deviceToOutputExpressions = new HashMap<>();
1✔
169

170
  // indicates whether DeviceView need special process when rewriteSource in DistributionPlan,
171
  // you can see SourceRewriter#visitDeviceView to get more information
172
  private boolean deviceViewSpecialProcess;
173

174
  /////////////////////////////////////////////////////////////////////////////////////////////////
175
  // Query Common Analysis (above DeviceView)
176
  /////////////////////////////////////////////////////////////////////////////////////////////////
177

178
  // indicate is there a value filter
179
  private boolean hasValueFilter = false;
1✔
180

181
  // a global time filter used in `initQueryDataSource` and filter push down
182
  private Filter globalTimeFilter;
183

184
  // expression of output column to be calculated
185
  private Set<Expression> selectExpressions;
186

187
  private Expression havingExpression;
188

189
  // The expressions in order by clause
190
  // In align by device orderByExpression is the deviceView of expression which doesn't have
191
  // device-prefix
192
  // for example, in device root.sg1.d1, [root.sg1.d1.s1] is expression and [s1] is the device-view
193
  // one.
194
  private Set<Expression> orderByExpressions;
195

196
  private boolean hasSort = false;
1✔
197

198
  // parameter of `FILL` clause
199
  private FillDescriptor fillDescriptor;
200

201
  // parameter of `GROUP BY TIME` clause
202
  private GroupByTimeParameter groupByTimeParameter;
203

204
  // parameter of `GROUP BY VARIATION` clause
205
  private GroupByParameter groupByParameter;
206

207
  private OrderByParameter mergeOrderParameter;
208

209
  // This field will be set and used when the order by in last query only indicates the ordering of
210
  // timeseries, otherwise it will be null
211
  private Ordering timeseriesOrderingForLastQuery = null;
1✔
212

213
  // header of result dataset
214
  private DatasetHeader respDatasetHeader;
215

216
  // indicate whether the Nodes produce source data are VirtualSourceNodes
217
  private boolean isVirtualSource = false;
1✔
218

219
  private ModelInferenceDescriptor modelInferenceDescriptor;
220

221
  /////////////////////////////////////////////////////////////////////////////////////////////////
222
  // SELECT INTO Analysis
223
  /////////////////////////////////////////////////////////////////////////////////////////////////
224

225
  // used in ALIGN BY DEVICE
226
  private DeviceViewIntoPathDescriptor deviceViewIntoPathDescriptor;
227

228
  // used in ALIGN BY TIME
229
  private IntoPathDescriptor intoPathDescriptor;
230

231
  /////////////////////////////////////////////////////////////////////////////////////////////////
232
  // Schema Query Analysis
233
  /////////////////////////////////////////////////////////////////////////////////////////////////
234

235
  // extra message from config node, used for node management
236
  private Set<TSchemaNode> matchedNodes;
237

238
  // template and paths set template
239
  private Pair<Template, List<PartialPath>> templateSetInfo;
240

241
  // devicePath -> <template, paths set template>
242
  private Map<PartialPath, Pair<Template, PartialPath>> deviceTemplateSetInfoMap;
243

244
  // potential template used in timeseries query or fetch
245
  private Map<Integer, Template> relatedTemplateInfo;
246

247
  // generated by combine the input path pattern and template set path
248
  private List<PartialPath> specifiedTemplateRelatedPathPatternList;
249

250
  /////////////////////////////////////////////////////////////////////////////////////////////////
251
  // Logical View Analysis
252
  /////////////////////////////////////////////////////////////////////////////////////////////////
253

254
  private boolean useLogicalView = false;
1✔
255

256
  private List<Pair<Expression, String>> outputExpressions = null;
1✔
257

258
  /////////////////////////////////////////////////////////////////////////////////////////////////
259
  // Show Queries Analysis
260
  /////////////////////////////////////////////////////////////////////////////////////////////////
261

262
  // extra message from config node, queries wll be sent to these Running DataNodes
263
  private List<TDataNodeLocation> runningDataNodeLocations;
264

265
  // used for limit and offset push down optimizer, if we select all columns from aligned device, we
266
  // can use statistics to skip
267
  private boolean lastLevelUseWildcard = false;
1✔
268

269
  public Analysis() {
1✔
270
    this.finishQueryAfterAnalyze = false;
1✔
271
  }
1✔
272

273
  public List<TRegionReplicaSet> getPartitionInfo(PartialPath seriesPath, Filter timefilter) {
274
    // TODO: (xingtanzjr) implement the calculation of timePartitionIdList
275
    return dataPartition.getDataRegionReplicaSet(seriesPath.getDevice(), null);
1✔
276
  }
277

278
  public List<TRegionReplicaSet> getPartitionInfo(String deviceName, Filter globalTimeFilter) {
279
    // TODO: (xingtanzjr) implement the calculation of timePartitionIdList
280
    return dataPartition.getDataRegionReplicaSet(deviceName, null);
×
281
  }
282

283
  public Statement getStatement() {
284
    return statement;
1✔
285
  }
286

287
  public void setStatement(Statement statement) {
288
    this.statement = statement;
1✔
289
  }
1✔
290

291
  public DataPartition getDataPartitionInfo() {
292
    return dataPartition;
1✔
293
  }
294

295
  public void setDataPartitionInfo(DataPartition dataPartition) {
296
    this.dataPartition = dataPartition;
1✔
297
  }
1✔
298

299
  public SchemaPartition getSchemaPartitionInfo() {
300
    return schemaPartition;
1✔
301
  }
302

303
  public void setSchemaPartitionInfo(SchemaPartition schemaPartition) {
304
    this.schemaPartition = schemaPartition;
1✔
305
  }
1✔
306

307
  public ISchemaTree getSchemaTree() {
308
    return schemaTree;
1✔
309
  }
310

311
  public void setSchemaTree(ISchemaTree schemaTree) {
312
    this.schemaTree = schemaTree;
1✔
313
  }
1✔
314

315
  public List<TEndPoint> getRedirectNodeList() {
316
    return redirectNodeList;
×
317
  }
318

319
  public void setRedirectNodeList(List<TEndPoint> redirectNodeList) {
320
    this.redirectNodeList = redirectNodeList;
1✔
321
  }
1✔
322

323
  public void addEndPointToRedirectNodeList(TEndPoint endPoint) {
324
    if (redirectNodeList == null) {
1✔
325
      redirectNodeList = new ArrayList<>();
1✔
326
    }
327
    redirectNodeList.add(endPoint);
1✔
328
  }
1✔
329

330
  public Filter getGlobalTimeFilter() {
331
    return globalTimeFilter;
1✔
332
  }
333

334
  public void setGlobalTimeFilter(Filter timeFilter) {
335
    this.globalTimeFilter = timeFilter;
1✔
336
  }
1✔
337

338
  public DatasetHeader getRespDatasetHeader() {
339
    return respDatasetHeader;
1✔
340
  }
341

342
  public void setRespDatasetHeader(DatasetHeader respDatasetHeader) {
343
    this.respDatasetHeader = respDatasetHeader;
1✔
344
  }
1✔
345

346
  public TSDataType getType(Expression expression) {
347
    // NULL_Operand needn't check
348
    if (expression.getExpressionType() == ExpressionType.NULL) {
1✔
349
      return null;
×
350
    }
351
    TSDataType type = expressionTypes.get(NodeRef.of(expression));
1✔
352
    checkArgument(type != null, "Expression not analyzed: %s", expression);
1✔
353
    return type;
1✔
354
  }
355

356
  public boolean hasDataSource() {
357
    return (dataPartition != null && !dataPartition.isEmpty())
×
358
        || (schemaPartition != null && !schemaPartition.isEmpty())
×
359
        || statement instanceof ShowQueriesStatement
360
        || (statement instanceof QueryStatement
361
            && ((QueryStatement) statement).isAggregationQuery());
×
362
  }
363

364
  public LinkedHashMap<Expression, Set<Expression>> getCrossGroupByExpressions() {
365
    return crossGroupByExpressions;
1✔
366
  }
367

368
  public void setCrossGroupByExpressions(
369
      LinkedHashMap<Expression, Set<Expression>> crossGroupByExpressions) {
370
    this.crossGroupByExpressions = crossGroupByExpressions;
×
371
  }
×
372

373
  public FillDescriptor getFillDescriptor() {
374
    return fillDescriptor;
1✔
375
  }
376

377
  public void setFillDescriptor(FillDescriptor fillDescriptor) {
378
    this.fillDescriptor = fillDescriptor;
1✔
379
  }
1✔
380

381
  public boolean hasValueFilter() {
382
    return hasValueFilter;
1✔
383
  }
384

385
  public void setHasValueFilter(boolean hasValueFilter) {
386
    this.hasValueFilter = hasValueFilter;
1✔
387
  }
1✔
388

389
  public Expression getWhereExpression() {
390
    return whereExpression;
1✔
391
  }
392

393
  public void setWhereExpression(Expression whereExpression) {
394
    this.whereExpression = whereExpression;
1✔
395
  }
1✔
396

397
  public Map<String, Expression> getDeviceToWhereExpression() {
398
    return deviceToWhereExpression;
1✔
399
  }
400

401
  public void setDeviceToWhereExpression(Map<String, Expression> deviceToWhereExpression) {
402
    this.deviceToWhereExpression = deviceToWhereExpression;
1✔
403
  }
1✔
404

405
  public GroupByTimeParameter getGroupByTimeParameter() {
406
    return groupByTimeParameter;
1✔
407
  }
408

409
  public Expression getHavingExpression() {
410
    return havingExpression;
1✔
411
  }
412

413
  public void setHavingExpression(Expression havingExpression) {
414
    this.havingExpression = havingExpression;
1✔
415
  }
1✔
416

417
  public void setGroupByTimeParameter(GroupByTimeParameter groupByTimeParameter) {
418
    this.groupByTimeParameter = groupByTimeParameter;
1✔
419
  }
1✔
420

421
  public void setGroupByParameter(GroupByParameter groupByParameter) {
422
    this.groupByParameter = groupByParameter;
×
423
  }
×
424

425
  public GroupByParameter getGroupByParameter() {
426
    return groupByParameter;
1✔
427
  }
428

429
  public boolean hasGroupByParameter() {
430
    return groupByParameter != null;
1✔
431
  }
432

433
  public boolean isFinishQueryAfterAnalyze() {
434
    return finishQueryAfterAnalyze;
1✔
435
  }
436

437
  public void setFinishQueryAfterAnalyze(boolean finishQueryAfterAnalyze) {
438
    this.finishQueryAfterAnalyze = finishQueryAfterAnalyze;
×
439
  }
×
440

441
  public boolean isFailed() {
442
    return failStatus != null;
×
443
  }
444

445
  public TSStatus getFailStatus() {
446
    return this.failStatus;
×
447
  }
448

449
  public void setFailStatus(TSStatus status) {
450
    this.failStatus = status;
×
451
  }
×
452

453
  public void setDeviceViewInputIndexesMap(Map<String, List<Integer>> deviceViewInputIndexesMap) {
454
    this.deviceViewInputIndexesMap = deviceViewInputIndexesMap;
1✔
455
  }
1✔
456

457
  public Map<String, List<Integer>> getDeviceViewInputIndexesMap() {
458
    return deviceViewInputIndexesMap;
1✔
459
  }
460

461
  public Set<Expression> getSourceExpressions() {
462
    return sourceExpressions;
1✔
463
  }
464

465
  public void setSourceExpressions(Set<Expression> sourceExpressions) {
466
    this.sourceExpressions = sourceExpressions;
1✔
467
  }
1✔
468

469
  public Set<Expression> getSourceTransformExpressions() {
470
    return sourceTransformExpressions;
1✔
471
  }
472

473
  public void setSourceTransformExpressions(Set<Expression> sourceTransformExpressions) {
474
    this.sourceTransformExpressions = sourceTransformExpressions;
1✔
475
  }
1✔
476

477
  public Set<Expression> getAggregationExpressions() {
478
    return aggregationExpressions;
1✔
479
  }
480

481
  public void setAggregationExpressions(Set<Expression> aggregationExpressions) {
482
    this.aggregationExpressions = aggregationExpressions;
1✔
483
  }
1✔
484

485
  public Set<Expression> getSelectExpressions() {
486
    return selectExpressions;
1✔
487
  }
488

489
  public void setSelectExpressions(Set<Expression> selectExpressions) {
490
    this.selectExpressions = selectExpressions;
1✔
491
  }
1✔
492

493
  public Map<String, Set<Expression>> getDeviceToSourceExpressions() {
494
    return deviceToSourceExpressions;
1✔
495
  }
496

497
  public void setDeviceToSourceExpressions(Map<String, Set<Expression>> deviceToSourceExpressions) {
498
    this.deviceToSourceExpressions = deviceToSourceExpressions;
1✔
499
  }
1✔
500

501
  public Map<String, Set<Expression>> getDeviceToSourceTransformExpressions() {
502
    return deviceToSourceTransformExpressions;
1✔
503
  }
504

505
  public void setDeviceToSourceTransformExpressions(
506
      Map<String, Set<Expression>> deviceToSourceTransformExpressions) {
507
    this.deviceToSourceTransformExpressions = deviceToSourceTransformExpressions;
1✔
508
  }
1✔
509

510
  public Map<String, Set<Expression>> getDeviceToAggregationExpressions() {
511
    return deviceToAggregationExpressions;
1✔
512
  }
513

514
  public void setDeviceToAggregationExpressions(
515
      Map<String, Set<Expression>> deviceToAggregationExpressions) {
516
    this.deviceToAggregationExpressions = deviceToAggregationExpressions;
1✔
517
  }
1✔
518

519
  public Map<String, Set<Expression>> getDeviceToSelectExpressions() {
520
    return deviceToSelectExpressions;
1✔
521
  }
522

523
  public void setDeviceToSelectExpressions(Map<String, Set<Expression>> deviceToSelectExpressions) {
524
    this.deviceToSelectExpressions = deviceToSelectExpressions;
1✔
525
  }
1✔
526

527
  public Expression getGroupByExpression() {
528
    return groupByExpression;
1✔
529
  }
530

531
  public void setGroupByExpression(Expression groupByExpression) {
532
    this.groupByExpression = groupByExpression;
×
533
  }
×
534

535
  public Map<String, Expression> getDeviceToGroupByExpression() {
536
    return deviceToGroupByExpression;
1✔
537
  }
538

539
  public void setDeviceToGroupByExpression(Map<String, Expression> deviceToGroupByExpression) {
540
    this.deviceToGroupByExpression = deviceToGroupByExpression;
×
541
  }
×
542

543
  public Set<TSchemaNode> getMatchedNodes() {
544
    return matchedNodes;
×
545
  }
546

547
  public void setMatchedNodes(Set<TSchemaNode> matchedNodes) {
548
    this.matchedNodes = matchedNodes;
×
549
  }
×
550

551
  public OrderByParameter getMergeOrderParameter() {
552
    return mergeOrderParameter;
×
553
  }
554

555
  public void setMergeOrderParameter(OrderByParameter mergeOrderParameter) {
556
    this.mergeOrderParameter = mergeOrderParameter;
×
557
  }
×
558

559
  public Pair<Template, List<PartialPath>> getTemplateSetInfo() {
560
    return templateSetInfo;
×
561
  }
562

563
  public void setTemplateSetInfo(Pair<Template, List<PartialPath>> templateSetInfo) {
564
    this.templateSetInfo = templateSetInfo;
×
565
  }
×
566

567
  public Map<PartialPath, Pair<Template, PartialPath>> getDeviceTemplateSetInfoMap() {
568
    return deviceTemplateSetInfoMap;
×
569
  }
570

571
  public void setDeviceTemplateSetInfoMap(
572
      Map<PartialPath, Pair<Template, PartialPath>> deviceTemplateSetInfoMap) {
573
    this.deviceTemplateSetInfoMap = deviceTemplateSetInfoMap;
×
574
  }
×
575

576
  public Map<Integer, Template> getRelatedTemplateInfo() {
577
    return relatedTemplateInfo;
×
578
  }
579

580
  public void setRelatedTemplateInfo(Map<Integer, Template> relatedTemplateInfo) {
581
    this.relatedTemplateInfo = relatedTemplateInfo;
×
582
  }
×
583

584
  public List<PartialPath> getSpecifiedTemplateRelatedPathPatternList() {
585
    return specifiedTemplateRelatedPathPatternList;
×
586
  }
587

588
  public void setSpecifiedTemplateRelatedPathPatternList(
589
      List<PartialPath> specifiedTemplateRelatedPathPatternList) {
590
    this.specifiedTemplateRelatedPathPatternList = specifiedTemplateRelatedPathPatternList;
×
591
  }
×
592

593
  public void addTypes(Map<NodeRef<Expression>, TSDataType> types) {
594
    this.expressionTypes.putAll(types);
1✔
595
  }
1✔
596

597
  public void setExpressionType(Expression expression, TSDataType type) {
598
    this.expressionTypes.put(NodeRef.of(expression), type);
×
599
  }
×
600

601
  public Set<Expression> getDeviceViewOutputExpressions() {
602
    return deviceViewOutputExpressions;
1✔
603
  }
604

605
  public void setDeviceViewOutputExpressions(Set<Expression> deviceViewOutputExpressions) {
606
    this.deviceViewOutputExpressions = deviceViewOutputExpressions;
1✔
607
  }
1✔
608

609
  public boolean isDeviceViewSpecialProcess() {
610
    return deviceViewSpecialProcess;
1✔
611
  }
612

613
  public void setDeviceViewSpecialProcess(boolean deviceViewSpecialProcess) {
614
    this.deviceViewSpecialProcess = deviceViewSpecialProcess;
1✔
615
  }
1✔
616

617
  public DeviceViewIntoPathDescriptor getDeviceViewIntoPathDescriptor() {
618
    return deviceViewIntoPathDescriptor;
1✔
619
  }
620

621
  public void setDeviceViewIntoPathDescriptor(
622
      DeviceViewIntoPathDescriptor deviceViewIntoPathDescriptor) {
623
    this.deviceViewIntoPathDescriptor = deviceViewIntoPathDescriptor;
1✔
624
  }
1✔
625

626
  public IntoPathDescriptor getIntoPathDescriptor() {
627
    return intoPathDescriptor;
1✔
628
  }
629

630
  public void setIntoPathDescriptor(IntoPathDescriptor intoPathDescriptor) {
631
    this.intoPathDescriptor = intoPathDescriptor;
1✔
632
  }
1✔
633

634
  public List<String> getTagKeys() {
635
    return tagKeys;
1✔
636
  }
637

638
  public void setTagKeys(List<String> tagKeys) {
639
    this.tagKeys = tagKeys;
×
640
  }
×
641

642
  public Map<List<String>, LinkedHashMap<Expression, List<Expression>>>
643
      getTagValuesToGroupedTimeseriesOperands() {
644
    return tagValuesToGroupedTimeseriesOperands;
1✔
645
  }
646

647
  public void setTagValuesToGroupedTimeseriesOperands(
648
      Map<List<String>, LinkedHashMap<Expression, List<Expression>>>
649
          tagValuesToGroupedTimeseriesOperands) {
650
    this.tagValuesToGroupedTimeseriesOperands = tagValuesToGroupedTimeseriesOperands;
×
651
  }
×
652

653
  public List<TDataNodeLocation> getRunningDataNodeLocations() {
654
    return runningDataNodeLocations;
×
655
  }
656

657
  public void setRunningDataNodeLocations(List<TDataNodeLocation> runningDataNodeLocations) {
658
    this.runningDataNodeLocations = runningDataNodeLocations;
×
659
  }
×
660

661
  public boolean isVirtualSource() {
662
    return isVirtualSource;
1✔
663
  }
664

665
  public void setVirtualSource(boolean virtualSource) {
666
    isVirtualSource = virtualSource;
×
667
  }
×
668

669
  public Map<NodeRef<Expression>, TSDataType> getExpressionTypes() {
670
    return expressionTypes;
1✔
671
  }
672

673
  public void setOrderByExpressions(Set<Expression> orderByExpressions) {
674
    this.orderByExpressions = orderByExpressions;
1✔
675
  }
1✔
676

677
  public Set<Expression> getOrderByExpressions() {
678
    return orderByExpressions;
1✔
679
  }
680

681
  public Map<String, Set<Expression>> getDeviceToOrderByExpressions() {
682
    return deviceToOrderByExpressions;
1✔
683
  }
684

685
  public void setDeviceToOrderByExpressions(
686
      Map<String, Set<Expression>> deviceToOrderByExpressions) {
687
    this.deviceToOrderByExpressions = deviceToOrderByExpressions;
1✔
688
  }
1✔
689

690
  public void setHasSort(boolean hasSort) {
691
    this.hasSort = hasSort;
×
692
  }
×
693

694
  public boolean isHasSort() {
695
    return hasSort;
×
696
  }
697

698
  public Map<String, List<SortItem>> getDeviceToSortItems() {
699
    return deviceToSortItems;
×
700
  }
701

702
  public void setDeviceToSortItems(Map<String, List<SortItem>> deviceToSortItems) {
703
    this.deviceToSortItems = deviceToSortItems;
1✔
704
  }
1✔
705

706
  /////////////////////////////////////////////////////////////////////////////////////////////////
707
  // Logical View Analysis
708
  /////////////////////////////////////////////////////////////////////////////////////////////////
709

710
  public void setUseLogicalView(boolean useLogicalView) {
711
    this.useLogicalView = useLogicalView;
×
712
  }
×
713

714
  public boolean useLogicalView() {
715
    return this.useLogicalView;
×
716
  }
717

718
  public void setOutputExpressions(List<Pair<Expression, String>> outputExpressions) {
719
    this.outputExpressions = outputExpressions;
1✔
720
  }
1✔
721

722
  public List<Pair<Expression, String>> getOutputExpressions() {
723
    return this.outputExpressions;
×
724
  }
725

726
  public Ordering getTimeseriesOrderingForLastQuery() {
727
    return timeseriesOrderingForLastQuery;
×
728
  }
729

730
  public void setTimeseriesOrderingForLastQuery(Ordering timeseriesOrderingForLastQuery) {
731
    this.timeseriesOrderingForLastQuery = timeseriesOrderingForLastQuery;
×
732
  }
×
733

734
  public ModelInferenceDescriptor getModelInferenceDescriptor() {
735
    return modelInferenceDescriptor;
×
736
  }
737

738
  public void setModelInferenceDescriptor(ModelInferenceDescriptor modelInferenceDescriptor) {
739
    this.modelInferenceDescriptor = modelInferenceDescriptor;
×
740
  }
×
741

742
  public Map<String, List<String>> getOutputDeviceToQueriedDevicesMap() {
743
    return outputDeviceToQueriedDevicesMap;
1✔
744
  }
745

746
  public void setOutputDeviceToQueriedDevicesMap(
747
      Map<String, List<String>> outputDeviceToQueriedDevicesMap) {
748
    this.outputDeviceToQueriedDevicesMap = outputDeviceToQueriedDevicesMap;
1✔
749
  }
1✔
750

751
  public Map<String, Set<Expression>> getDeviceToOutputExpressions() {
752
    return deviceToOutputExpressions;
1✔
753
  }
754

755
  public boolean isLastLevelUseWildcard() {
756
    return lastLevelUseWildcard;
1✔
757
  }
758

759
  public void setLastLevelUseWildcard(boolean lastLevelUseWildcard) {
760
    this.lastLevelUseWildcard = lastLevelUseWildcard;
1✔
761
  }
1✔
762

763
  public void setDeviceList(List<PartialPath> deviceList) {
764
    this.deviceList = deviceList;
1✔
765
  }
1✔
766

767
  public List<PartialPath> getDeviceList() {
768
    return deviceList;
1✔
769
  }
770
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc