Skip to content

Commit edb1f08

Browse files
authored
Bump TsFile version to 1.1.2-250725 to introduce compression type seperated by data type (#16032)
* Bump TsFile version to 1.1.2-250725 to introduce compression type separated by data type * Fix tests
1 parent 94cbb47 commit edb1f08

3 files changed

Lines changed: 68 additions & 11 deletions

File tree

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: 65 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.apache.iotdb.db.queryengine.plan.planner.plan.node.source.DeviceRegionScanNode;
3636
import org.apache.iotdb.db.queryengine.plan.planner.plan.node.source.TimeseriesRegionScanNode;
3737

38+
import org.apache.tsfile.common.conf.TSFileDescriptor;
3839
import org.apache.tsfile.enums.TSDataType;
3940
import org.apache.tsfile.file.metadata.PlainDeviceID;
4041
import org.junit.Assert;
@@ -67,17 +68,38 @@ public class RegionScanLogicalPlannerTest {
6768
new MeasurementPath("root.sg.d1.s1", TSDataType.INT32),
6869
Collections.singletonList(
6970
new TimeseriesContext(
70-
"INT32", null, "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
71+
"INT32",
72+
null,
73+
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.INT32),
74+
"LZ4",
75+
"{\"key1\":\"value1\"}",
76+
null,
77+
null,
78+
null)));
7179
timeseriesSchemaInfoMap.put(
7280
new MeasurementPath("root.sg.d1.s2", TSDataType.DOUBLE),
7381
Collections.singletonList(
7482
new TimeseriesContext(
75-
"DOUBLE", "status", "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
83+
"DOUBLE",
84+
"status",
85+
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.DOUBLE),
86+
"LZ4",
87+
"{\"key1\":\"value1\"}",
88+
null,
89+
null,
90+
null)));
7691
timeseriesSchemaInfoMap.put(
7792
new MeasurementPath("root.sg.d1.s3", TSDataType.BOOLEAN),
7893
Collections.singletonList(
7994
new TimeseriesContext(
80-
"BOOLEAN", null, "PLAIN", "LZ4", "{\"key1\":\"value2\"}", null, null, null)));
95+
"BOOLEAN",
96+
null,
97+
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.BOOLEAN),
98+
"LZ4",
99+
"{\"key1\":\"value2\"}",
100+
null,
101+
null,
102+
null)));
81103
deviceToTimeseriesSchemaInfoMap.put(
82104
new PartialPath(new PlainDeviceID("root.sg.d1")), timeseriesSchemaInfoMap);
83105

@@ -86,17 +108,38 @@ public class RegionScanLogicalPlannerTest {
86108
new MeasurementPath("root.sg.d2.s1", TSDataType.INT32),
87109
Collections.singletonList(
88110
new TimeseriesContext(
89-
"INT32", null, "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
111+
"INT32",
112+
null,
113+
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.INT32),
114+
"LZ4",
115+
"{\"key1\":\"value1\"}",
116+
null,
117+
null,
118+
null)));
90119
timeseriesSchemaInfoMap2.put(
91120
new MeasurementPath("root.sg.d2.s2", TSDataType.DOUBLE),
92121
Collections.singletonList(
93122
new TimeseriesContext(
94-
"DOUBLE", "status", "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
123+
"DOUBLE",
124+
"status",
125+
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.DOUBLE),
126+
"LZ4",
127+
"{\"key1\":\"value1\"}",
128+
null,
129+
null,
130+
null)));
95131
timeseriesSchemaInfoMap2.put(
96132
new MeasurementPath("root.sg.d2.s4", TSDataType.TEXT),
97133
Collections.singletonList(
98134
new TimeseriesContext(
99-
"TEXT", null, "PLAIN", "LZ4", "{\"key2\":\"value1\"}", null, null, null)));
135+
"TEXT",
136+
null,
137+
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.TEXT),
138+
"LZ4",
139+
"{\"key2\":\"value1\"}",
140+
null,
141+
null,
142+
null)));
100143
deviceToTimeseriesSchemaInfoMap.put(
101144
new PartialPath(new PlainDeviceID("root.sg.d2")), timeseriesSchemaInfoMap2);
102145

@@ -107,10 +150,24 @@ public class RegionScanLogicalPlannerTest {
107150
Map<PartialPath, List<TimeseriesContext>> timeseriesSchemaInfoMap3 = new HashMap<>();
108151
timeseriesContextList.add(
109152
new TimeseriesContext(
110-
"INT32", null, "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null));
153+
"INT32",
154+
null,
155+
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.INT32),
156+
"LZ4",
157+
"{\"key1\":\"value1\"}",
158+
null,
159+
null,
160+
null));
111161
timeseriesContextList.add(
112162
new TimeseriesContext(
113-
"DOUBLE", "status", "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null));
163+
"DOUBLE",
164+
"status",
165+
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.DOUBLE),
166+
"LZ4",
167+
"{\"key1\":\"value1\"}",
168+
null,
169+
null,
170+
null));
114171
timeseriesSchemaInfoMap3.put(
115172
new AlignedPath("root.sg.d2.a", schemas, Collections.emptyList()), timeseriesContextList);
116173
deviceToTimeseriesSchemaInfoMap.put(

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
<thrift.version>0.14.1</thrift.version>
176176
<xz.version>1.9</xz.version>
177177
<zstd-jni.version>1.5.6-3</zstd-jni.version>
178-
<tsfile.version>1.1.2-250703-SNAPSHOT</tsfile.version>
178+
<tsfile.version>1.1.2-250725-SNAPSHOT</tsfile.version>
179179
</properties>
180180
<!--
181181
if we claim dependencies in dependencyManagement, then we do not claim

0 commit comments

Comments
 (0)