Skip to content

Commit a90d3e5

Browse files
committed
Fix CI
1 parent b4f5fe9 commit a90d3e5

File tree

3 files changed

+48
-20
lines changed

3 files changed

+48
-20
lines changed

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/TimeseriesContext.java

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,21 +151,49 @@ public boolean equals(Object obj) {
151151
return false;
152152
}
153153
TimeseriesContext that = (TimeseriesContext) obj;
154-
boolean res =
155-
Objects.equals(dataType, that.dataType)
156-
&& Objects.equals(alias, that.alias)
157-
&& encoding.equals(that.encoding)
158-
&& Objects.equals(compression, that.compression)
159-
&& Objects.equals(tags, that.tags)
160-
&& Objects.equals(attributes, that.attributes)
161-
&& Objects.equals(deadband, that.deadband)
162-
&& Objects.equals(deadbandParameters, that.deadbandParameters);
163-
return res;
154+
return Objects.equals(dataType, that.dataType)
155+
&& Objects.equals(alias, that.alias)
156+
&& encoding.equals(that.encoding)
157+
&& Objects.equals(compression, that.compression)
158+
&& Objects.equals(tags, that.tags)
159+
&& Objects.equals(attributes, that.attributes)
160+
&& Objects.equals(deadband, that.deadband)
161+
&& Objects.equals(deadbandParameters, that.deadbandParameters);
164162
}
165163

166164
@Override
167165
public int hashCode() {
168166
return Objects.hash(
169167
dataType, alias, encoding, compression, tags, attributes, deadband, deadbandParameters);
170168
}
169+
170+
@Override
171+
public String toString() {
172+
return "TimeseriesContext{"
173+
+ "alias='"
174+
+ alias
175+
+ '\''
176+
+ ", dataType='"
177+
+ dataType
178+
+ '\''
179+
+ ", encoding='"
180+
+ encoding
181+
+ '\''
182+
+ ", compression='"
183+
+ compression
184+
+ '\''
185+
+ ", tags='"
186+
+ tags
187+
+ '\''
188+
+ ", attributes='"
189+
+ attributes
190+
+ '\''
191+
+ ", deadband='"
192+
+ deadband
193+
+ '\''
194+
+ ", deadbandParameters='"
195+
+ deadbandParameters
196+
+ '\''
197+
+ '}';
198+
}
171199
}

iotdb-core/datanode/src/test/java/org/apache/iotdb/db/metadata/mtree/schemafile/WrappedSegmentTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void flatTreeInsert() throws MetadataException {
8787

8888
ByteBuffer recMid01 = sf.getRecord("mid1");
8989
Assert.assertEquals(
90-
"[measurementNode, alias: mid1als, type: FLOAT, encoding: PLAIN, compressor: LZ4]",
90+
"[measurementNode, alias: mid1als, type: FLOAT, encoding: GORILLA, compressor: LZ4]",
9191
RecordUtils.buffer2String(recMid01));
9292

9393
int resInsertNode = sf.insertRecord(rNode.getName(), RecordUtils.node2Buffer(rNode));
@@ -101,7 +101,7 @@ public void flatTreeInsert() throws MetadataException {
101101
System.out.println(nsf);
102102
ByteBuffer nrec = nsf.getRecord("mid1");
103103
Assert.assertEquals(
104-
"[measurementNode, alias: mid1als, type: FLOAT, encoding: PLAIN, compressor: LZ4]",
104+
"[measurementNode, alias: mid1als, type: FLOAT, encoding: GORILLA, compressor: LZ4]",
105105
RecordUtils.buffer2String(nsf.getRecord("mid1")));
106106
Assert.assertEquals(
107107
"[entityNode, not aligned, not using template.]",

iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/logical/RegionScanLogicalPlannerTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,17 @@ public class RegionScanLogicalPlannerTest {
6767
new MeasurementPath("root.sg.d1.s1", TSDataType.INT32),
6868
Collections.singletonList(
6969
new TimeseriesContext(
70-
"INT32", null, "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
70+
"INT32", null, "TS_2DIFF", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
7171
timeseriesSchemaInfoMap.put(
7272
new MeasurementPath("root.sg.d1.s2", TSDataType.DOUBLE),
7373
Collections.singletonList(
7474
new TimeseriesContext(
75-
"DOUBLE", "status", "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
75+
"DOUBLE", "status", "GORILLA", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
7676
timeseriesSchemaInfoMap.put(
7777
new MeasurementPath("root.sg.d1.s3", TSDataType.BOOLEAN),
7878
Collections.singletonList(
7979
new TimeseriesContext(
80-
"BOOLEAN", null, "PLAIN", "LZ4", "{\"key1\":\"value2\"}", null, null, null)));
80+
"BOOLEAN", null, "RLE", "LZ4", "{\"key1\":\"value2\"}", null, null, null)));
8181
deviceToTimeseriesSchemaInfoMap.put(
8282
new PartialPath(new PlainDeviceID("root.sg.d1")), timeseriesSchemaInfoMap);
8383

@@ -86,12 +86,12 @@ public class RegionScanLogicalPlannerTest {
8686
new MeasurementPath("root.sg.d2.s1", TSDataType.INT32),
8787
Collections.singletonList(
8888
new TimeseriesContext(
89-
"INT32", null, "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
89+
"INT32", null, "TS_2DIFF", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
9090
timeseriesSchemaInfoMap2.put(
9191
new MeasurementPath("root.sg.d2.s2", TSDataType.DOUBLE),
9292
Collections.singletonList(
9393
new TimeseriesContext(
94-
"DOUBLE", "status", "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
94+
"DOUBLE", "status", "GORILLA", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
9595
timeseriesSchemaInfoMap2.put(
9696
new MeasurementPath("root.sg.d2.s4", TSDataType.TEXT),
9797
Collections.singletonList(
@@ -107,10 +107,10 @@ public class RegionScanLogicalPlannerTest {
107107
Map<PartialPath, List<TimeseriesContext>> timeseriesSchemaInfoMap3 = new HashMap<>();
108108
timeseriesContextList.add(
109109
new TimeseriesContext(
110-
"INT32", null, "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null));
110+
"INT32", null, "TS_2DIFF", "LZ4", "{\"key1\":\"value1\"}", null, null, null));
111111
timeseriesContextList.add(
112112
new TimeseriesContext(
113-
"DOUBLE", "status", "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null));
113+
"DOUBLE", "status", "GORILLA", "LZ4", "{\"key1\":\"value1\"}", null, null, null));
114114
timeseriesSchemaInfoMap3.put(
115115
new AlignedPath("root.sg.d2.a", schemas, Collections.emptyList()), timeseriesContextList);
116116
deviceToTimeseriesSchemaInfoMap.put(
@@ -215,7 +215,7 @@ public void testCountTimeseriesWithTimeConditionWithLimitOffset() throws Illegal
215215
queryId.genPlanNodeId(), getDeviceToTimeseriesSchemaInfoMap(), true, null);
216216

217217
PlanNode actualPlan = parseSQLToPlanNode(sql);
218-
Assert.assertEquals(actualPlan, regionScanNode);
218+
Assert.assertEquals(regionScanNode, actualPlan);
219219
}
220220

221221
@Test

0 commit comments

Comments
 (0)