FAQ
Author: gunther
Date: Thu Nov 7 10:18:57 2013
New Revision: 1539585

URL: http://svn.apache.org/r1539585
Log:
HIVE-5772: Print message for union operators (Gunther Hagleitner)

Modified:
     hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java?rev=1539585&r1=1539584&r2=1539585&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java Thu Nov 7 10:18:57 2013
@@ -26,6 +26,7 @@ import java.util.LinkedList;
  import java.util.List;
  import java.util.Map;
  import java.util.Set;
+import java.util.Stack;

  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
@@ -38,6 +39,7 @@ import org.apache.hadoop.hive.ql.exec.Ma
  import org.apache.hadoop.hive.ql.exec.Operator;
  import org.apache.hadoop.hive.ql.exec.ReduceSinkOperator;
  import org.apache.hadoop.hive.ql.exec.Task;
+import org.apache.hadoop.hive.ql.exec.UnionOperator;
  import org.apache.hadoop.hive.ql.exec.tez.TezTask;
  import org.apache.hadoop.hive.ql.hooks.ReadEntity;
  import org.apache.hadoop.hive.ql.hooks.WriteEntity;
@@ -47,6 +49,7 @@ import org.apache.hadoop.hive.ql.lib.Dis
  import org.apache.hadoop.hive.ql.lib.GraphWalker;
  import org.apache.hadoop.hive.ql.lib.Node;
  import org.apache.hadoop.hive.ql.lib.NodeProcessor;
+import org.apache.hadoop.hive.ql.lib.NodeProcessorCtx;
  import org.apache.hadoop.hive.ql.lib.Rule;
  import org.apache.hadoop.hive.ql.lib.RuleRegExp;
  import org.apache.hadoop.hive.ql.optimizer.ConvertJoinMapJoin;
@@ -139,6 +142,17 @@ public class TezCompiler extends TaskCom
          FileSinkOperator.getOperatorName() + "%"),
          new CompositeProcessor(new FileSinkProcessor(), genTezWork));

+ opRules.put(new RuleRegExp("Bail on Union",
+ UnionOperator.getOperatorName() + "%"), new NodeProcessor()
+ {
+ @Override
+ public Object process(Node n, Stack<Node> s,
+ NodeProcessorCtx procCtx, Object... os) throws SemanticException {
+ throw new SemanticException("Unions not yet supported on Tez."
+ +" Please use MR for this query");
+ }
+ });
+
      // The dispatcher fires the processor corresponding to the closest matching
      // rule and passes the context along
      Dispatcher disp = new DefaultRuleDispatcher(null, opRules, procCtx);

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedNov 7, '13 at 10:19a
activeNov 7, '13 at 10:19a
posts1
users1
websitehive.apache.org

1 user in discussion

Gunther: 1 post

People

Translate

site design / logo © 2021 Grokbase