You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2024/03/13 07:04:12 UTC
(iotdb) 02/02: merge master
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch ty/TableModelGrammar
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 06a82db678ea40211a23cecf3dd192a7bb2f4d65
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Wed Mar 13 15:04:01 2024 +0800
merge master
---
.../plan/relational/analyzer/Analysis.java | 47 +++++++++++++-
.../relational/planner/RelationalModelPlanner.java | 72 ++++++++++++++++++++++
2 files changed, 118 insertions(+), 1 deletion(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Analysis.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Analysis.java
index 0a2d4ff03df..22fcee512be 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Analysis.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Analysis.java
@@ -19,6 +19,10 @@
package org.apache.iotdb.db.queryengine.plan.relational.analyzer;
+import org.apache.iotdb.common.rpc.thrift.TSStatus;
+import org.apache.iotdb.db.queryengine.common.MPPQueryContext;
+import org.apache.iotdb.db.queryengine.common.header.DatasetHeader;
+import org.apache.iotdb.db.queryengine.plan.analyze.IAnalysis;
import org.apache.iotdb.db.queryengine.plan.relational.metadata.ColumnHandle;
import org.apache.iotdb.db.queryengine.plan.relational.metadata.QualifiedObjectName;
import org.apache.iotdb.db.queryengine.plan.relational.metadata.TableHandle;
@@ -42,6 +46,7 @@ import org.apache.iotdb.db.relational.sql.tree.Relation;
import org.apache.iotdb.db.relational.sql.tree.Statement;
import org.apache.iotdb.db.relational.sql.tree.SubqueryExpression;
import org.apache.iotdb.db.relational.sql.tree.Table;
+import org.apache.iotdb.tsfile.read.common.block.TsBlock;
import org.apache.iotdb.tsfile.read.common.type.Type;
import com.google.common.collect.ArrayListMultimap;
@@ -77,7 +82,7 @@ import static java.util.Collections.unmodifiableMap;
import static java.util.Collections.unmodifiableSet;
import static java.util.Objects.requireNonNull;
-public class Analysis {
+public class Analysis implements IAnalysis {
@Nullable private final Statement root;
@@ -537,6 +542,46 @@ public class Analysis {
return aliasedRelations.contains(NodeRef.of(relation));
}
+ @Override
+ public boolean isFailed() {
+ return false;
+ }
+
+ @Override
+ public TSStatus getFailStatus() {
+ return null;
+ }
+
+ @Override
+ public boolean canSkipExecute(MPPQueryContext context) {
+ return false;
+ }
+
+ @Override
+ public TsBlock constructResultForMemorySource(MPPQueryContext context) {
+ return null;
+ }
+
+ @Override
+ public boolean isQuery() {
+ return false;
+ }
+
+ @Override
+ public boolean needSetHighestPriority() {
+ return false;
+ }
+
+ @Override
+ public DatasetHeader getRespDatasetHeader() {
+ return null;
+ }
+
+ @Override
+ public String getStatementType() {
+ return null;
+ }
+
public static final class AccessControlInfo {
private final AccessControl accessControl;
private final Identity identity;
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/RelationalModelPlanner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/RelationalModelPlanner.java
new file mode 100644
index 00000000000..5e8486191ca
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/RelationalModelPlanner.java
@@ -0,0 +1,72 @@
+/*
+ * 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.queryengine.plan.relational.planner;
+
+import org.apache.iotdb.common.rpc.thrift.TEndPoint;
+import org.apache.iotdb.common.rpc.thrift.TSStatus;
+import org.apache.iotdb.db.queryengine.common.MPPQueryContext;
+import org.apache.iotdb.db.queryengine.execution.QueryStateMachine;
+import org.apache.iotdb.db.queryengine.plan.analyze.IAnalysis;
+import org.apache.iotdb.db.queryengine.plan.planner.IPlanner;
+import org.apache.iotdb.db.queryengine.plan.planner.plan.DistributedQueryPlan;
+import org.apache.iotdb.db.queryengine.plan.planner.plan.LogicalQueryPlan;
+import org.apache.iotdb.db.queryengine.plan.scheduler.IScheduler;
+import org.apache.iotdb.rpc.TSStatusCode;
+
+import java.util.concurrent.ScheduledExecutorService;
+
+public class RelationalModelPlanner implements IPlanner {
+
+ @Override
+ public IAnalysis analyze(MPPQueryContext context) {
+ return null;
+ }
+
+ @Override
+ public LogicalQueryPlan doLogicalPlan(IAnalysis analysis, MPPQueryContext context) {
+ return null;
+ }
+
+ @Override
+ public DistributedQueryPlan doDistributionPlan(IAnalysis analysis, LogicalQueryPlan logicalPlan) {
+ return null;
+ }
+
+ @Override
+ public IScheduler doSchedule(
+ IAnalysis analysis,
+ DistributedQueryPlan distributedPlan,
+ MPPQueryContext context,
+ QueryStateMachine stateMachine) {
+ return null;
+ }
+
+ @Override
+ public void invalidatePartitionCache() {}
+
+ @Override
+ public ScheduledExecutorService getScheduledExecutorService() {
+ return null;
+ }
+
+ @Override
+ public void setRedirectInfo(
+ IAnalysis analysis, TEndPoint localEndPoint, TSStatus tsstatus, TSStatusCode statusCode) {}
+}