You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "MarcosZyk (via GitHub)" <gi...@apache.org> on 2023/06/07 03:19:52 UTC

[GitHub] [iotdb] MarcosZyk commented on a diff in pull request #10060: Support multiple creation of views & Fix illegal view creation

MarcosZyk commented on code in PR #10060:
URL: https://github.com/apache/iotdb/pull/10060#discussion_r1220769022


##########
server/src/main/java/org/apache/iotdb/db/metadata/view/ViewPathType.java:
##########
@@ -20,7 +20,13 @@
 package org.apache.iotdb.db.metadata.view;
 
 public enum ViewPathType {
+  /** Example: root.db.d01.s01, root.db.d02.s01, root.db.d02.s02 */
   FULL_PATH_LIST,
+  /** Example: root.db(d01.s01, d02.s02, status) */
   PATHS_GROUP,
-  QUERY_STATEMENT
+  /** Example: SELECT s01, s02 FROM root.db.*; */
+  QUERY_STATEMENT,
+
+  /** Example: root.db.view(${2}_temperature) */
+  INTO_ITEM,

Review Comment:
   Rename to ```BATCH_GENERATION```



##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/statement/metadata/view/CreateLogicalViewStatement.java:
##########
@@ -21,22 +21,30 @@
 
 import org.apache.iotdb.commons.path.PartialPath;
 import org.apache.iotdb.commons.schema.view.viewExpression.ViewExpression;
+import org.apache.iotdb.db.exception.metadata.view.UnsupportedViewException;
 import org.apache.iotdb.db.metadata.view.ViewPathType;
 import org.apache.iotdb.db.metadata.view.ViewPaths;
+import org.apache.iotdb.db.mpp.plan.analyze.SelectIntoUtils;
 import org.apache.iotdb.db.mpp.plan.expression.Expression;
+import org.apache.iotdb.db.mpp.plan.expression.leaf.TimeSeriesOperand;
 import org.apache.iotdb.db.mpp.plan.statement.Statement;
 import org.apache.iotdb.db.mpp.plan.statement.StatementType;
 import org.apache.iotdb.db.mpp.plan.statement.StatementVisitor;
+import org.apache.iotdb.db.mpp.plan.statement.component.IntoComponent;
+import org.apache.iotdb.db.mpp.plan.statement.component.IntoItem;
 import org.apache.iotdb.db.mpp.plan.statement.crud.QueryStatement;
 import org.apache.iotdb.tsfile.utils.Pair;
 
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 /** CREATE LOGICAL VIEW statement. */
 public class CreateLogicalViewStatement extends Statement {
 
   // the paths of this view
   private ViewPaths targetPaths;
+  private IntoItem intoItem;

Review Comment:
   Rename the variable name to ```batchGenerationItem```, which is implemented based on IntoItem.



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