This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch TreeToTableView
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/TreeToTableView by this push:
new 811ee6f65f1 Add CI check for TreeToTableView branch
811ee6f65f1 is described below
commit 811ee6f65f151600ad55631c713d1e3bd926efd9
Author: JackieTien97 <[email protected]>
AuthorDate: Fri Dec 20 17:35:24 2024 +0800
Add CI check for TreeToTableView branch
---
.github/workflows/cluster-it-1c1d.yml | 2 +
.github/workflows/cluster-it-1c1d1a.yml | 2 +
.github/workflows/cluster-it-1c3d.yml | 2 +
.github/workflows/compile-check.yml | 2 +
.github/workflows/dependency-check.yml | 2 +
.github/workflows/multi-language-client.yml | 2 +
.github/workflows/pipe-it-2cluster.yml | 2 +
.github/workflows/sonar-codecov.yml | 2 +
.github/workflows/table-cluster-it-1c1d.yml | 2 +
.github/workflows/table-cluster-it-1c3d.yml | 2 +
.github/workflows/todos-check.yml | 1 +
.github/workflows/unit-test.yml | 2 +
...eeAlignedDeviceViewAggregationScanOperator.java | 22 +++-------
.../TreeAlignedDeviceViewScanOperator.java | 47 +++-------------------
pom.xml | 2 +-
15 files changed, 35 insertions(+), 59 deletions(-)
diff --git a/.github/workflows/cluster-it-1c1d.yml
b/.github/workflows/cluster-it-1c1d.yml
index 0b718d16ab4..1fb1208f726 100644
--- a/.github/workflows/cluster-it-1c1d.yml
+++ b/.github/workflows/cluster-it-1c1d.yml
@@ -6,6 +6,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
@@ -14,6 +15,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
diff --git a/.github/workflows/cluster-it-1c1d1a.yml
b/.github/workflows/cluster-it-1c1d1a.yml
index a92d9d23811..5dc578aee7a 100644
--- a/.github/workflows/cluster-it-1c1d1a.yml
+++ b/.github/workflows/cluster-it-1c1d1a.yml
@@ -6,6 +6,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
@@ -14,6 +15,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
diff --git a/.github/workflows/cluster-it-1c3d.yml
b/.github/workflows/cluster-it-1c3d.yml
index fab2085dbc7..7bec02086ae 100644
--- a/.github/workflows/cluster-it-1c3d.yml
+++ b/.github/workflows/cluster-it-1c3d.yml
@@ -6,6 +6,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
@@ -14,6 +15,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
diff --git a/.github/workflows/compile-check.yml
b/.github/workflows/compile-check.yml
index b20e8edd999..ea47415a9df 100644
--- a/.github/workflows/compile-check.yml
+++ b/.github/workflows/compile-check.yml
@@ -8,6 +8,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
@@ -16,6 +17,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
diff --git a/.github/workflows/dependency-check.yml
b/.github/workflows/dependency-check.yml
index 5c344e08b70..53a66d3944c 100644
--- a/.github/workflows/dependency-check.yml
+++ b/.github/workflows/dependency-check.yml
@@ -8,6 +8,7 @@ on:
- master
- 'rel/*'
- "rc/*"
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
@@ -16,6 +17,7 @@ on:
- master
- 'rel/*'
- "rc/*"
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
diff --git a/.github/workflows/multi-language-client.yml
b/.github/workflows/multi-language-client.yml
index 5b66391a408..bf5e3c95464 100644
--- a/.github/workflows/multi-language-client.yml
+++ b/.github/workflows/multi-language-client.yml
@@ -4,6 +4,7 @@ on:
branches:
- master
- "rc/*"
+ - 'TreeToTableView'
paths:
- 'pom.xml'
- 'iotdb-client/pom.xml'
@@ -17,6 +18,7 @@ on:
branches:
- master
- "rc/*"
+ - 'TreeToTableView'
paths:
- 'pom.xml'
- 'iotdb-client/pom.xml'
diff --git a/.github/workflows/pipe-it-2cluster.yml
b/.github/workflows/pipe-it-2cluster.yml
index ba2d5ed8c15..a6466eb56ad 100644
--- a/.github/workflows/pipe-it-2cluster.yml
+++ b/.github/workflows/pipe-it-2cluster.yml
@@ -6,6 +6,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
@@ -15,6 +16,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
diff --git a/.github/workflows/sonar-codecov.yml
b/.github/workflows/sonar-codecov.yml
index b20bdeb0aaa..623813654ae 100644
--- a/.github/workflows/sonar-codecov.yml
+++ b/.github/workflows/sonar-codecov.yml
@@ -9,6 +9,7 @@ on:
- master
- "rel/*"
- "rc/*"
+ - 'TreeToTableView'
paths-ignore:
- "docs/**"
- 'site/**'
@@ -18,6 +19,7 @@ on:
- "rel/*"
- "new_*"
- "rc/*"
+ - 'TreeToTableView'
paths-ignore:
- "docs/**"
- 'site/**'
diff --git a/.github/workflows/table-cluster-it-1c1d.yml
b/.github/workflows/table-cluster-it-1c1d.yml
index a63299d6f64..47b109835a8 100644
--- a/.github/workflows/table-cluster-it-1c1d.yml
+++ b/.github/workflows/table-cluster-it-1c1d.yml
@@ -6,6 +6,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
@@ -14,6 +15,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
diff --git a/.github/workflows/table-cluster-it-1c3d.yml
b/.github/workflows/table-cluster-it-1c3d.yml
index 729eeb099c4..3e02cfcf53f 100644
--- a/.github/workflows/table-cluster-it-1c3d.yml
+++ b/.github/workflows/table-cluster-it-1c3d.yml
@@ -6,6 +6,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
@@ -14,6 +15,7 @@ on:
- master
- 'rel/1.*'
- 'rc/1.*'
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
diff --git a/.github/workflows/todos-check.yml
b/.github/workflows/todos-check.yml
index 3ac6902cff1..282e215eb60 100644
--- a/.github/workflows/todos-check.yml
+++ b/.github/workflows/todos-check.yml
@@ -6,6 +6,7 @@ on:
- master
- 'rel/*'
- "rc/*"
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml
index ff3017806c2..5629df946de 100644
--- a/.github/workflows/unit-test.yml
+++ b/.github/workflows/unit-test.yml
@@ -9,6 +9,7 @@ on:
- master
- 'rel/*'
- "rc/*"
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
@@ -17,6 +18,7 @@ on:
- master
- 'rel/*'
- "rc/*"
+ - 'TreeToTableView'
paths-ignore:
- 'docs/**'
- 'site/**'
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TreeAlignedDeviceViewAggregationScanOperator.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TreeAlignedDeviceViewAggregationScanOperator.java
index 3efdf7638b0..84b9199447f 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TreeAlignedDeviceViewAggregationScanOperator.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TreeAlignedDeviceViewAggregationScanOperator.java
@@ -27,25 +27,16 @@ import
org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.SeriesScanOpt
import org.apache.iotdb.db.queryengine.plan.relational.metadata.ColumnSchema;
import org.apache.iotdb.db.queryengine.plan.relational.metadata.DeviceEntry;
+import org.apache.tsfile.file.metadata.IDeviceID;
import org.apache.tsfile.write.schema.IMeasurementSchema;
import java.util.List;
import java.util.Set;
-import static
org.apache.iotdb.db.queryengine.execution.operator.source.relational.TreeAlignedDeviceViewScanOperator.getNthIdColumnValueForTree;
-
public class TreeAlignedDeviceViewAggregationScanOperator
extends AbstractAggregationTableScanOperator {
- // in iotdb, db level should at least be 2 level, like root.db
- // if db level is 2, idColumnStartIndex is 0, and we use should treeDBLength
to extract the first
- // id column value
- // if db level is larger than 2, idColumnStartIndex will be db level - 2
- private final int idColumnStartIndex;
-
- // only take effect, if db level is 2 level, for root.db.d1, IDeviceId will
be [root.db.d1],
- // treeDBLength will be 7 (root.db)
- private final int treeDBLength;
+ private final IDeviceID.TreeDeviceIdColumnValueExtractor extractor;
public TreeAlignedDeviceViewAggregationScanOperator(
PlanNodeId sourceId,
@@ -64,8 +55,7 @@ public class TreeAlignedDeviceViewAggregationScanOperator
boolean ascending,
boolean canUseStatistics,
List<Integer> aggregatorInputChannels,
- int idColumnStartIndex,
- int treeDBLength) {
+ IDeviceID.TreeDeviceIdColumnValueExtractor extractor) {
super(
sourceId,
context,
@@ -83,13 +73,11 @@ public class TreeAlignedDeviceViewAggregationScanOperator
ascending,
canUseStatistics,
aggregatorInputChannels);
- this.idColumnStartIndex = idColumnStartIndex;
- this.treeDBLength = treeDBLength;
+ this.extractor = extractor;
}
@Override
String getNthIdColumnValue(DeviceEntry deviceEntry, int idColumnIndex) {
- return getNthIdColumnValueForTree(
- deviceEntry, idColumnIndex, this.idColumnStartIndex,
this.treeDBLength);
+ return (String) extractor.extract(deviceEntry.getDeviceID(),
idColumnIndex);
}
}
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TreeAlignedDeviceViewScanOperator.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TreeAlignedDeviceViewScanOperator.java
index bd8205d937c..a194230d782 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TreeAlignedDeviceViewScanOperator.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TreeAlignedDeviceViewScanOperator.java
@@ -26,6 +26,7 @@ import
org.apache.iotdb.db.queryengine.plan.relational.metadata.ColumnSchema;
import org.apache.iotdb.db.queryengine.plan.relational.metadata.DeviceEntry;
import org.apache.iotdb.db.queryengine.plan.statement.component.Ordering;
+import org.apache.tsfile.file.metadata.IDeviceID;
import org.apache.tsfile.write.schema.IMeasurementSchema;
import java.util.List;
@@ -33,15 +34,7 @@ import java.util.Set;
public class TreeAlignedDeviceViewScanOperator extends
AbstractTableScanOperator {
- // in iotdb, db level should at least be 2 level, like root.db
- // if db level is 2, idColumnStartIndex is 0, and we use should treeDBLength
to extract the first
- // id column value
- // if db level is larger than 2, idColumnStartIndex will be db level - 2
- private final int idColumnStartIndex;
-
- // only take effect, if db level is 2 level, for root.db.d1, IDeviceId will
be [root.db.d1],
- // treeDBLength will be 7 (root.db)
- private final int treeDBLength;
+ private final IDeviceID.TreeDeviceIdColumnValueExtractor extractor;
public TreeAlignedDeviceViewScanOperator(
OperatorContext context,
@@ -54,9 +47,8 @@ public class TreeAlignedDeviceViewScanOperator extends
AbstractTableScanOperator
List<String> measurementColumnNames,
Set<String> allSensors,
List<IMeasurementSchema> measurementSchemas,
- int idColumnStartIndex,
- int treeDBLength,
- int maxTsBlockLineNum) {
+ int maxTsBlockLineNum,
+ IDeviceID.TreeDeviceIdColumnValueExtractor extractor) {
super(
context,
sourceId,
@@ -69,38 +61,11 @@ public class TreeAlignedDeviceViewScanOperator extends
AbstractTableScanOperator
allSensors,
measurementSchemas,
maxTsBlockLineNum);
- this.idColumnStartIndex = idColumnStartIndex;
- this.treeDBLength = treeDBLength;
+ this.extractor = extractor;
}
@Override
String getNthIdColumnValue(DeviceEntry deviceEntry, int idColumnIndex) {
- return getNthIdColumnValueForTree(
- deviceEntry, idColumnIndex, this.idColumnStartIndex,
this.treeDBLength);
- }
-
- /**
- * getNthIdColumnValueForTree
- *
- * @param idColumnStartIndex in iotdb, db level should at least be 2 level,
like root.db, if db
- * level is 2, idColumnStartIndex is 0, and we use should treeDBLength
to extract the first id
- * column value. if db level is larger than 2, idColumnStartIndex will
be db level - 2
- * @param treeDBLength only take effect, if db level is 2 level, for
root.db.d1, IDeviceId will be
- * [root.db.d1], treeDBLength will be 7 (root.db)
- */
- public static String getNthIdColumnValueForTree(
- DeviceEntry deviceEntry, int idColumnIndex, int idColumnStartIndex, int
treeDBLength) {
- if (idColumnStartIndex == 0) {
- if (idColumnIndex == 0) {
- // + 1 for skipping the `.` after db name, for root.db.d1, IDeviceId
will be [root.db.d1],
- // treeDBLength will be 7 (root.db), we only need the `d1` which is
starting from 8
- return ((String) deviceEntry.getNthSegment(0)).substring(treeDBLength
+ 1);
- } else {
- return ((String) deviceEntry.getNthSegment(idColumnIndex));
- }
- } else {
- // + idColumnStartIndex for skipping the tree db name segment
- return ((String) deviceEntry.getNthSegment(idColumnIndex +
idColumnStartIndex));
- }
+ return (String) extractor.extract(deviceEntry.getDeviceID(),
idColumnIndex);
}
}
diff --git a/pom.xml b/pom.xml
index ce2a1a89d0f..bf1296ff75f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -167,7 +167,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.2.0-241211-SNAPSHOT</tsfile.version>
+ <tsfile.version>1.2.0-241220-SNAPSHOT</tsfile.version>
</properties>
<!--
if we claim dependencies in dependencyManagement, then we do not claim