walterddr commented on code in PR #11052:
URL: https://github.com/apache/pinot/pull/11052#discussion_r1272508665


##########
pinot-common/src/main/java/org/apache/pinot/sql/parsers/parser/SqlPhysicalExplain.java:
##########
@@ -0,0 +1,32 @@
+/**
+ * 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.pinot.sql.parsers.parser;
+
+import org.apache.calcite.sql.SqlExplain;
+import org.apache.calcite.sql.SqlLiteral;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.parser.SqlParserPos;
+
+
+public class SqlPhysicalExplain extends SqlExplain {

Review Comment:
   This class is used to differentiate the physical plan level in SqlExplain vs 
the Pinot specific implementation plan so a java doc is probably needed to 
explain it
   



##########
pinot-query-planner/src/main/java/org/apache/pinot/query/QueryEnvironment.java:
##########
@@ -61,6 +61,7 @@
 import org.apache.pinot.common.config.provider.TableCache;
 import org.apache.pinot.query.context.PlannerContext;
 import org.apache.pinot.query.planner.DispatchableSubPlan;
+import org.apache.pinot.query.planner.ExplainPlanPlanVisitor;

Review Comment:
   consider renaming this class to `PhysicalExplainPlanVisitor`? 



##########
pinot-query-planner/src/main/java/org/apache/pinot/query/QueryEnvironment.java:
##########
@@ -158,12 +160,11 @@ public QueryEnvironment(TypeFactory typeFactory, 
CalciteSchema rootSchema, Worke
   public QueryPlannerResult planQuery(String sqlQuery, SqlNodeAndOptions 
sqlNodeAndOptions, long requestId) {
     try (PlannerContext plannerContext = new PlannerContext(_config, 
_catalogReader, _typeFactory, _hepProgram)) {
       plannerContext.setOptions(sqlNodeAndOptions.getOptions());
-      RelRoot relRoot = compileQuery(sqlNodeAndOptions.getSqlNode(), 
plannerContext);
-      SubPlan subPlanRoot = toSubPlan(relRoot);
+      RelRoot relRoot = planQueryLogical(sqlNodeAndOptions.getSqlNode(), 
plannerContext);

Review Comment:
   since we use SqlPhysicalExplain, w no longer need the renamings, please 
revert back to `compileQuery` and `toDispatchableSubPlan`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to