You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/02/19 06:41:09 UTC

[GitHub] [hive] jcamachor commented on a change in pull request #1929: HIVE-24704: Ensure that all Operator column expressions refer to a column in the RowSchema

jcamachor commented on a change in pull request #1929:
URL: https://github.com/apache/hive/pull/1929#discussion_r578958271



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/hooks/OperatorHealthCheckerHook.java
##########
@@ -0,0 +1,211 @@
+/*
+ * 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.hadoop.hive.ql.hooks;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.Stack;
+
+import com.google.common.collect.Lists;
+
+import com.google.common.collect.Sets;
+import org.apache.hadoop.hive.ql.exec.ColumnInfo;
+import org.apache.hadoop.hive.ql.exec.Operator;
+import org.apache.hadoop.hive.ql.exec.ReduceSinkOperator;
+import org.apache.hadoop.hive.ql.exec.RowSchema;
+import org.apache.hadoop.hive.ql.exec.ScriptOperator;
+import org.apache.hadoop.hive.ql.exec.SelectOperator;
+import org.apache.hadoop.hive.ql.exec.TableScanOperator;
+import org.apache.hadoop.hive.ql.exec.Task;
+import org.apache.hadoop.hive.ql.lib.DefaultGraphWalker;
+import org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher;
+import org.apache.hadoop.hive.ql.lib.SemanticDispatcher;
+import org.apache.hadoop.hive.ql.lib.SemanticGraphWalker;
+import org.apache.hadoop.hive.ql.lib.Node;
+import org.apache.hadoop.hive.ql.lib.SemanticNodeProcessor;
+import org.apache.hadoop.hive.ql.lib.NodeProcessorCtx;
+import org.apache.hadoop.hive.ql.parse.SemanticException;
+import org.apache.hadoop.hive.ql.plan.BaseWork;
+import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc;
+import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
+import org.apache.hadoop.hive.ql.plan.GroupByDesc;
+import org.apache.hadoop.hive.ql.plan.MapWork;
+import org.apache.hadoop.hive.ql.plan.MapredWork;
+import org.apache.hadoop.hive.ql.plan.OperatorDesc;
+import org.apache.hadoop.hive.ql.plan.ReduceWork;
+import org.apache.hadoop.hive.ql.plan.SelectDesc;
+import org.apache.hadoop.hive.ql.plan.TezWork;
+
+/**
+ * Checks some operator quality rules.
+ *
+ * Checks whenever operator ids are not reused.
+ * Checks some level of expression/schema consistency
+ * Some sanity checks on SelectOperators
+ */
+public class OperatorHealthCheckerHook implements ExecuteWithHookContext {
+
+  static class UniqueOpIdChecker implements SemanticNodeProcessor {
+
+    Map<String, Operator<?>> opMap = new HashMap<>();
+
+    @Override
+    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs)
+        throws SemanticException {
+
+      Operator<?> op = (Operator<?>) nd;
+      checkOperator(op);
+      String opKey = op.getOperatorId();
+      Operator<?> found = opMap.get(opKey);
+      if (found != null) {
+        throw new RuntimeException("operator id reuse found: " + opKey);
+      }
+      opMap.put(opKey, op);
+      return null;
+    }
+  }
+
+  public static void checkOperator(Operator<?> op) {
+    OperatorDesc conf = op.getConf();
+    Map<String, ExprNodeDesc> exprMap = conf.getColumnExprMap();
+    RowSchema schema = op.getSchema();
+
+    chceckSchema(schema);

Review comment:
       typo -> `checkSchema`

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/hooks/OperatorHealthCheckerHook.java
##########
@@ -0,0 +1,211 @@
+/*
+ * 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.hadoop.hive.ql.hooks;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.Stack;
+
+import com.google.common.collect.Lists;
+
+import com.google.common.collect.Sets;
+import org.apache.hadoop.hive.ql.exec.ColumnInfo;
+import org.apache.hadoop.hive.ql.exec.Operator;
+import org.apache.hadoop.hive.ql.exec.ReduceSinkOperator;
+import org.apache.hadoop.hive.ql.exec.RowSchema;
+import org.apache.hadoop.hive.ql.exec.ScriptOperator;
+import org.apache.hadoop.hive.ql.exec.SelectOperator;
+import org.apache.hadoop.hive.ql.exec.TableScanOperator;
+import org.apache.hadoop.hive.ql.exec.Task;
+import org.apache.hadoop.hive.ql.lib.DefaultGraphWalker;
+import org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher;
+import org.apache.hadoop.hive.ql.lib.SemanticDispatcher;
+import org.apache.hadoop.hive.ql.lib.SemanticGraphWalker;
+import org.apache.hadoop.hive.ql.lib.Node;
+import org.apache.hadoop.hive.ql.lib.SemanticNodeProcessor;
+import org.apache.hadoop.hive.ql.lib.NodeProcessorCtx;
+import org.apache.hadoop.hive.ql.parse.SemanticException;
+import org.apache.hadoop.hive.ql.plan.BaseWork;
+import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc;
+import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
+import org.apache.hadoop.hive.ql.plan.GroupByDesc;
+import org.apache.hadoop.hive.ql.plan.MapWork;
+import org.apache.hadoop.hive.ql.plan.MapredWork;
+import org.apache.hadoop.hive.ql.plan.OperatorDesc;
+import org.apache.hadoop.hive.ql.plan.ReduceWork;
+import org.apache.hadoop.hive.ql.plan.SelectDesc;
+import org.apache.hadoop.hive.ql.plan.TezWork;
+
+/**
+ * Checks some operator quality rules.
+ *
+ * Checks whenever operator ids are not reused.
+ * Checks some level of expression/schema consistency
+ * Some sanity checks on SelectOperators
+ */
+public class OperatorHealthCheckerHook implements ExecuteWithHookContext {
+
+  static class UniqueOpIdChecker implements SemanticNodeProcessor {
+
+    Map<String, Operator<?>> opMap = new HashMap<>();
+
+    @Override
+    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs)
+        throws SemanticException {
+
+      Operator<?> op = (Operator<?>) nd;
+      checkOperator(op);
+      String opKey = op.getOperatorId();
+      Operator<?> found = opMap.get(opKey);
+      if (found != null) {
+        throw new RuntimeException("operator id reuse found: " + opKey);
+      }
+      opMap.put(opKey, op);
+      return null;
+    }
+  }
+
+  public static void checkOperator(Operator<?> op) {
+    OperatorDesc conf = op.getConf();
+    Map<String, ExprNodeDesc> exprMap = conf.getColumnExprMap();
+    RowSchema schema = op.getSchema();
+
+    chceckSchema(schema);
+    if (op instanceof SelectOperator) {
+      checkSelectOperator((SelectOperator) op);
+    }
+    if (schema != null && exprMap != null) {
+      for (Entry<String, ExprNodeDesc> c : exprMap.entrySet()) {
+        if (c.getValue() instanceof ExprNodeConstantDesc) {
+          continue;
+        }
+        ColumnInfo ci = schema.getColumnInfo(c.getKey());
+        if (c.getKey().startsWith("KEY.reducesinkkey")) {
+          continue;
+        }
+        if (ci == null && conf.getComputedFields().contains(c.getKey())) {
+          continue;
+        }
+        if (ci == null) {
+          throw new RuntimeException("schema not found for " + c + " in " + schema);
+        }
+      }
+      for (ColumnInfo sig : schema.getSignature()) {
+        if (op instanceof ScriptOperator) {
+          continue;
+        }
+        String iName = sig.getInternalName();
+        ExprNodeDesc e = exprMap.get(iName);
+        if (isSemiJoinRS(op)) {
+          continue;
+        }
+        if (op.getConf() instanceof GroupByDesc) {
+          continue;
+        }
+
+        if (e == null) {
+          throw new RuntimeException("expr not found for " + iName + " in " + exprMap);
+        }
+      }
+    }
+
+  }
+
+  private static void chceckSchema(RowSchema schema) {
+    if (schema != null) {
+    List<String> cn = schema.getColumnNames();
+    Set<String> cn2 = new HashSet<>(cn);
+    if (cn.size() != cn2.size()) {
+      throw new RuntimeException("ambigous columns in the schema!");

Review comment:
       typo. `ambiguous`

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/hooks/OperatorHealthCheckerHook.java
##########
@@ -0,0 +1,211 @@
+/*
+ * 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.hadoop.hive.ql.hooks;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.Stack;
+
+import com.google.common.collect.Lists;
+
+import com.google.common.collect.Sets;
+import org.apache.hadoop.hive.ql.exec.ColumnInfo;
+import org.apache.hadoop.hive.ql.exec.Operator;
+import org.apache.hadoop.hive.ql.exec.ReduceSinkOperator;
+import org.apache.hadoop.hive.ql.exec.RowSchema;
+import org.apache.hadoop.hive.ql.exec.ScriptOperator;
+import org.apache.hadoop.hive.ql.exec.SelectOperator;
+import org.apache.hadoop.hive.ql.exec.TableScanOperator;
+import org.apache.hadoop.hive.ql.exec.Task;
+import org.apache.hadoop.hive.ql.lib.DefaultGraphWalker;
+import org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher;
+import org.apache.hadoop.hive.ql.lib.SemanticDispatcher;
+import org.apache.hadoop.hive.ql.lib.SemanticGraphWalker;
+import org.apache.hadoop.hive.ql.lib.Node;
+import org.apache.hadoop.hive.ql.lib.SemanticNodeProcessor;
+import org.apache.hadoop.hive.ql.lib.NodeProcessorCtx;
+import org.apache.hadoop.hive.ql.parse.SemanticException;
+import org.apache.hadoop.hive.ql.plan.BaseWork;
+import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc;
+import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
+import org.apache.hadoop.hive.ql.plan.GroupByDesc;
+import org.apache.hadoop.hive.ql.plan.MapWork;
+import org.apache.hadoop.hive.ql.plan.MapredWork;
+import org.apache.hadoop.hive.ql.plan.OperatorDesc;
+import org.apache.hadoop.hive.ql.plan.ReduceWork;
+import org.apache.hadoop.hive.ql.plan.SelectDesc;
+import org.apache.hadoop.hive.ql.plan.TezWork;
+
+/**
+ * Checks some operator quality rules.
+ *
+ * Checks whenever operator ids are not reused.
+ * Checks some level of expression/schema consistency
+ * Some sanity checks on SelectOperators
+ */
+public class OperatorHealthCheckerHook implements ExecuteWithHookContext {
+
+  static class UniqueOpIdChecker implements SemanticNodeProcessor {
+
+    Map<String, Operator<?>> opMap = new HashMap<>();
+
+    @Override
+    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs)
+        throws SemanticException {
+
+      Operator<?> op = (Operator<?>) nd;
+      checkOperator(op);
+      String opKey = op.getOperatorId();
+      Operator<?> found = opMap.get(opKey);
+      if (found != null) {
+        throw new RuntimeException("operator id reuse found: " + opKey);
+      }
+      opMap.put(opKey, op);
+      return null;
+    }
+  }
+
+  public static void checkOperator(Operator<?> op) {
+    OperatorDesc conf = op.getConf();
+    Map<String, ExprNodeDesc> exprMap = conf.getColumnExprMap();
+    RowSchema schema = op.getSchema();
+
+    chceckSchema(schema);
+    if (op instanceof SelectOperator) {
+      checkSelectOperator((SelectOperator) op);
+    }
+    if (schema != null && exprMap != null) {
+      for (Entry<String, ExprNodeDesc> c : exprMap.entrySet()) {
+        if (c.getValue() instanceof ExprNodeConstantDesc) {
+          continue;
+        }
+        ColumnInfo ci = schema.getColumnInfo(c.getKey());
+        if (c.getKey().startsWith("KEY.reducesinkkey")) {

Review comment:
       I don't think KEY identifier is ever going to change, but you could use `Utilities.ReduceField.KEY + ".reducesinkkey"`.

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/hooks/OperatorHealthCheckerHook.java
##########
@@ -0,0 +1,211 @@
+/*
+ * 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.hadoop.hive.ql.hooks;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.Stack;
+
+import com.google.common.collect.Lists;
+
+import com.google.common.collect.Sets;
+import org.apache.hadoop.hive.ql.exec.ColumnInfo;
+import org.apache.hadoop.hive.ql.exec.Operator;
+import org.apache.hadoop.hive.ql.exec.ReduceSinkOperator;
+import org.apache.hadoop.hive.ql.exec.RowSchema;
+import org.apache.hadoop.hive.ql.exec.ScriptOperator;
+import org.apache.hadoop.hive.ql.exec.SelectOperator;
+import org.apache.hadoop.hive.ql.exec.TableScanOperator;
+import org.apache.hadoop.hive.ql.exec.Task;
+import org.apache.hadoop.hive.ql.lib.DefaultGraphWalker;
+import org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher;
+import org.apache.hadoop.hive.ql.lib.SemanticDispatcher;
+import org.apache.hadoop.hive.ql.lib.SemanticGraphWalker;
+import org.apache.hadoop.hive.ql.lib.Node;
+import org.apache.hadoop.hive.ql.lib.SemanticNodeProcessor;
+import org.apache.hadoop.hive.ql.lib.NodeProcessorCtx;
+import org.apache.hadoop.hive.ql.parse.SemanticException;
+import org.apache.hadoop.hive.ql.plan.BaseWork;
+import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc;
+import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
+import org.apache.hadoop.hive.ql.plan.GroupByDesc;
+import org.apache.hadoop.hive.ql.plan.MapWork;
+import org.apache.hadoop.hive.ql.plan.MapredWork;
+import org.apache.hadoop.hive.ql.plan.OperatorDesc;
+import org.apache.hadoop.hive.ql.plan.ReduceWork;
+import org.apache.hadoop.hive.ql.plan.SelectDesc;
+import org.apache.hadoop.hive.ql.plan.TezWork;
+
+/**
+ * Checks some operator quality rules.
+ *
+ * Checks whenever operator ids are not reused.
+ * Checks some level of expression/schema consistency
+ * Some sanity checks on SelectOperators
+ */
+public class OperatorHealthCheckerHook implements ExecuteWithHookContext {
+
+  static class UniqueOpIdChecker implements SemanticNodeProcessor {
+
+    Map<String, Operator<?>> opMap = new HashMap<>();
+
+    @Override
+    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs)
+        throws SemanticException {
+
+      Operator<?> op = (Operator<?>) nd;
+      checkOperator(op);
+      String opKey = op.getOperatorId();
+      Operator<?> found = opMap.get(opKey);

Review comment:
       nit. Could probably use `if (opMap.containsKey(..))`

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/plan/AbstractOperatorDesc.java
##########
@@ -47,6 +49,8 @@
    */
   protected Map<String, ExprNodeDesc> colExprMap;
 
+  Set<String> computedFields = new HashSet<String>();

Review comment:
       `private transient`?

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/hooks/OperatorHealthCheckerHook.java
##########
@@ -0,0 +1,211 @@
+/*
+ * 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.hadoop.hive.ql.hooks;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.Stack;
+
+import com.google.common.collect.Lists;
+
+import com.google.common.collect.Sets;
+import org.apache.hadoop.hive.ql.exec.ColumnInfo;
+import org.apache.hadoop.hive.ql.exec.Operator;
+import org.apache.hadoop.hive.ql.exec.ReduceSinkOperator;
+import org.apache.hadoop.hive.ql.exec.RowSchema;
+import org.apache.hadoop.hive.ql.exec.ScriptOperator;
+import org.apache.hadoop.hive.ql.exec.SelectOperator;
+import org.apache.hadoop.hive.ql.exec.TableScanOperator;
+import org.apache.hadoop.hive.ql.exec.Task;
+import org.apache.hadoop.hive.ql.lib.DefaultGraphWalker;
+import org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher;
+import org.apache.hadoop.hive.ql.lib.SemanticDispatcher;
+import org.apache.hadoop.hive.ql.lib.SemanticGraphWalker;
+import org.apache.hadoop.hive.ql.lib.Node;
+import org.apache.hadoop.hive.ql.lib.SemanticNodeProcessor;
+import org.apache.hadoop.hive.ql.lib.NodeProcessorCtx;
+import org.apache.hadoop.hive.ql.parse.SemanticException;
+import org.apache.hadoop.hive.ql.plan.BaseWork;
+import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc;
+import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
+import org.apache.hadoop.hive.ql.plan.GroupByDesc;
+import org.apache.hadoop.hive.ql.plan.MapWork;
+import org.apache.hadoop.hive.ql.plan.MapredWork;
+import org.apache.hadoop.hive.ql.plan.OperatorDesc;
+import org.apache.hadoop.hive.ql.plan.ReduceWork;
+import org.apache.hadoop.hive.ql.plan.SelectDesc;
+import org.apache.hadoop.hive.ql.plan.TezWork;
+
+/**
+ * Checks some operator quality rules.
+ *
+ * Checks whenever operator ids are not reused.
+ * Checks some level of expression/schema consistency
+ * Some sanity checks on SelectOperators
+ */
+public class OperatorHealthCheckerHook implements ExecuteWithHookContext {
+
+  static class UniqueOpIdChecker implements SemanticNodeProcessor {
+
+    Map<String, Operator<?>> opMap = new HashMap<>();
+
+    @Override
+    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs)
+        throws SemanticException {
+
+      Operator<?> op = (Operator<?>) nd;
+      checkOperator(op);
+      String opKey = op.getOperatorId();
+      Operator<?> found = opMap.get(opKey);
+      if (found != null) {
+        throw new RuntimeException("operator id reuse found: " + opKey);
+      }
+      opMap.put(opKey, op);
+      return null;
+    }
+  }
+
+  public static void checkOperator(Operator<?> op) {
+    OperatorDesc conf = op.getConf();
+    Map<String, ExprNodeDesc> exprMap = conf.getColumnExprMap();
+    RowSchema schema = op.getSchema();
+
+    chceckSchema(schema);
+    if (op instanceof SelectOperator) {
+      checkSelectOperator((SelectOperator) op);
+    }
+    if (schema != null && exprMap != null) {
+      for (Entry<String, ExprNodeDesc> c : exprMap.entrySet()) {
+        if (c.getValue() instanceof ExprNodeConstantDesc) {
+          continue;
+        }
+        ColumnInfo ci = schema.getColumnInfo(c.getKey());
+        if (c.getKey().startsWith("KEY.reducesinkkey")) {
+          continue;
+        }
+        if (ci == null && conf.getComputedFields().contains(c.getKey())) {
+          continue;
+        }
+        if (ci == null) {
+          throw new RuntimeException("schema not found for " + c + " in " + schema);
+        }
+      }
+      for (ColumnInfo sig : schema.getSignature()) {
+        if (op instanceof ScriptOperator) {
+          continue;
+        }
+        String iName = sig.getInternalName();
+        ExprNodeDesc e = exprMap.get(iName);
+        if (isSemiJoinRS(op)) {
+          continue;
+        }
+        if (op.getConf() instanceof GroupByDesc) {
+          continue;
+        }
+
+        if (e == null) {
+          throw new RuntimeException("expr not found for " + iName + " in " + exprMap);
+        }
+      }
+    }
+
+  }
+
+  private static void chceckSchema(RowSchema schema) {
+    if (schema != null) {
+    List<String> cn = schema.getColumnNames();

Review comment:
       nit. Indentation




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org