Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void flatTreeInsert() throws MetadataException {

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

int resInsertNode = sf.insertRecord(rNode.getName(), RecordUtils.node2Buffer(rNode));
Expand All @@ -101,7 +101,7 @@ public void flatTreeInsert() throws MetadataException {
System.out.println(nsf);
ByteBuffer nrec = nsf.getRecord("mid1");
Assert.assertEquals(
"[measurementNode, alias: mid1als, type: FLOAT, encoding: PLAIN, compressor: LZ4]",
"[measurementNode, alias: mid1als, type: FLOAT, encoding: GORILLA, compressor: LZ4]",
RecordUtils.buffer2String(nsf.getRecord("mid1")));
Assert.assertEquals(
"[entityNode, not aligned, not using template.]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.apache.iotdb.db.queryengine.plan.planner.plan.node.source.DeviceRegionScanNode;
import org.apache.iotdb.db.queryengine.plan.planner.plan.node.source.TimeseriesRegionScanNode;

import org.apache.tsfile.common.conf.TSFileDescriptor;
import org.apache.tsfile.enums.TSDataType;
import org.apache.tsfile.file.metadata.PlainDeviceID;
import org.junit.Assert;
Expand Down Expand Up @@ -67,17 +68,38 @@ public class RegionScanLogicalPlannerTest {
new MeasurementPath("root.sg.d1.s1", TSDataType.INT32),
Collections.singletonList(
new TimeseriesContext(
"INT32", null, "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
"INT32",
null,
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.INT32),
"LZ4",
"{\"key1\":\"value1\"}",
null,
null,
null)));
timeseriesSchemaInfoMap.put(
new MeasurementPath("root.sg.d1.s2", TSDataType.DOUBLE),
Collections.singletonList(
new TimeseriesContext(
"DOUBLE", "status", "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
"DOUBLE",
"status",
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.DOUBLE),
"LZ4",
"{\"key1\":\"value1\"}",
null,
null,
null)));
timeseriesSchemaInfoMap.put(
new MeasurementPath("root.sg.d1.s3", TSDataType.BOOLEAN),
Collections.singletonList(
new TimeseriesContext(
"BOOLEAN", null, "PLAIN", "LZ4", "{\"key1\":\"value2\"}", null, null, null)));
"BOOLEAN",
null,
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.BOOLEAN),
"LZ4",
"{\"key1\":\"value2\"}",
null,
null,
null)));
deviceToTimeseriesSchemaInfoMap.put(
new PartialPath(new PlainDeviceID("root.sg.d1")), timeseriesSchemaInfoMap);

Expand All @@ -86,17 +108,38 @@ public class RegionScanLogicalPlannerTest {
new MeasurementPath("root.sg.d2.s1", TSDataType.INT32),
Collections.singletonList(
new TimeseriesContext(
"INT32", null, "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
"INT32",
null,
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.INT32),
"LZ4",
"{\"key1\":\"value1\"}",
null,
null,
null)));
timeseriesSchemaInfoMap2.put(
new MeasurementPath("root.sg.d2.s2", TSDataType.DOUBLE),
Collections.singletonList(
new TimeseriesContext(
"DOUBLE", "status", "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null)));
"DOUBLE",
"status",
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.DOUBLE),
"LZ4",
"{\"key1\":\"value1\"}",
null,
null,
null)));
timeseriesSchemaInfoMap2.put(
new MeasurementPath("root.sg.d2.s4", TSDataType.TEXT),
Collections.singletonList(
new TimeseriesContext(
"TEXT", null, "PLAIN", "LZ4", "{\"key2\":\"value1\"}", null, null, null)));
"TEXT",
null,
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.TEXT),
"LZ4",
"{\"key2\":\"value1\"}",
null,
null,
null)));
deviceToTimeseriesSchemaInfoMap.put(
new PartialPath(new PlainDeviceID("root.sg.d2")), timeseriesSchemaInfoMap2);

Expand All @@ -107,10 +150,24 @@ public class RegionScanLogicalPlannerTest {
Map<PartialPath, List<TimeseriesContext>> timeseriesSchemaInfoMap3 = new HashMap<>();
timeseriesContextList.add(
new TimeseriesContext(
"INT32", null, "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null));
"INT32",
null,
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.INT32),
"LZ4",
"{\"key1\":\"value1\"}",
null,
null,
null));
timeseriesContextList.add(
new TimeseriesContext(
"DOUBLE", "status", "PLAIN", "LZ4", "{\"key1\":\"value1\"}", null, null, null));
"DOUBLE",
"status",
TSFileDescriptor.getInstance().getConfig().getValueEncoder(TSDataType.DOUBLE),
"LZ4",
"{\"key1\":\"value1\"}",
null,
null,
null));
timeseriesSchemaInfoMap3.put(
new AlignedPath("root.sg.d2.a", schemas, Collections.emptyList()), timeseriesContextList);
deviceToTimeseriesSchemaInfoMap.put(
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
<thrift.version>0.14.1</thrift.version>
<xz.version>1.9</xz.version>
<zstd-jni.version>1.5.6-3</zstd-jni.version>
<tsfile.version>1.1.2-250703-SNAPSHOT</tsfile.version>
<tsfile.version>1.1.2-250725-SNAPSHOT</tsfile.version>
</properties>
<!--
if we claim dependencies in dependencyManagement, then we do not claim
Expand Down
Loading