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

haonan pushed a commit to branch rel/1.0
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rel/1.0 by this push:
     new 54757492dc [To rel/1.0][IOTDB-5446] Add V_1_0 version and update 
version used in IoTDB (#8954)
54757492dc is described below

commit 54757492dc6e4f344ba3cee93610a8fd4f26c9d7
Author: ZhangHongYin <[email protected]>
AuthorDate: Fri Feb 3 17:21:14 2023 +0800

    [To rel/1.0][IOTDB-5446] Add V_1_0 version and update version used in IoTDB 
(#8954)
    
    Co-authored-by: Haonan <[email protected]>
---
 client-cpp/src/main/Session.cpp                        |  2 ++
 client-cpp/src/main/Session.h                          | 10 +++++-----
 client-py/iotdb/Session.py                             |  2 +-
 docs/UserGuide/API/Programming-JDBC.md                 |  4 ++--
 docs/UserGuide/API/Programming-Java-Native-API.md      |  2 +-
 docs/zh/UserGuide/API/Programming-JDBC.md              |  4 ++--
 docs/zh/UserGuide/API/Programming-Java-Native-API.md   |  2 +-
 .../src/main/java/org/apache/iotdb/JDBCExample.java    |  2 +-
 .../apache/iotdb/SyntaxConventionRelatedExample.java   |  2 +-
 .../src/main/java/org/apache/iotdb/SessionExample.java |  2 +-
 .../apache/iotdb/SyntaxConventionRelatedExample.java   |  2 +-
 .../org/apache/iotdb/db/it/sync/SyncTransportTest.java |  4 ++--
 .../versionadaption/IoTDBDDLVersionAdaptionIT.java     |  6 +++---
 .../IoTDBDeletionVersionAdaptionIT.java                | 18 +++++++++---------
 .../versionadaption/IoTDBQueryVersionAdaptionIT.java   |  8 ++++----
 .../java/org/apache/iotdb/isession/SessionConfig.java  |  2 +-
 .../java/org/apache/iotdb/isession/util/Version.java   |  3 ++-
 jdbc/src/main/java/org/apache/iotdb/jdbc/Config.java   |  4 +++-
 jdbc/src/main/java/org/apache/iotdb/jdbc/Constant.java |  3 ++-
 .../org/apache/iotdb/commons/conf/IoTDBConstant.java   |  3 ++-
 .../apache/iotdb/db/client/DataNodeInternalClient.java |  7 ++-----
 .../iotdb/db/protocol/mqtt/MPPPublishHandler.java      |  4 ++--
 .../thrift/impl/DataNodeInternalRPCServiceImpl.java    |  5 ++---
 23 files changed, 52 insertions(+), 49 deletions(-)

diff --git a/client-cpp/src/main/Session.cpp b/client-cpp/src/main/Session.cpp
index 253c18039f..29968b26b4 100644
--- a/client-cpp/src/main/Session.cpp
+++ b/client-cpp/src/main/Session.cpp
@@ -793,6 +793,8 @@ string Session::getVersionString(Version::Version version) {
             return "V_0_12";
         case Version::V_0_13:
             return "V_0_13";
+        case Version::V_1_0:
+            return "V_1_0";
         default:
             return "V_0_12";
     }
diff --git a/client-cpp/src/main/Session.h b/client-cpp/src/main/Session.h
index 2f098be71a..94219aa57e 100644
--- a/client-cpp/src/main/Session.h
+++ b/client-cpp/src/main/Session.h
@@ -127,7 +127,7 @@ public:
 
 namespace Version {
     enum Version {
-        V_0_12, V_0_13
+        V_0_12, V_0_13, V_1_0
     };
 }
 
@@ -984,7 +984,7 @@ private:
     std::string getVersionString(Version::Version version);
 
 public:
-    Session(const std::string &host, int rpcPort) : username("user"), 
password("password"), version(Version::V_0_13) {
+    Session(const std::string &host, int rpcPort) : username("user"), 
password("password"), version(Version::V_1_0) {
         this->host = host;
         this->rpcPort = rpcPort;
     }
@@ -996,7 +996,7 @@ public:
         this->username = username;
         this->password = password;
         this->zoneId = "UTC+08:00";
-        this->version = Version::V_0_13;
+        this->version = Version::V_1_0;
     }
 
     Session(const std::string &host, int rpcPort, const std::string &username, 
const std::string &password,
@@ -1007,7 +1007,7 @@ public:
         this->password = password;
         this->fetchSize = fetchSize;
         this->zoneId = "UTC+08:00";
-        this->version = Version::V_0_13;
+        this->version = Version::V_1_0;
     }
 
     Session(const std::string &host, const std::string &rpcPort, const 
std::string &username = "user",
@@ -1018,7 +1018,7 @@ public:
         this->password = password;
         this->fetchSize = fetchSize;
         this->zoneId = "UTC+08:00";
-        this->version = Version::V_0_13;
+        this->version = Version::V_1_0;
     }
 
     ~Session();
diff --git a/client-py/iotdb/Session.py b/client-py/iotdb/Session.py
index 2c599f0a3c..0dc516ce2f 100644
--- a/client-py/iotdb/Session.py
+++ b/client-py/iotdb/Session.py
@@ -123,7 +123,7 @@ class Session(object):
             username=self.__user,
             password=self.__password,
             zoneId=self.__zone_id,
-            configuration={"version": "V_0_13"},
+            configuration={"version": "V_1_0"},
         )
 
         try:
diff --git a/docs/UserGuide/API/Programming-JDBC.md 
b/docs/UserGuide/API/Programming-JDBC.md
index 801dcbbde7..3122634563 100644
--- a/docs/UserGuide/API/Programming-JDBC.md
+++ b/docs/UserGuide/API/Programming-JDBC.md
@@ -213,6 +213,6 @@ public class JDBCExample {
 
 The parameter `version` can be used in the url:
 ````java
-String url = "jdbc:iotdb://127.0.0.1:6667?version=V_0_12";
+String url = "jdbc:iotdb://127.0.0.1:6667?version=V_1_0";
 ````
-The parameter `version` represents the SQL semantic version used by the 
client, which is used to be compatible with the SQL semantics of 0.12 when 
upgrading 0.13. The possible values are: `V_0_12`, `V_0_13`.
+The parameter `version` represents the SQL semantic version used by the 
client, which is used to be compatible with the SQL semantics of 0.12 when 
upgrading 0.13. The possible values are: `V_0_12`, `V_0_13`, `V_1_0`.
diff --git a/docs/UserGuide/API/Programming-Java-Native-API.md 
b/docs/UserGuide/API/Programming-Java-Native-API.md
index 996d6d18ba..8e42fb7be5 100644
--- a/docs/UserGuide/API/Programming-Java-Native-API.md
+++ b/docs/UserGuide/API/Programming-Java-Native-API.md
@@ -91,7 +91,7 @@ session =
         .build();
 ```
 
-Version represents the SQL semantic version used by the client, which is used 
to be compatible with the SQL semantics of 0.12 when upgrading 0.13. The 
possible values are: `V_0_12`, `V_0_13`.
+Version represents the SQL semantic version used by the client, which is used 
to be compatible with the SQL semantics of 0.12 when upgrading 0.13. The 
possible values are: `V_0_12`, `V_0_13`, `V_1_0`.
 
 * Open a Session
 
diff --git a/docs/zh/UserGuide/API/Programming-JDBC.md 
b/docs/zh/UserGuide/API/Programming-JDBC.md
index 94730f8aaf..f0c0b5de19 100644
--- a/docs/zh/UserGuide/API/Programming-JDBC.md
+++ b/docs/zh/UserGuide/API/Programming-JDBC.md
@@ -203,6 +203,6 @@ public class JDBCExample {
 
 可以在 url 中指定 version 参数:
 ```java
-String url = "jdbc:iotdb://127.0.0.1:6667?version=V_0_12";
+String url = "jdbc:iotdb://127.0.0.1:6667?version=V_1_0";
 ```
-version 表示客户端使用的 SQL 语义版本,用于升级 0.13 时兼容 0.12 的 SQL 语义,可能取值有:`V_0_12`、`V_0_13`。
+version 表示客户端使用的 SQL 语义版本,用于升级 0.13 时兼容 0.12 的 SQL 
语义,可能取值有:`V_0_12`、`V_0_13`、`V_1_0`。
diff --git a/docs/zh/UserGuide/API/Programming-Java-Native-API.md 
b/docs/zh/UserGuide/API/Programming-Java-Native-API.md
index 79ce2bba3c..fe774b3145 100644
--- a/docs/zh/UserGuide/API/Programming-Java-Native-API.md
+++ b/docs/zh/UserGuide/API/Programming-Java-Native-API.md
@@ -94,7 +94,7 @@ session =
         .build();
 ```
 
-其中,version 表示客户端使用的 SQL 语义版本,用于升级 0.13 时兼容 0.12 的 SQL 
语义,可能取值有:`V_0_12`、`V_0_13`。
+其中,version 表示客户端使用的 SQL 语义版本,用于升级 0.13 时兼容 0.12 的 SQL 
语义,可能取值有:`V_0_12`、`V_0_13`、`V_1_0`。
 
 * 开启 Session
 
diff --git a/example/jdbc/src/main/java/org/apache/iotdb/JDBCExample.java 
b/example/jdbc/src/main/java/org/apache/iotdb/JDBCExample.java
index 84560120c3..2e8907f9f4 100644
--- a/example/jdbc/src/main/java/org/apache/iotdb/JDBCExample.java
+++ b/example/jdbc/src/main/java/org/apache/iotdb/JDBCExample.java
@@ -33,7 +33,7 @@ public class JDBCExample {
     Class.forName("org.apache.iotdb.jdbc.IoTDBDriver");
     try (Connection connection =
             DriverManager.getConnection(
-                "jdbc:iotdb://127.0.0.1:6667?version=V_0_13", "root", "root");
+                "jdbc:iotdb://127.0.0.1:6667?version=V_1_0", "root", "root");
         Statement statement = connection.createStatement()) {
 
       // set JDBC fetchSize
diff --git 
a/example/jdbc/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java
 
b/example/jdbc/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java
index 73d547a5c2..29c25f1137 100644
--- 
a/example/jdbc/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java
+++ 
b/example/jdbc/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java
@@ -65,7 +65,7 @@ public class SyntaxConventionRelatedExample {
     Class.forName("org.apache.iotdb.jdbc.IoTDBDriver");
     try (Connection connection =
             DriverManager.getConnection(
-                "jdbc:iotdb://127.0.0.1:6667?version=V_0_13", "root", "root");
+                "jdbc:iotdb://127.0.0.1:6667?version=V_1_0", "root", "root");
         Statement statement = connection.createStatement()) {
 
       // set JDBC fetchSize
diff --git a/example/session/src/main/java/org/apache/iotdb/SessionExample.java 
b/example/session/src/main/java/org/apache/iotdb/SessionExample.java
index fc50a3acd7..c908179e56 100644
--- a/example/session/src/main/java/org/apache/iotdb/SessionExample.java
+++ b/example/session/src/main/java/org/apache/iotdb/SessionExample.java
@@ -66,7 +66,7 @@ public class SessionExample {
             .port(6667)
             .username("root")
             .password("root")
-            .version(Version.V_0_13)
+            .version(Version.V_1_0)
             .build();
     session.open(false);
 
diff --git 
a/example/session/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java
 
b/example/session/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java
index f6dcf24ecd..146716f10b 100644
--- 
a/example/session/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java
+++ 
b/example/session/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java
@@ -76,7 +76,7 @@ public class SyntaxConventionRelatedExample {
             .port(6667)
             .username("root")
             .password("root")
-            .version(Version.V_0_13)
+            .version(Version.V_1_0)
             .build();
     session.open(false);
 
diff --git 
a/integration-test/src/test/java/org/apache/iotdb/db/it/sync/SyncTransportTest.java
 
b/integration-test/src/test/java/org/apache/iotdb/db/it/sync/SyncTransportTest.java
index 64a091a911..ce87348eac 100644
--- 
a/integration-test/src/test/java/org/apache/iotdb/db/it/sync/SyncTransportTest.java
+++ 
b/integration-test/src/test/java/org/apache/iotdb/db/it/sync/SyncTransportTest.java
@@ -267,7 +267,7 @@ public class SyncTransportTest {
   //            .port(6667)
   //            .username("root")
   //            .password("root")
-  //            .version(Version.V_0_13)
+  //            .version(Version.V_1_0)
   //            .build();
   //    try {
   //      session.open(false);
@@ -299,7 +299,7 @@ public class SyncTransportTest {
   //            .port(6667)
   //            .username("root")
   //            .password("root")
-  //            .version(Version.V_0_13)
+  //            .version(Version.V_1_0)
   //            .build();
   //    try {
   //      session.open(false);
diff --git 
a/integration/src/test/java/org/apache/iotdb/db/integration/versionadaption/IoTDBDDLVersionAdaptionIT.java
 
b/integration/src/test/java/org/apache/iotdb/db/integration/versionadaption/IoTDBDDLVersionAdaptionIT.java
index 062abdf701..5d3e2e68c6 100644
--- 
a/integration/src/test/java/org/apache/iotdb/db/integration/versionadaption/IoTDBDDLVersionAdaptionIT.java
+++ 
b/integration/src/test/java/org/apache/iotdb/db/integration/versionadaption/IoTDBDDLVersionAdaptionIT.java
@@ -53,7 +53,7 @@ public class IoTDBDDLVersionAdaptionIT {
   private static final Logger logger = 
LoggerFactory.getLogger(IoTDBDDLVersionAdaptionIT.class);
 
   private static void insertSQL() {
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
 
       String[] insertSqls =
@@ -288,7 +288,7 @@ public class IoTDBDDLVersionAdaptionIT {
   }
 
   private void executeAndCheckResult(String[] sqls, Set<String>[] standards) 
throws SQLException {
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
       for (int n = 0; n < sqls.length; n++) {
         String sql = sqls[n];
@@ -342,7 +342,7 @@ public class IoTDBDDLVersionAdaptionIT {
 
   private void executeDeleteAndCheckResult(String deleteSql, String showSql, 
String[] expected)
       throws Exception {
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
       statement.execute(deleteSql);
       boolean hasResult = statement.execute(showSql);
diff --git 
a/integration/src/test/java/org/apache/iotdb/db/integration/versionadaption/IoTDBDeletionVersionAdaptionIT.java
 
b/integration/src/test/java/org/apache/iotdb/db/integration/versionadaption/IoTDBDeletionVersionAdaptionIT.java
index 69b027b20c..029fbe1362 100644
--- 
a/integration/src/test/java/org/apache/iotdb/db/integration/versionadaption/IoTDBDeletionVersionAdaptionIT.java
+++ 
b/integration/src/test/java/org/apache/iotdb/db/integration/versionadaption/IoTDBDeletionVersionAdaptionIT.java
@@ -80,7 +80,7 @@ public class IoTDBDeletionVersionAdaptionIT {
   @Test
   public void test() throws SQLException {
     prepareData();
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
 
       statement.execute("DELETE FROM root.vehicle.d0.s0  WHERE time <= 300");
@@ -120,7 +120,7 @@ public class IoTDBDeletionVersionAdaptionIT {
   public void testMerge() throws SQLException {
     prepareMerge();
 
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
       statement.execute("merge");
       statement.execute("DELETE FROM root.vehicle.d0 WHERE time <= 15000");
@@ -149,7 +149,7 @@ public class IoTDBDeletionVersionAdaptionIT {
   @Test
   public void testRangeDelete() throws SQLException {
     prepareData();
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
 
       statement.execute("DELETE FROM root.vehicle.d0.s0 WHERE time <= 300");
@@ -185,7 +185,7 @@ public class IoTDBDeletionVersionAdaptionIT {
   @Test
   public void testPartialPathRangeDelete() throws SQLException {
     prepareData();
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
 
       statement.execute("DELETE FROM root.vehicle.d0.* WHERE time <= 300 and 
time > 150");
@@ -211,7 +211,7 @@ public class IoTDBDeletionVersionAdaptionIT {
 
   @Test
   public void testDeleteAll() throws SQLException {
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
       statement.execute("insert into root.lz.dev.GPS(time, latitude, 
longitude) values(9,3.2,9.8)");
       statement.execute("insert into root.lz.dev.GPS(time, latitude) 
values(11,4.5)");
@@ -237,7 +237,7 @@ public class IoTDBDeletionVersionAdaptionIT {
   }
 
   private static void prepareSeries() {
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
 
       for (String sql : creationSqls) {
@@ -249,7 +249,7 @@ public class IoTDBDeletionVersionAdaptionIT {
   }
 
   private void prepareData() throws SQLException {
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
 
       // prepare BufferWrite file
@@ -278,14 +278,14 @@ public class IoTDBDeletionVersionAdaptionIT {
   }
 
   private void cleanData() throws SQLException {
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
       statement.execute(deleteAllTemplate);
     }
   }
 
   public void prepareMerge() throws SQLException {
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
 
       // prepare BufferWrite data
diff --git 
a/integration/src/test/java/org/apache/iotdb/db/integration/versionadaption/IoTDBQueryVersionAdaptionIT.java
 
b/integration/src/test/java/org/apache/iotdb/db/integration/versionadaption/IoTDBQueryVersionAdaptionIT.java
index 6c74c6d862..2e075f7b39 100644
--- 
a/integration/src/test/java/org/apache/iotdb/db/integration/versionadaption/IoTDBQueryVersionAdaptionIT.java
+++ 
b/integration/src/test/java/org/apache/iotdb/db/integration/versionadaption/IoTDBQueryVersionAdaptionIT.java
@@ -141,7 +141,7 @@ public class IoTDBQueryVersionAdaptionIT {
   }
 
   private static void importData() {
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
 
       for (String sql : sqls) {
@@ -169,7 +169,7 @@ public class IoTDBQueryVersionAdaptionIT {
           "1509466140000,false,20.98,v1,false,false,20.98,",
         };
 
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
       boolean hasResultSet = statement.execute("select * from root where 
time>10");
       Assert.assertTrue(hasResultSet);
@@ -226,7 +226,7 @@ public class IoTDBQueryVersionAdaptionIT {
                 "1509466140000,root.ln.wf01.wt01.temperature,20.98177,FLOAT",
                 "1509466140000,root.ln.wf01.wt01.status,false,BOOLEAN"));
 
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
 
       boolean hasResultSet = statement.execute("select last * from root order 
by time desc");
@@ -260,7 +260,7 @@ public class IoTDBQueryVersionAdaptionIT {
           "1509465600000,root.sgcc.wf03.wt01,25.96,true,null,"
         };
 
-    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_0_12);
+    try (Connection connection = 
EnvFactory.getEnv().getConnection(Constant.Version.V_1_0);
         Statement statement = connection.createStatement()) {
       boolean hasResultSet =
           statement.execute("select * from root.* where temperature >= 
25.957603 align by device");
diff --git 
a/isession/src/main/java/org/apache/iotdb/isession/SessionConfig.java 
b/isession/src/main/java/org/apache/iotdb/isession/SessionConfig.java
index e043f9e894..685f47d740 100644
--- a/isession/src/main/java/org/apache/iotdb/isession/SessionConfig.java
+++ b/isession/src/main/java/org/apache/iotdb/isession/SessionConfig.java
@@ -47,5 +47,5 @@ public class SessionConfig {
 
   public static final int DEFAULT_SESSION_POOL_MAX_SIZE = 5;
 
-  public static final Version DEFAULT_VERSION = Version.V_0_13;
+  public static final Version DEFAULT_VERSION = Version.V_1_0;
 }
diff --git a/isession/src/main/java/org/apache/iotdb/isession/util/Version.java 
b/isession/src/main/java/org/apache/iotdb/isession/util/Version.java
index 31f3880439..8d7f46cd51 100644
--- a/isession/src/main/java/org/apache/iotdb/isession/util/Version.java
+++ b/isession/src/main/java/org/apache/iotdb/isession/util/Version.java
@@ -21,5 +21,6 @@ package org.apache.iotdb.isession.util;
 
 public enum Version {
   V_0_12,
-  V_0_13
+  V_0_13,
+  V_1_0
 }
diff --git a/jdbc/src/main/java/org/apache/iotdb/jdbc/Config.java 
b/jdbc/src/main/java/org/apache/iotdb/jdbc/Config.java
index 2187ec8144..de74b16a7d 100644
--- a/jdbc/src/main/java/org/apache/iotdb/jdbc/Config.java
+++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/Config.java
@@ -18,6 +18,8 @@
  */
 package org.apache.iotdb.jdbc;
 
+import org.apache.iotdb.jdbc.Constant.Version;
+
 public class Config {
 
   private Config() {}
@@ -47,7 +49,7 @@ public class Config {
   static final int DEFAULT_CONNECTION_TIMEOUT_MS = 0;
 
   public static final String VERSION = "version";
-  static final Constant.Version DEFAULT_VERSION = Constant.Version.V_0_13;
+  static final Constant.Version DEFAULT_VERSION = Version.V_1_0;
 
   public static final String JDBC_DRIVER_NAME = 
"org.apache.iotdb.jdbc.IoTDBDriver";
 
diff --git a/jdbc/src/main/java/org/apache/iotdb/jdbc/Constant.java 
b/jdbc/src/main/java/org/apache/iotdb/jdbc/Constant.java
index ded2d3dd73..3f0893515f 100644
--- a/jdbc/src/main/java/org/apache/iotdb/jdbc/Constant.java
+++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/Constant.java
@@ -44,6 +44,7 @@ public class Constant {
   // version number
   public enum Version {
     V_0_12,
-    V_0_13
+    V_0_13,
+    V_1_0
   }
 }
diff --git 
a/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java 
b/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java
index ca68d8283c..fee8023ef9 100644
--- 
a/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java
+++ 
b/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java
@@ -273,7 +273,8 @@ public class IoTDBConstant {
   // client version number
   public enum ClientVersion {
     V_0_12,
-    V_0_13
+    V_0_13,
+    V_1_0
   }
 
   // select into
diff --git 
a/server/src/main/java/org/apache/iotdb/db/client/DataNodeInternalClient.java 
b/server/src/main/java/org/apache/iotdb/db/client/DataNodeInternalClient.java
index ecab514495..a632e38ff9 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/client/DataNodeInternalClient.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/client/DataNodeInternalClient.java
@@ -20,7 +20,7 @@
 package org.apache.iotdb.db.client;
 
 import org.apache.iotdb.common.rpc.thrift.TSStatus;
-import org.apache.iotdb.commons.conf.IoTDBConstant;
+import org.apache.iotdb.commons.conf.IoTDBConstant.ClientVersion;
 import org.apache.iotdb.db.auth.AuthorityChecker;
 import org.apache.iotdb.db.conf.IoTDBConfig;
 import org.apache.iotdb.db.conf.IoTDBDescriptor;
@@ -75,10 +75,7 @@ public class DataNodeInternalClient {
       session = new InternalClientSession("SELECT_INTO");
 
       SESSION_MANAGER.supplySession(
-          session,
-          sessionInfo.getUserName(),
-          sessionInfo.getZoneId(),
-          IoTDBConstant.ClientVersion.V_0_13);
+          session, sessionInfo.getUserName(), sessionInfo.getZoneId(), 
ClientVersion.V_1_0);
 
       LOGGER.info("User: {}, opens internal Session-{}.", 
sessionInfo.getUserName(), session);
     } catch (Exception e) {
diff --git 
a/server/src/main/java/org/apache/iotdb/db/protocol/mqtt/MPPPublishHandler.java 
b/server/src/main/java/org/apache/iotdb/db/protocol/mqtt/MPPPublishHandler.java
index 6a30d70799..b164d55ff5 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/protocol/mqtt/MPPPublishHandler.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/protocol/mqtt/MPPPublishHandler.java
@@ -18,7 +18,7 @@
 package org.apache.iotdb.db.protocol.mqtt;
 
 import org.apache.iotdb.common.rpc.thrift.TSStatus;
-import org.apache.iotdb.commons.conf.IoTDBConstant;
+import org.apache.iotdb.commons.conf.IoTDBConstant.ClientVersion;
 import org.apache.iotdb.commons.path.PartialPath;
 import org.apache.iotdb.db.auth.AuthorityChecker;
 import org.apache.iotdb.db.conf.IoTDBConfig;
@@ -94,7 +94,7 @@ public class MPPPublishHandler extends 
AbstractInterceptHandler {
             new String(msg.getPassword()),
             ZoneId.systemDefault().toString(),
             TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V3,
-            IoTDBConstant.ClientVersion.V_0_13);
+            ClientVersion.V_1_0);
         clientIdToSessionMap.put(msg.getClientID(), session);
       } catch (TException e) {
         throw new RuntimeException(e);
diff --git 
a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeInternalRPCServiceImpl.java
 
b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeInternalRPCServiceImpl.java
index bf0a312c8f..e4d8ce77e3 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeInternalRPCServiceImpl.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeInternalRPCServiceImpl.java
@@ -29,7 +29,7 @@ import org.apache.iotdb.common.rpc.thrift.TSetTTLReq;
 import org.apache.iotdb.commons.cluster.NodeStatus;
 import org.apache.iotdb.commons.conf.CommonConfig;
 import org.apache.iotdb.commons.conf.CommonDescriptor;
-import org.apache.iotdb.commons.conf.IoTDBConstant;
+import org.apache.iotdb.commons.conf.IoTDBConstant.ClientVersion;
 import org.apache.iotdb.commons.consensus.ConsensusGroupId;
 import org.apache.iotdb.commons.consensus.DataRegionId;
 import org.apache.iotdb.commons.consensus.SchemaRegionId;
@@ -831,8 +831,7 @@ public class DataNodeInternalRPCServiceImpl implements 
IDataNodeRPCService.Iface
 
     SESSION_MANAGER.registerSession(session);
 
-    SESSION_MANAGER.supplySession(
-        session, req.getUsername(), req.getZoneId(), 
IoTDBConstant.ClientVersion.V_0_13);
+    SESSION_MANAGER.supplySession(session, req.getUsername(), req.getZoneId(), 
ClientVersion.V_1_0);
 
     String executedSQL = req.queryBody;
 

Reply via email to