You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ro...@apache.org on 2021/12/13 09:21:38 UTC

[iotdb] branch master updated: [IOTDB-2137] Fix incorrect column num in UDTFDataSet (#4562)

This is an automated email from the ASF dual-hosted git repository.

rong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new dd1ea14  [IOTDB-2137] Fix incorrect column num in UDTFDataSet (#4562)
dd1ea14 is described below

commit dd1ea1475e7c0220441f19e82a53eb9d58e9ddf1
Author: BaiJian <er...@hotmail.com>
AuthorDate: Mon Dec 13 17:21:08 2021 +0800

    [IOTDB-2137] Fix incorrect column num in UDTFDataSet (#4562)
---
 .../main/java/org/apache/iotdb/db/query/dataset/UDTFDataSet.java   | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/server/src/main/java/org/apache/iotdb/db/query/dataset/UDTFDataSet.java b/server/src/main/java/org/apache/iotdb/db/query/dataset/UDTFDataSet.java
index 69ed849..db533db 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/dataset/UDTFDataSet.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/dataset/UDTFDataSet.java
@@ -78,6 +78,7 @@ public abstract class UDTFDataSet extends QueryDataSet {
             cached);
 
     initTransformers();
+    initDataSetFields();
   }
 
   /** execute without value filters */
@@ -100,6 +101,7 @@ public abstract class UDTFDataSet extends QueryDataSet {
             readersOfSelectedSeries);
 
     initTransformers();
+    initDataSetFields();
   }
 
   protected UDTFDataSet(QueryContext queryContext, UDTFPlan udtfPlan, IUDFInputDataSet dataSet)
@@ -108,6 +110,7 @@ public abstract class UDTFDataSet extends QueryDataSet {
     this.udtfPlan = udtfPlan;
     rawQueryInputLayer = new RawQueryInputLayer(queryId, UDF_READER_MEMORY_BUDGET_IN_MB, dataSet);
     initTransformers();
+    initDataSetFields();
   }
 
   protected void initTransformers() throws QueryProcessException, IOException {
@@ -131,6 +134,10 @@ public abstract class UDTFDataSet extends QueryDataSet {
     }
   }
 
+  private void initDataSetFields() {
+    columnNum = udtfPlan.getPathToIndex().size();
+  }
+
   public void finalizeUDFs(long queryId) {
     udtfPlan.finalizeUDFExecutors(queryId);
   }