File tree Expand file tree Collapse file tree
external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/impl
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434import org .apache .iotdb .db .queryengine .plan .execution .ExecutionResult ;
3535import org .apache .iotdb .db .queryengine .plan .execution .IQueryExecution ;
3636import org .apache .iotdb .db .queryengine .plan .parser .StatementGenerator ;
37+ import org .apache .iotdb .db .queryengine .plan .relational .metadata .fetcher .cache .TableDeviceLastCache ;
3738import org .apache .iotdb .db .queryengine .plan .relational .metadata .fetcher .cache .TableDeviceSchemaCache ;
3839import org .apache .iotdb .db .queryengine .plan .relational .metadata .fetcher .cache .TableId ;
3940import org .apache .iotdb .db .queryengine .plan .statement .Statement ;
@@ -196,6 +197,10 @@ public Response executeFastLastQueryStatement(
196197 for (final Map .Entry <String , Pair <TSDataType , TimeValuePair >> measurementLastEntry :
197198 device2MeasurementLastEntry .getValue ().entrySet ()) {
198199 final TimeValuePair tvPair = measurementLastEntry .getValue ().getRight ();
200+ if (tvPair == TableDeviceLastCache .PLACEHOLDER_EMPTY_COLUMN
201+ || tvPair .getValue () == null ) {
202+ continue ;
203+ }
199204 valueList .add (tvPair .getValue ().getStringValue ());
200205 dataTypeList .add (tvPair .getValue ().getDataType ().name ());
201206 targetDataSet .addTimestampsItem (tvPair .getTimestamp ());
Original file line number Diff line number Diff line change @@ -1399,7 +1399,8 @@ public TSExecuteStatementResp executeFastLastDataQueryForOneDeviceV2(
13991399 if (timeValuePair == null ) {
14001400 allCached = false ;
14011401 break ;
1402- } else if (timeValuePair .getValue () == null ) {
1402+ } else if (timeValuePair == TableDeviceLastCache .PLACEHOLDER_EMPTY_COLUMN
1403+ || timeValuePair .getValue () == null ) {
14031404 // there is no data for this sensor
14041405 if (!canUseNullEntry ) {
14051406 allCached = false ;
You can’t perform that action at this time.
0 commit comments