3535import org .apache .iotdb .db .queryengine .plan .planner .plan .node .source .DeviceRegionScanNode ;
3636import org .apache .iotdb .db .queryengine .plan .planner .plan .node .source .TimeseriesRegionScanNode ;
3737
38+ import org .apache .tsfile .common .conf .TSFileDescriptor ;
3839import org .apache .tsfile .enums .TSDataType ;
3940import org .apache .tsfile .file .metadata .PlainDeviceID ;
4041import 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 (
0 commit comments