You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/08/29 06:23:22 UTC

[GitHub] [iotdb] liuminghui233 commented on a diff in pull request #7146: [IOTDB-4246]select last query without schema data only return time column

liuminghui233 commented on code in PR #7146:
URL: https://github.com/apache/iotdb/pull/7146#discussion_r956933994


##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/AnalyzeVisitor.java:
##########
@@ -177,6 +177,11 @@ public Analysis visitQuery(QueryStatement queryStatement, MPPQueryContext contex
       logger.info("{} fetch query schema...", getLogHeader());
       ISchemaTree schemaTree = schemaFetcher.fetchSchema(patternTree);
       logger.info("{} fetch schema done", getLogHeader());
+
+      if (queryStatement.isLastQuery()) {
+        analysis.setRespDatasetHeader(DatasetHeaderFactory.getLastQueryHeader());
+      }
+
       // If there is no leaf node in the schema tree, the query should be completed immediately
       if (schemaTree.isEmpty()) {

Review Comment:
   ```suggestion
         if (schemaTree.isEmpty()) {
             if (queryStatement.isLastQuery()) {
               analysis.setRespDatasetHeader(DatasetHeaderFactory.getLastQueryHeader());
             }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org