diff --git a/example/session/src/main/java/org/apache/iotdb/TableModelSessionExample.java b/example/session/src/main/java/org/apache/iotdb/TableModelSessionExample.java index e93e1d1d04b5..7f2203f2e43f 100644 --- a/example/session/src/main/java/org/apache/iotdb/TableModelSessionExample.java +++ b/example/session/src/main/java/org/apache/iotdb/TableModelSessionExample.java @@ -77,7 +77,7 @@ public static void main(String[] args) { } // insert table data by tablet - List measurementNameList = + List columnNameList = Arrays.asList("region_id", "plant_id", "device_id", "model", "temperature", "humidity"); List dataTypeList = Arrays.asList( @@ -96,7 +96,7 @@ public static void main(String[] args) { Tablet.ColumnCategory.ATTRIBUTE, Tablet.ColumnCategory.MEASUREMENT, Tablet.ColumnCategory.MEASUREMENT)); - Tablet tablet = new Tablet("test1", measurementNameList, dataTypeList, columnTypeList, 100); + Tablet tablet = new Tablet("test1", columnNameList, dataTypeList, columnTypeList, 100); for (long timestamp = 0; timestamp < 100; timestamp++) { int rowIndex = tablet.getRowSize(); tablet.addTimestamp(rowIndex, timestamp); diff --git a/example/session/src/main/java/org/apache/iotdb/TableModelSessionPoolExample.java b/example/session/src/main/java/org/apache/iotdb/TableModelSessionPoolExample.java index 78cefcbc2c59..88ae7a916927 100644 --- a/example/session/src/main/java/org/apache/iotdb/TableModelSessionPoolExample.java +++ b/example/session/src/main/java/org/apache/iotdb/TableModelSessionPoolExample.java @@ -95,7 +95,7 @@ public static void main(String[] args) { } // insert table data by tablet - List measurementNameList = + List columnNameList = Arrays.asList("region_id", "plant_id", "device_id", "model", "temperature", "humidity"); List dataTypeList = Arrays.asList( @@ -114,7 +114,7 @@ public static void main(String[] args) { ColumnCategory.ATTRIBUTE, ColumnCategory.MEASUREMENT, ColumnCategory.MEASUREMENT)); - Tablet tablet = new Tablet("test1", measurementNameList, dataTypeList, columnTypeList, 100); + Tablet tablet = new Tablet("test1", columnNameList, dataTypeList, columnTypeList, 100); for (long timestamp = 0; timestamp < 100; timestamp++) { int rowIndex = tablet.getRowSize(); tablet.addTimestamp(rowIndex, timestamp); diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/query/IoTDBEncryptionValueQueryIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/query/IoTDBEncryptionValueQueryIT.java index b63e409a3e31..b2f6a9501701 100644 --- a/integration-test/src/test/java/org/apache/iotdb/db/it/query/IoTDBEncryptionValueQueryIT.java +++ b/integration-test/src/test/java/org/apache/iotdb/db/it/query/IoTDBEncryptionValueQueryIT.java @@ -26,6 +26,7 @@ import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; @@ -45,6 +46,7 @@ @RunWith(IoTDBTestRunner.class) @Category({LocalStandaloneIT.class, ClusterIT.class}) +@Ignore public class IoTDBEncryptionValueQueryIT { private static String[] sqls = new String[] { diff --git a/integration-test/src/test/java/org/apache/iotdb/pipe/it/manual/IoTDBPipeTypeConversionISessionIT.java b/integration-test/src/test/java/org/apache/iotdb/pipe/it/manual/IoTDBPipeTypeConversionISessionIT.java index 56082faa7801..f79ab8c73008 100644 --- a/integration-test/src/test/java/org/apache/iotdb/pipe/it/manual/IoTDBPipeTypeConversionISessionIT.java +++ b/integration-test/src/test/java/org/apache/iotdb/pipe/it/manual/IoTDBPipeTypeConversionISessionIT.java @@ -780,8 +780,7 @@ private Tablet generateTabletAndMeasurementSchema( break; } } - return new Tablet( - deviceId, measurementSchemas, columnTypes, timestamp, objects, bitMaps, generateDataSize); + return new Tablet(deviceId, measurementSchemas, timestamp, objects, bitMaps, generateDataSize); } private List> generateMeasurementSchemas() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertBaseStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertBaseStatement.java index c0b917f9100e..eff1ed524d71 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertBaseStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertBaseStatement.java @@ -37,9 +37,9 @@ import org.apache.iotdb.db.queryengine.plan.relational.type.InternalTypeManager; import org.apache.iotdb.db.queryengine.plan.statement.Statement; import org.apache.iotdb.db.utils.CommonUtils; -import org.apache.iotdb.db.utils.annotations.TableModel; import org.apache.iotdb.rpc.TSStatusCode; +import org.apache.tsfile.annotations.TableModel; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.utils.Pair; import org.apache.tsfile.write.schema.MeasurementSchema; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertMultiTabletsStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertMultiTabletsStatement.java index 67809709f7d8..e103e6539c44 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertMultiTabletsStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertMultiTabletsStatement.java @@ -25,8 +25,8 @@ import org.apache.iotdb.db.queryengine.plan.analyze.schema.ISchemaValidation; import org.apache.iotdb.db.queryengine.plan.statement.StatementType; import org.apache.iotdb.db.queryengine.plan.statement.StatementVisitor; -import org.apache.iotdb.db.utils.annotations.TableModel; +import org.apache.tsfile.annotations.TableModel; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.exception.NotImplementedException; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowStatement.java index 47905b362fa4..6a782f8c834a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowStatement.java @@ -39,9 +39,9 @@ import org.apache.iotdb.db.queryengine.plan.statement.StatementVisitor; import org.apache.iotdb.db.utils.CommonUtils; import org.apache.iotdb.db.utils.TypeInferenceUtils; -import org.apache.iotdb.db.utils.annotations.TableModel; import org.apache.iotdb.rpc.TSStatusCode; +import org.apache.tsfile.annotations.TableModel; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.IDeviceID; import org.apache.tsfile.file.metadata.IDeviceID.Factory; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsOfOneDeviceStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsOfOneDeviceStatement.java index 74b7e0601319..08630f829455 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsOfOneDeviceStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsOfOneDeviceStatement.java @@ -28,8 +28,8 @@ import org.apache.iotdb.db.queryengine.plan.analyze.schema.ISchemaValidation; import org.apache.iotdb.db.queryengine.plan.statement.StatementType; import org.apache.iotdb.db.queryengine.plan.statement.StatementVisitor; -import org.apache.iotdb.db.utils.annotations.TableModel; +import org.apache.tsfile.annotations.TableModel; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.exception.NotImplementedException; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsStatement.java index 58c564cee365..2d7ba7a2ba67 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsStatement.java @@ -28,8 +28,8 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Statement; import org.apache.iotdb.db.queryengine.plan.statement.StatementType; import org.apache.iotdb.db.queryengine.plan.statement.StatementVisitor; -import org.apache.iotdb.db.utils.annotations.TableModel; +import org.apache.tsfile.annotations.TableModel; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.exception.NotImplementedException; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/LoadTsFileStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/LoadTsFileStatement.java index a8c7a011710d..9e1484f638f2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/LoadTsFileStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/LoadTsFileStatement.java @@ -29,9 +29,9 @@ import org.apache.iotdb.db.queryengine.plan.statement.StatementVisitor; import org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResource; import org.apache.iotdb.db.storageengine.load.config.LoadTsFileConfigurator; -import org.apache.iotdb.db.utils.annotations.TableModel; import org.apache.iotdb.rpc.TSStatusCode; +import org.apache.tsfile.annotations.TableModel; import org.apache.tsfile.common.constant.TsFileConstant; import java.io.File; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/pipe/PipeEnrichedStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/pipe/PipeEnrichedStatement.java index e8b60b46b772..804ff5eafb11 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/pipe/PipeEnrichedStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/pipe/PipeEnrichedStatement.java @@ -26,7 +26,8 @@ import org.apache.iotdb.db.queryengine.plan.statement.Statement; import org.apache.iotdb.db.queryengine.plan.statement.StatementType; import org.apache.iotdb.db.queryengine.plan.statement.StatementVisitor; -import org.apache.iotdb.db.utils.annotations.TableModel; + +import org.apache.tsfile.annotations.TableModel; import java.util.Collections; import java.util.List; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/ModEntry.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/ModEntry.java index a4692bd01fb8..36b943291b8a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/ModEntry.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/ModEntry.java @@ -19,10 +19,10 @@ package org.apache.iotdb.db.storageengine.dataregion.modification; import org.apache.iotdb.commons.path.PartialPath; -import org.apache.iotdb.db.utils.annotations.TreeModel; import org.apache.iotdb.db.utils.io.BufferSerializable; import org.apache.iotdb.db.utils.io.StreamSerializable; +import org.apache.tsfile.annotations.TreeModel; import org.apache.tsfile.file.metadata.IDeviceID; import org.apache.tsfile.read.common.TimeRange; import org.apache.tsfile.utils.ReadWriteIOUtils; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/annotations/TableModel.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/annotations/TableModel.java deleted file mode 100644 index c2827866a686..000000000000 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/annotations/TableModel.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.iotdb.db.utils.annotations; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * This annotation indicates that the related filed, method, or constructor is only used for - * TableModel. - */ -@Target({ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR}) -@Retention(RetentionPolicy.SOURCE) -public @interface TableModel {} diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/annotations/TreeModel.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/annotations/TreeModel.java deleted file mode 100644 index e61d72812240..000000000000 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/annotations/TreeModel.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.iotdb.db.utils.annotations; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * This annotation indicates that the related filed, method, or constructor is only used for - * TreeModel. - */ -@Target({ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR}) -@Retention(RetentionPolicy.SOURCE) -public @interface TreeModel {} diff --git a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/pipe/connector/PipeDataNodeThriftRequestTest.java b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/pipe/connector/PipeDataNodeThriftRequestTest.java index 1df32c9a374a..9739cec713ad 100644 --- a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/pipe/connector/PipeDataNodeThriftRequestTest.java +++ b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/pipe/connector/PipeDataNodeThriftRequestTest.java @@ -63,7 +63,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; public class PipeDataNodeThriftRequestTest { @@ -266,26 +265,7 @@ public void testPipeTransferTabletReqV2() { schemaList.add(new MeasurementSchema("s8", TSDataType.DATE)); schemaList.add(new MeasurementSchema("s9", TSDataType.BLOB)); schemaList.add(new MeasurementSchema("s10", TSDataType.STRING)); - List columnTypes = new ArrayList<>(); - columnTypes.add(Tablet.ColumnCategory.MEASUREMENT); - columnTypes.add(Tablet.ColumnCategory.MEASUREMENT); - columnTypes.add(Tablet.ColumnCategory.MEASUREMENT); - columnTypes.add(Tablet.ColumnCategory.MEASUREMENT); - columnTypes.add(Tablet.ColumnCategory.MEASUREMENT); - columnTypes.add(Tablet.ColumnCategory.MEASUREMENT); - columnTypes.add(Tablet.ColumnCategory.MEASUREMENT); - columnTypes.add(Tablet.ColumnCategory.MEASUREMENT); - columnTypes.add(Tablet.ColumnCategory.MEASUREMENT); - columnTypes.add(Tablet.ColumnCategory.MEASUREMENT); - final Tablet t = - new Tablet( - "root.sg.d", - schemaList.stream() - .map(IMeasurementSchema::getMeasurementName) - .collect(Collectors.toList()), - IMeasurementSchema.getDataTypeList(schemaList), - columnTypes, - 1024); + final Tablet t = new Tablet("root.sg.d", schemaList, 1024); t.addTimestamp(0, 2000); t.addTimestamp(1, 1000); t.addValue("s1", 0, 2); diff --git a/pom.xml b/pom.xml index ad0eaea6bcfd..112468fa6079 100644 --- a/pom.xml +++ b/pom.xml @@ -166,7 +166,7 @@ 0.14.1 1.9 1.5.6-3 - 1.2.0-241129-SNAPSHOT + 1.2.0-241211-SNAPSHOT