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/10/10 11:31:21 UTC

[GitHub] [iotdb] qiaojialin commented on a diff in pull request #7519: [IOTDB-4571] Add doc in IPartitionFetcher and fix incorrect use.

qiaojialin commented on code in PR #7519:
URL: https://github.com/apache/iotdb/pull/7519#discussion_r991178056


##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/IPartitionFetcher.java:
##########
@@ -30,28 +30,52 @@
 
 public interface IPartitionFetcher {
 
+  /** get schema partition without automatically create, used in write and query scenarios. */
   SchemaPartition getSchemaPartition(PathPatternTree patternTree);
 
+  /**
+   * get or create schema partition, used when create schema. if schemaPartition not exists, then

Review Comment:
   ```suggestion
      * Get or create schema partition, used in insertion with enable_auto_create_schema is true. if schemaPartition does not exist, then
   ```



##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/IPartitionFetcher.java:
##########
@@ -30,28 +30,52 @@
 
 public interface IPartitionFetcher {
 
+  /** get schema partition without automatically create, used in write and query scenarios. */

Review Comment:
   ```suggestion
     /** Get schema partition without automatically create, used in write and query scenarios. */
   ```



##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/IPartitionFetcher.java:
##########
@@ -30,28 +30,52 @@
 
 public interface IPartitionFetcher {
 
+  /** get schema partition without automatically create, used in write and query scenarios. */
   SchemaPartition getSchemaPartition(PathPatternTree patternTree);
 
+  /**
+   * get or create schema partition, used when create schema. if schemaPartition not exists, then
+   * automatically create.
+   */
   SchemaPartition getOrCreateSchemaPartition(PathPatternTree patternTree);
 
+  /**
+   * get data partition without automatically create storage group, used in query scenarios.

Review Comment:
   ```suggestion
      * Get data partition, used in query scenarios.
   ```



##########
server/src/assembly/resources/conf/iotdb-datanode.properties:
##########
@@ -748,6 +748,8 @@ timestamp_precision=ms
 ####################
 
 # Whether creating schema automatically is enabled
+# If true, then  create storage group and timeseries automatically when not exists

Review Comment:
   ```suggestion
   # If true, then create storage group and timeseries automatically when not exists in insertion
   ```



##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/IPartitionFetcher.java:
##########
@@ -30,28 +30,52 @@
 
 public interface IPartitionFetcher {
 
+  /** get schema partition without automatically create, used in write and query scenarios. */
   SchemaPartition getSchemaPartition(PathPatternTree patternTree);
 
+  /**
+   * get or create schema partition, used when create schema. if schemaPartition not exists, then
+   * automatically create.
+   */
   SchemaPartition getOrCreateSchemaPartition(PathPatternTree patternTree);
 
+  /**
+   * get data partition without automatically create storage group, used in query scenarios.
+   *
+   * @param sgNameToQueryParamsMap storage group name -> the list of DataPartitionQueryParams
+   */
+  DataPartition getDataPartition(Map<String, List<DataPartitionQueryParam>> sgNameToQueryParamsMap);
+
+  /**
+   * get or create data partition, used in write scenarios. if storage group not exists, then
+   * automatically create.
+   *
+   * @param sgNameToQueryParamsMap storage group name -> the list of DataPartitionQueryParams
+   */
+  DataPartition getOrCreateDataPartition(
+      Map<String, List<DataPartitionQueryParam>> sgNameToQueryParamsMap);
+
+  /**
+   * get or create data partition, used in write scenarios. if storage group not exists, then

Review Comment:
   ```suggestion
      * Get or create data partition, used in write scenarios. if storage group or series/time slots not exists, then
   ```



##########
server/src/assembly/resources/conf/iotdb-datanode.properties:
##########
@@ -748,6 +748,8 @@ timestamp_precision=ms
 ####################
 
 # Whether creating schema automatically is enabled
+# If true, then  create storage group and timeseries automatically when not exists
+# Or else, user need to create storage group and timeseries manually.

Review Comment:
   ```suggestion
   # Or else, user need to create storage group and timeseries before insertion.
   ```



##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/IPartitionFetcher.java:
##########
@@ -30,28 +30,52 @@
 
 public interface IPartitionFetcher {
 
+  /** get schema partition without automatically create, used in write and query scenarios. */
   SchemaPartition getSchemaPartition(PathPatternTree patternTree);
 
+  /**
+   * get or create schema partition, used when create schema. if schemaPartition not exists, then
+   * automatically create.
+   */
   SchemaPartition getOrCreateSchemaPartition(PathPatternTree patternTree);
 
+  /**
+   * get data partition without automatically create storage group, used in query scenarios.
+   *
+   * @param sgNameToQueryParamsMap storage group name -> the list of DataPartitionQueryParams
+   */
+  DataPartition getDataPartition(Map<String, List<DataPartitionQueryParam>> sgNameToQueryParamsMap);
+
+  /**
+   * get or create data partition, used in write scenarios. if storage group not exists, then

Review Comment:
   ```suggestion
      * get or create data partition, used in write scenarios. if storage group or series/time slots not exists, then
   ```



-- 
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