diff --git a/common/src/java/org/apache/hadoop/hive/common/StatsSetupConst.java b/common/src/java/org/apache/hadoop/hive/common/StatsSetupConst.java index 559fffc..25c7508 100644 --- a/common/src/java/org/apache/hadoop/hive/common/StatsSetupConst.java +++ b/common/src/java/org/apache/hadoop/hive/common/StatsSetupConst.java @@ -84,6 +84,8 @@ public String getAggregator(Configuration conf) { */ public static final String ROW_COUNT = "numRows"; + public static final String RUN_TIME_ROW_COUNT = "runTimeNumRows"; + /** * The name of the statistic Raw Data Size to be published or gathered. */ diff --git a/itests/src/test/resources/testconfiguration.properties b/itests/src/test/resources/testconfiguration.properties index dfde5e2..dc3ff95 100644 --- a/itests/src/test/resources/testconfiguration.properties +++ b/itests/src/test/resources/testconfiguration.properties @@ -83,6 +83,12 @@ minitez.query.files.shared=delete_orig_table.q,\ # NOTE: Add tests to minitez only if it is very # specific to tez and cannot be added to minillap. minitez.query.files=explainuser_3.q,\ + explainanalyze_0.q,\ + explainanalyze_1.q,\ + explainanalyze_2.q,\ + explainanalyze_3.q,\ + explainanalyze_4.q,\ + explainanalyze_5.q,\ hybridgrace_hashjoin_1.q,\ hybridgrace_hashjoin_2.q,\ partition_column_names_with_leading_and_trailing_spaces.q,\ diff --git a/ql/src/java/org/apache/hadoop/hive/ql/Context.java b/ql/src/java/org/apache/hadoop/hive/ql/Context.java index 3785b1e..7eb00dd 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/Context.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/Context.java @@ -50,6 +50,8 @@ import org.apache.hadoop.hive.ql.lockmgr.HiveTxnManager; import org.apache.hadoop.hive.ql.lockmgr.LockException; import org.apache.hadoop.hive.ql.metadata.Table; +import org.apache.hadoop.hive.ql.parse.ExplainConfiguration; +import org.apache.hadoop.hive.ql.parse.ExplainConfiguration.ANALYZE_STATE; import org.apache.hadoop.hive.ql.plan.LoadTableDesc; import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.shims.ShimLoader; @@ -71,7 +73,7 @@ private int resDirFilesNum; boolean initialized; String originalTracker = null; - private final CompilationOpContext opContext; + private CompilationOpContext opContext; private final Map pathToCS = new ConcurrentHashMap(); // scratch path to use for all non-local (ie. hdfs) file system tmp folders @@ -88,10 +90,9 @@ private final Configuration conf; protected int pathid = 10000; - protected boolean explain = false; + protected ExplainConfiguration explainConfig = null; protected String cboInfo; protected boolean cboSucceeded; - protected boolean explainLogical = false; protected String cmd = ""; // number of previous attempts protected int tryCount = 0; @@ -159,34 +160,25 @@ public Context(Configuration conf, String executionId) { } /** - * Set the context on whether the current query is an explain query. - * @param value true if the query is an explain query, false if not + * Find whether we should execute the current query due to explain + * @return true if the query needs to be executed, false if not */ - public void setExplain(boolean value) { - explain = value; - } - - /** - * Find whether the current query is an explain query - * @return true if the query is an explain query, false if not - */ - public boolean getExplain() { - return explain; + public boolean isExplainSkipExecution() { + return (explainConfig != null && explainConfig.getAnalyze() != ANALYZE_STATE.RUNNING); } /** * Find whether the current query is a logical explain query */ public boolean getExplainLogical() { - return explainLogical; + return explainConfig != null && explainConfig.isLogical(); } - /** - * Set the context on whether the current query is a logical - * explain query. - */ - public void setExplainLogical(boolean explainLogical) { - this.explainLogical = explainLogical; + public ANALYZE_STATE getExplainAnalyze() { + if (explainConfig != null) { + return explainConfig.getAnalyze(); + } + return null; } /** @@ -333,7 +325,7 @@ public Path getMRScratchDir() { // if we are executing entirely on the client side - then // just (re)use the local scratch directory if(isLocalOnlyExecutionMode()) { - return getLocalScratchDir(!explain); + return getLocalScratchDir(!isExplainSkipExecution()); } try { @@ -341,7 +333,7 @@ public Path getMRScratchDir() { URI uri = dir.toUri(); Path newScratchDir = getScratchDir(uri.getScheme(), uri.getAuthority(), - !explain, uri.getPath()); + !isExplainSkipExecution(), uri.getPath()); LOG.info("New scratch dir is " + newScratchDir); return newScratchDir; } catch (IOException e) { @@ -372,7 +364,7 @@ public Path getTempDirForPath(Path path) { } private Path getExternalScratchDir(URI extURI) { - return getStagingDir(new Path(extURI.getScheme(), extURI.getAuthority(), extURI.getPath()), !explain); + return getStagingDir(new Path(extURI.getScheme(), extURI.getAuthority(), extURI.getPath()), !isExplainSkipExecution()); } /** @@ -434,7 +426,7 @@ public boolean isMRTmpFileURI(String uriStr) { } public Path getMRTmpPath(URI uri) { - return new Path(getStagingDir(new Path(uri), !explain), MR_PREFIX + nextPathId()); + return new Path(getStagingDir(new Path(uri), !isExplainSkipExecution()), MR_PREFIX + nextPathId()); } /** @@ -480,7 +472,7 @@ public Path getExternalTmpPath(Path path) { * path within /tmp */ public Path getExtTmpPathRelTo(Path path) { - return new Path(getStagingDir(path, !explain), EXT_PREFIX + nextPathId()); + return new Path(getStagingDir(path, !isExplainSkipExecution()), EXT_PREFIX + nextPathId()); } /** @@ -626,7 +618,7 @@ private static boolean strEquals(String str1, String str2) { * the stream being used */ public void setTokenRewriteStream(TokenRewriteStream tokenRewriteStream) { - assert (this.tokenRewriteStream == null); + assert (this.tokenRewriteStream == null || this.getExplainAnalyze() == ANALYZE_STATE.RUNNING); this.tokenRewriteStream = tokenRewriteStream; } @@ -809,4 +801,17 @@ public boolean isSkipTableMasking() { public void setSkipTableMasking(boolean skipTableMasking) { this.skipTableMasking = skipTableMasking; } + + public ExplainConfiguration getExplainConfig() { + return explainConfig; + } + + public void setExplainConfig(ExplainConfiguration explainConfig) { + this.explainConfig = explainConfig; + } + + public void resetOpContext(){ + opContext = new CompilationOpContext(); + sequencer = new AtomicInteger(); + } } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java index 183ed82..bf5aa31 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java @@ -87,6 +87,7 @@ import org.apache.hadoop.hive.ql.parse.ASTNode; import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer; import org.apache.hadoop.hive.ql.parse.ColumnAccessInfo; +import org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer; import org.apache.hadoop.hive.ql.parse.HiveSemanticAnalyzerHook; import org.apache.hadoop.hive.ql.parse.HiveSemanticAnalyzerHookContext; import org.apache.hadoop.hive.ql.parse.HiveSemanticAnalyzerHookContextImpl; @@ -97,6 +98,7 @@ import org.apache.hadoop.hive.ql.parse.PrunedPartitionList; import org.apache.hadoop.hive.ql.parse.SemanticAnalyzer; import org.apache.hadoop.hive.ql.parse.SemanticAnalyzerFactory; +import org.apache.hadoop.hive.ql.parse.ExplainConfiguration.ANALYZE_STATE; import org.apache.hadoop.hive.ql.plan.FileSinkDesc; import org.apache.hadoop.hive.ql.plan.HiveOperation; import org.apache.hadoop.hive.ql.plan.TableDesc; @@ -312,6 +314,11 @@ public Driver(HiveConf conf) { this(new QueryState(conf), null); } + public Driver(HiveConf conf, Context ctx) { + this(new QueryState(conf), null); + this.ctx = ctx; + } + public Driver(HiveConf conf, String userName) { this(new QueryState(conf), userName); } @@ -363,7 +370,7 @@ public int compile(String command, boolean resetTaskIds) { LOG.warn("WARNING! Query command could not be redacted." + e); } - if (ctx != null) { + if (ctx != null && ctx.getExplainAnalyze() != ANALYZE_STATE.RUNNING) { close(); } @@ -404,7 +411,9 @@ public void run() { }; ShutdownHookManager.addShutdownHook(shutdownRunner, SHUTDOWN_HOOK_PRIORITY); - ctx = new Context(conf); + if (ctx == null) { + ctx = new Context(conf); + } ctx.setTryCount(getTryCount()); ctx.setCmd(command); ctx.setHDFSCleanup(true); diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java index a183b9b..35f429b 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java @@ -53,6 +53,7 @@ import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.metadata.Table; +import org.apache.hadoop.hive.ql.parse.ExplainConfiguration.ANALYZE_STATE; import org.apache.hadoop.hive.ql.plan.ColumnStatsWork; import org.apache.hadoop.hive.ql.plan.api.StageType; import org.apache.hadoop.hive.ql.session.SessionState; @@ -407,6 +408,9 @@ private int persistColumnStats(Hive db) throws HiveException, MetaException, IOE @Override public int execute(DriverContext driverContext) { + if (driverContext.getCtx().getExplainAnalyze() == ANALYZE_STATE.RUNNING) { + return 0; + } try { Hive db = getHive(); return persistColumnStats(db); diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java index 43231af..5512ee2 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java @@ -788,6 +788,7 @@ public void closeOp(boolean abort) throws HiveException { } } Arrays.fill(storage, null); + super.closeOp(abort); } @Override diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java index a59b781..0fea0cc 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java @@ -136,6 +136,7 @@ import org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer; import org.apache.hadoop.hive.ql.parse.ReplicationSpec; import org.apache.hadoop.hive.ql.parse.SemanticException; +import org.apache.hadoop.hive.ql.parse.ExplainConfiguration.ANALYZE_STATE; import org.apache.hadoop.hive.ql.plan.AbortTxnsDesc; import org.apache.hadoop.hive.ql.plan.AddPartitionDesc; import org.apache.hadoop.hive.ql.plan.AlterDatabaseDesc; @@ -287,6 +288,9 @@ public void initialize(QueryState queryState, QueryPlan queryPlan, DriverContext @Override public int execute(DriverContext driverContext) { + if (driverContext.getCtx().getExplainAnalyze() == ANALYZE_STATE.RUNNING) { + return 0; + } // Create the db Hive db; diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java index ad48091..b8a4693 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java @@ -271,7 +271,7 @@ public int execute(DriverContext driverContext) { // Because of the implementation of the JsonParserFactory, we are sure // that we can get a TezJsonParser. JsonParser jsonParser = JsonParserFactory.getParser(conf); - work.setFormatted(true); + work.getConfig().setFormatted(true); JSONObject jsonPlan = getJSONPlan(out, work); if (work.getCboInfo() != null) { jsonPlan.put("cboInfo", work.getCboInfo()); @@ -282,8 +282,8 @@ public int execute(DriverContext driverContext) { // if there is anything wrong happen, we bail out. LOG.error("Running explain user level has problem: " + e.toString() + ". Falling back to normal explain"); - work.setFormatted(false); - work.setUserLevelExplain(false); + work.getConfig().setFormatted(false); + work.getConfig().setUserLevelExplain(false); jsonPlan = getJSONPlan(out, work); } } else { diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java index b0c3d3f..e386717 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java @@ -653,6 +653,7 @@ protected boolean updateProgress() { @Override public void process(Object row, int tag) throws HiveException { + runTimeNumRows++; /* Create list bucketing sub-directory only if stored-as-directories is on. */ String lbDirName = null; lbDirName = (lbCtx == null) ? null : generateListBucketingDirName(row); @@ -1086,6 +1087,7 @@ public void closeOp(boolean abort) throws HiveException { } } fsp = prevFsp = null; + super.closeOp(abort); } /** @@ -1230,7 +1232,7 @@ private void publishStats() throws HiveException { } } } - sContext.setIndexForTezUnion(this.conf.getIndexInTezUnion()); + sContext.setIndexForTezUnion(this.getIndexForTezUnion()); if (!statsPublisher.closeConnection(sContext)) { // The original exception is lost. // Not changing the interface to maintain backward compatibility diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java index 47b5793..f28d33e 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java @@ -1008,7 +1008,6 @@ private void flushHashTable(boolean complete) throws HiveException { * @throws HiveException */ private void forward(Object[] keys, AggregationBuffer[] aggs) throws HiveException { - if (forwardCache == null) { forwardCache = new Object[outputKeyLength + aggs.length]; } @@ -1103,6 +1102,7 @@ public void closeOp(boolean abort) throws HiveException { } } hashAggregations = null; + super.closeOp(abort); } // Group by contains the columns needed - no need to aggregate from children diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java index 08cc4b4..82056c4 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java @@ -20,9 +20,7 @@ import java.io.IOException; import java.io.Serializable; -import java.util.Collection; import java.util.List; -import java.util.concurrent.Future; import org.slf4j.Logger; import org.apache.hadoop.conf.Configuration; diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java index 9676d70..d4ebbd4 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java @@ -88,6 +88,7 @@ public void closeOp(boolean abort) throws HiveException { if (!isMap && currCount < leastRow) { throw new HiveException("No sufficient row found"); } + super.closeOp(abort); } } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/ListSinkOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/ListSinkOperator.java index 9bf363c..6aee28b 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/ListSinkOperator.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/ListSinkOperator.java @@ -39,7 +39,6 @@ public class ListSinkOperator extends Operator { private transient List res; private transient FetchFormatter fetcher; - private transient int numRows; /** Kryo ctor. */ protected ListSinkOperator() { @@ -80,11 +79,11 @@ private FetchFormatter initializeFetcher(Configuration conf) throws Exception { public void reset(List res) { this.res = res; - this.numRows = 0; + this.runTimeNumRows = 0; } - public int getNumRows() { - return numRows; + public long getNumRows() { + return runTimeNumRows; } @Override @@ -92,7 +91,7 @@ public int getNumRows() { public void process(Object row, int tag) throws HiveException { try { res.add(fetcher.convert(row, inputObjInspectors[0])); - numRows++; + runTimeNumRows++; } catch (Exception e) { throw new HiveException(e); } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java index 546919b..b788c09 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java @@ -58,6 +58,7 @@ import org.apache.hadoop.hive.ql.optimizer.physical.BucketingSortingCtx.BucketCol; import org.apache.hadoop.hive.ql.optimizer.physical.BucketingSortingCtx.SortCol; import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer; +import org.apache.hadoop.hive.ql.parse.ExplainConfiguration.ANALYZE_STATE; import org.apache.hadoop.hive.ql.plan.DynamicPartitionCtx; import org.apache.hadoop.hive.ql.plan.LoadFileDesc; import org.apache.hadoop.hive.ql.plan.LoadMultiFilesDesc; @@ -244,6 +245,9 @@ public boolean hasFollowingStatsTask() { public int execute(DriverContext driverContext) { try { + if (driverContext.getCtx().getExplainAnalyze() == ANALYZE_STATE.RUNNING) { + return 0; + } Hive db = getHive(); // Do any hive related operations like moving tables and files diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java index eaf4792..46a6266 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java @@ -35,7 +35,9 @@ import java.util.concurrent.atomic.AtomicBoolean; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.common.StatsSetupConst; import org.apache.hadoop.hive.ql.CompilationOpContext; +import org.apache.hadoop.hive.ql.ErrorMsg; import org.apache.hadoop.hive.ql.exec.mr.ExecMapperContext; import org.apache.hadoop.hive.ql.lib.Node; import org.apache.hadoop.hive.ql.metadata.HiveException; @@ -46,6 +48,9 @@ import org.apache.hadoop.hive.ql.plan.OperatorDesc; import org.apache.hadoop.hive.ql.plan.Statistics; import org.apache.hadoop.hive.ql.plan.api.OperatorType; +import org.apache.hadoop.hive.ql.stats.StatsCollectionContext; +import org.apache.hadoop.hive.ql.stats.StatsPublisher; +import org.apache.hadoop.hive.ql.stats.fs.FSStatsPublisher; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory; import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector; @@ -77,6 +82,9 @@ protected final AtomicBoolean abortOp; private transient ExecMapperContext execContext; private transient boolean rootInitializeCalled = false; + protected transient long runTimeNumRows; + protected int indexForTezUnion = -1; + private transient Configuration hconf; protected final transient Collection> asyncInitOperations = new HashSet<>(); // It can be optimized later so that an operator operator (init/close) is performed @@ -476,7 +484,9 @@ public void initializeLocalWork(Configuration hconf) throws HiveException { * Operator specific initialization. */ protected void initializeOp(Configuration hconf) throws HiveException { + this.hconf = hconf; rootInitializeCalled = true; + runTimeNumRows = 0; } /** @@ -711,6 +721,10 @@ public void close(boolean abort) throws HiveException { * should overwrite this funtion for their specific cleanup routine. */ protected void closeOp(boolean abort) throws HiveException { + if (conf != null && conf.getRuntimeStatsTmpDir() != null) { + publishRunTimeStats(); + } + runTimeNumRows = 0; } private boolean jobCloseDone = false; @@ -865,7 +879,7 @@ protected long getNextCntr(long cntr) { protected void forward(Object row, ObjectInspector rowInspector) throws HiveException { - + runTimeNumRows++; if (getDone()) { return; } @@ -1421,4 +1435,39 @@ public void setCompilationOpContext(CompilationOpContext ctx) { public CompilationOpContext getCompilationOpContext() { return cContext; } + + private void publishRunTimeStats() throws HiveException { + StatsPublisher statsPublisher = new FSStatsPublisher(); + StatsCollectionContext sContext = new StatsCollectionContext(hconf); + sContext.setIndexForTezUnion(indexForTezUnion); + sContext.setStatsTmpDir(conf.getRuntimeStatsTmpDir()); + + if (!statsPublisher.connect(sContext)) { + // just return, stats gathering should not block the main query + LOG.error("StatsPublishing error: cannot connect to database"); + throw new HiveException(ErrorMsg.STATSPUBLISHER_CONNECTION_ERROR.getErrorCodedMsg()); + } + + String prefix = ""; + Map statsToPublish = new HashMap(); + statsToPublish.put(StatsSetupConst.RUN_TIME_ROW_COUNT, Long.toString(runTimeNumRows)); + if (!statsPublisher.publishStat(prefix, statsToPublish)) { + // The original exception is lost. + // Not changing the interface to maintain backward compatibility + throw new HiveException(ErrorMsg.STATSPUBLISHER_PUBLISHING_ERROR.getErrorCodedMsg()); + } + if (!statsPublisher.closeConnection(sContext)) { + // The original exception is lost. + // Not changing the interface to maintain backward compatibility + throw new HiveException(ErrorMsg.STATSPUBLISHER_CLOSING_ERROR.getErrorCodedMsg()); + } + } + + public int getIndexForTezUnion() { + return indexForTezUnion; + } + + public void setIndexForTezUnion(int indexForTezUnion) { + this.indexForTezUnion = indexForTezUnion; + } } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java index ba71a1e..91331f1 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java @@ -24,10 +24,8 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.List; import java.util.Random; -import java.util.concurrent.Future; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.conf.HiveConf; @@ -63,7 +61,7 @@ * Reduce Sink Operator sends output to the reduce stage. **/ public class ReduceSinkOperator extends TerminalOperator - implements Serializable, TopNHash.BinaryCollector { + implements Serializable, TopNHash.BinaryCollector { /** * Counters. @@ -146,7 +144,6 @@ private StructObjectInspector recIdInspector; // OI for the record identifier private IntObjectInspector bucketInspector; // OI for the bucket field in the record id - protected transient long numRows = 0; protected transient long cntr = 1; protected transient long logEveryNRows = 0; private final transient LongWritable recordCounter = new LongWritable(); @@ -164,8 +161,6 @@ public ReduceSinkOperator(CompilationOpContext ctx) { protected void initializeOp(Configuration hconf) throws HiveException { super.initializeOp(hconf); try { - - numRows = 0; cntr = 1; logEveryNRows = HiveConf.getLongVar(hconf, HiveConf.ConfVars.HIVE_LOG_N_RECORDS); @@ -538,15 +533,15 @@ protected void collect(BytesWritable keyWritable, Writable valueWritable) throws // Since this is a terminal operator, update counters explicitly - // forward is not called if (null != out) { - numRows++; + runTimeNumRows++; if (isLogInfoEnabled) { - if (numRows == cntr) { - cntr = logEveryNRows == 0 ? cntr * 10 : numRows + logEveryNRows; - if (cntr < 0 || numRows < 0) { + if (runTimeNumRows == cntr) { + cntr = logEveryNRows == 0 ? cntr * 10 : runTimeNumRows + logEveryNRows; + if (cntr < 0 || runTimeNumRows < 0) { cntr = 0; - numRows = 1; + runTimeNumRows = 1; } - LOG.info(toString() + ": records written - " + numRows); + LOG.info(toString() + ": records written - " + runTimeNumRows); } } out.collect(keyWritable, valueWritable); @@ -575,9 +570,9 @@ protected void closeOp(boolean abort) throws HiveException { random = null; reducerHash = null; if (isLogInfoEnabled) { - LOG.info(toString() + ": records written - " + numRows); + LOG.info(toString() + ": records written - " + runTimeNumRows); } - recordCounter.set(numRows); + recordCounter.set(runTimeNumRows); } /** diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java index 42c1003..7be628e 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java @@ -547,6 +547,28 @@ public static MapredWork clonePlan(MapredWork plan) { return result; } + public static List> cloneOperatorTree(List> roots, int indexForTezUnion) { + ByteArrayOutputStream baos = new ByteArrayOutputStream(4096); + CompilationOpContext ctx = roots.isEmpty() ? null : roots.get(0).getCompilationOpContext(); + serializePlan(roots, baos, true); + @SuppressWarnings("unchecked") + List> result = + deserializePlan(new ByteArrayInputStream(baos.toByteArray()), + roots.getClass(), true); + // Restore the context. + LinkedList> newOps = new LinkedList<>(result); + while (!newOps.isEmpty()) { + Operator newOp = newOps.poll(); + newOp.setIndexForTezUnion(indexForTezUnion); + newOp.setCompilationOpContext(ctx); + List> children = newOp.getChildOperators(); + if (children != null) { + newOps.addAll(children); + } + } + return result; + } + /** * Clones using the powers of XML. Do not use unless necessary. * @param plan The plan. diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java index e1f7bd9..7897e36 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java @@ -45,6 +45,7 @@ import org.apache.hadoop.hive.ql.metadata.Partition; import org.apache.hadoop.hive.ql.metadata.Table; import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.TableSpec; +import org.apache.hadoop.hive.ql.parse.ExplainConfiguration.ANALYZE_STATE; import org.apache.hadoop.hive.ql.plan.DynamicPartitionCtx; import org.apache.hadoop.hive.ql.plan.LoadTableDesc; import org.apache.hadoop.hive.ql.plan.StatsWork; @@ -87,7 +88,9 @@ protected void receiveFeed(FeedType feedType, Object feedValue) { @Override public int execute(DriverContext driverContext) { - + if (driverContext.getCtx().getExplainAnalyze() == ANALYZE_STATE.RUNNING) { + return 0; + } LOG.info("Executing stats task"); // Make sure that it is either an ANALYZE, INSERT OVERWRITE (maybe load) or CTAS command short workComponentsPresent = 0; @@ -147,7 +150,7 @@ private int aggregateStats(Hive db) { if (!getWork().getNoStatsAggregator() && !getWork().isNoScanAnalyzeCommand()) { try { scc = getContext(); - statsAggregator = createStatsAggregator(scc); + statsAggregator = createStatsAggregator(scc, conf); } catch (HiveException e) { if (HiveConf.getBoolVar(conf, HiveConf.ConfVars.HIVE_STATS_RELIABLE)) { throw e; @@ -294,7 +297,7 @@ private String getAggregationPrefix(Table table, Partition partition) return prefix; } - private StatsAggregator createStatsAggregator(StatsCollectionContext scc) throws HiveException { + public static StatsAggregator createStatsAggregator(StatsCollectionContext scc, HiveConf conf) throws HiveException { String statsImpl = HiveConf.getVar(conf, HiveConf.ConfVars.HIVESTATSDBCLASS); StatsFactory factory = StatsFactory.newFactory(statsImpl, conf); if (factory == null) { diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java index 6afe957..0f02222 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java @@ -267,6 +267,7 @@ public void closeOp(boolean abort) throws HiveException { publishStats(); } } + super.closeOp(abort); } /** diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java index a75b52a..0d1fa31 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java @@ -150,5 +150,6 @@ public OperatorType getType() { @Override protected void closeOp(boolean abort) throws HiveException { conf.getGenericUDTF().close(); + super.closeOp(abort); } } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/ATSHook.java b/ql/src/java/org/apache/hadoop/hive/ql/hooks/ATSHook.java index 742edc8..b7fd7ee 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/ATSHook.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/ATSHook.java @@ -29,6 +29,7 @@ import org.apache.hadoop.hive.ql.exec.ExplainTask; import org.apache.hadoop.hive.ql.exec.TaskFactory; import org.apache.hadoop.hive.ql.exec.Utilities; +import org.apache.hadoop.hive.ql.parse.ExplainConfiguration; import org.apache.hadoop.hive.ql.plan.ExplainWork; import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.util.StringUtils; @@ -121,18 +122,14 @@ public void run() { switch(hookContext.getHookType()) { case PRE_EXEC_HOOK: + ExplainConfiguration config = new ExplainConfiguration(); + config.setFormatted(true); ExplainWork work = new ExplainWork(null,// resFile null,// pCtx plan.getRootTasks(),// RootTasks plan.getFetchTask(),// FetchTask null,// analyzer - false,// extended - true,// formatted - false,// dependency - false,// logical - false,// authorize - false,// userLevelExplain - null// cboInfo + config, null// cboInfo ); @SuppressWarnings("unchecked") ExplainTask explain = (ExplainTask) TaskFactory.get(work, conf); diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java index 5ee54b9..b0429bb 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java @@ -216,7 +216,7 @@ public void initialize(HiveConf hiveConf) { if(HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVEOPTIMIZEMETADATAQUERIES)) { transformations.add(new StatsOptimizer()); } - if (pctx.getContext().getExplain() && !isTezExecEngine && !isSparkExecEngine) { + if (pctx.getContext().isExplainSkipExecution() && !isTezExecEngine && !isSparkExecEngine) { transformations.add(new AnnotateWithStatistics()); transformations.add(new AnnotateWithOpTraits()); } @@ -228,6 +228,7 @@ public void initialize(HiveConf hiveConf) { if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVEFETCHTASKAGGR)) { transformations.add(new SimpleFetchAggregation()); } + } /** diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/AnnotateRunTimeStatsOptimizer.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/AnnotateRunTimeStatsOptimizer.java new file mode 100644 index 0000000..15e05e5 --- /dev/null +++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/AnnotateRunTimeStatsOptimizer.java @@ -0,0 +1,174 @@ +/** + * 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.optimizer.physical; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; +import java.util.Stack; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.hive.ql.ErrorMsg; +import org.apache.hadoop.hive.ql.exec.Operator; +import org.apache.hadoop.hive.ql.exec.Task; +import org.apache.hadoop.hive.ql.exec.mr.MapRedTask; +import org.apache.hadoop.hive.ql.exec.spark.SparkTask; +import org.apache.hadoop.hive.ql.exec.tez.TezTask; +import org.apache.hadoop.hive.ql.lib.DefaultGraphWalker; +import org.apache.hadoop.hive.ql.lib.Dispatcher; +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.Rule; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.parse.ExplainConfiguration.ANALYZE_STATE; +import org.apache.hadoop.hive.ql.parse.ParseContext; +import org.apache.hadoop.hive.ql.parse.SemanticException; +import org.apache.hadoop.hive.ql.plan.BaseWork; +import org.apache.hadoop.hive.ql.plan.OperatorDesc; +import org.apache.hadoop.hive.ql.plan.SparkWork; +import org.apache.hadoop.hive.ql.plan.TezWork; +import org.apache.hadoop.hive.ql.stats.StatsCollectionContext; +import org.apache.hadoop.hive.ql.stats.StatsPublisher; +import org.apache.hadoop.hive.ql.stats.fs.FSStatsPublisher; + +public class AnnotateRunTimeStatsOptimizer implements PhysicalPlanResolver { + static final Logger LOG = LoggerFactory.getLogger(AnnotateRunTimeStatsOptimizer.class.getName()); + + private class AnnotateRunTimeStatsDispatcher implements Dispatcher { + + private final PhysicalContext physicalContext; + + public AnnotateRunTimeStatsDispatcher(PhysicalContext context, Map rules) { + super(); + physicalContext = context; + } + + @Override + public Object dispatch(Node nd, Stack stack, Object... nodeOutputs) + throws SemanticException { + Task currTask = (Task) nd; + Set> ops = new HashSet<>(); + + if (currTask instanceof MapRedTask) { + MapRedTask mr = (MapRedTask) currTask; + ops.addAll(mr.getWork().getAllOperators()); + } else if (currTask instanceof TezTask) { + TezWork work = ((TezTask) currTask).getWork(); + for (BaseWork w : work.getAllWork()) { + ops.addAll(w.getAllOperators()); + } + } else if (currTask instanceof SparkTask) { + SparkWork sparkWork = (SparkWork) currTask.getWork(); + for (BaseWork w : sparkWork.getAllWork()) { + ops.addAll(w.getAllOperators()); + } + } + + setOrAnnotateStats(ops, physicalContext.getParseContext()); + return null; + } + + } + + public static void setOrAnnotateStats(Set> ops, ParseContext pctx) + throws SemanticException { + for (Operator op : ops) { + if (pctx.getContext().getExplainAnalyze() == ANALYZE_STATE.RUNNING) { + setRuntimeStatsDir(op, pctx); + } else if (pctx.getContext().getExplainAnalyze() == ANALYZE_STATE.ANALYZING) { + annotateRuntimeStats(op, pctx); + } else { + throw new SemanticException("Unexpected stats in AnnotateWithRunTimeStatistics."); + } + } + } + + private static void setRuntimeStatsDir(Operator op, ParseContext pctx) + throws SemanticException { + try { + OperatorDesc conf = op.getConf(); + if (conf != null) { + LOG.info("setRuntimeStatsDir for " + op.getOperatorId()); + String path = new Path(pctx.getContext().getExplainConfig().getExplainRootPath(), + op.getOperatorId()).toString(); + StatsPublisher statsPublisher = new FSStatsPublisher(); + StatsCollectionContext runtimeStatsContext = new StatsCollectionContext(pctx.getConf()); + runtimeStatsContext.setStatsTmpDir(path); + if (!statsPublisher.init(runtimeStatsContext)) { + LOG.error("StatsPublishing error: StatsPublisher is not initialized."); + throw new HiveException(ErrorMsg.STATSPUBLISHER_NOT_OBTAINED.getErrorCodedMsg()); + } + conf.setRuntimeStatsTmpDir(path); + } else { + LOG.debug("skip setRuntimeStatsDir for " + op.getOperatorId() + + " because OperatorDesc is null"); + } + } catch (HiveException e) { + throw new SemanticException(e); + } + } + + private static void annotateRuntimeStats(Operator op, ParseContext pctx) { + Long runTimeNumRows = pctx.getContext().getExplainConfig().getOpIdToRuntimeNumRows() + .get(op.getOperatorId()); + if (op.getConf() != null && op.getConf().getStatistics() != null && runTimeNumRows != null) { + LOG.info("annotateRuntimeStats for " + op.getOperatorId()); + op.getConf().getStatistics().setRunTimeNumRows(runTimeNumRows); + } else { + LOG.debug("skip annotateRuntimeStats for " + op.getOperatorId()); + } + } + + @Override + public PhysicalContext resolve(PhysicalContext pctx) throws SemanticException { + Map opRules = new LinkedHashMap(); + Dispatcher disp = new AnnotateRunTimeStatsDispatcher(pctx, opRules); + GraphWalker ogw = new DefaultGraphWalker(disp); + ArrayList topNodes = new ArrayList(); + topNodes.addAll(pctx.getRootTasks()); + ogw.startWalking(topNodes, null); + return pctx; + } + + public void resolve(Set> opSet, ParseContext pctx) throws SemanticException { + Set> ops = getAllOperatorsForSimpleFetch(opSet); + setOrAnnotateStats(ops, pctx); + } + + private Set> getAllOperatorsForSimpleFetch(Set> opSet) { + Set> returnSet = new LinkedHashSet>(); + Stack> opStack = new Stack>(); + // add all children + opStack.addAll(opSet); + while (!opStack.empty()) { + Operator op = opStack.pop(); + returnSet.add(op); + if (op.getChildOperators() != null) { + opStack.addAll(op.getChildOperators()); + } + } + return returnSet; + } +} diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/PhysicalOptimizer.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/PhysicalOptimizer.java index 49706b1..faad51b 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/PhysicalOptimizer.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/PhysicalOptimizer.java @@ -88,12 +88,17 @@ private void initialize(HiveConf hiveConf) { // Vectorization should be the last optimization, because it doesn't modify the plan // or any operators. It makes a very low level transformation to the expressions to // run in the vectorized mode. - if (hiveConf.getBoolVar(HiveConf.ConfVars.HIVE_VECTORIZATION_ENABLED)) { + if (hiveConf.getBoolVar(HiveConf.ConfVars.HIVE_VECTORIZATION_ENABLED) + && pctx.getContext().getExplainAnalyze() == null) { resolvers.add(new Vectorizer()); } if (!"none".equalsIgnoreCase(hiveConf.getVar(HiveConf.ConfVars.HIVESTAGEIDREARRANGE))) { resolvers.add(new StageIDsRearranger()); } + + if (pctx.getContext().getExplainAnalyze() != null) { + resolvers.add(new AnnotateRunTimeStatsOptimizer()); + } } /** diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java index 15a47dc..80e62c1 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java @@ -67,10 +67,11 @@ private boolean isInsertInto; private Table tbl; private Map partSpec; + private Context origCtx; public ColumnStatsAutoGatherContext(SemanticAnalyzer sa, HiveConf conf, Operator op, Table tbl, Map partSpec, - boolean isInsertInto) throws SemanticException { + boolean isInsertInto, Context ctx) throws SemanticException { super(); this.sa = sa; this.conf = conf; @@ -78,6 +79,7 @@ public ColumnStatsAutoGatherContext(SemanticAnalyzer sa, HiveConf conf, this.tbl = tbl; this.partSpec = partSpec; this.isInsertInto = isInsertInto; + this.origCtx = ctx; columns = tbl.getCols(); partitionColumns = tbl.getPartCols(); } @@ -107,7 +109,7 @@ public void insertAnalyzePipeline() throws SemanticException{ // 2. Based on the statement, generate the selectOperator Operator selOp = null; try { - selOp = genSelOpForAnalyze(analyzeCommand); + selOp = genSelOpForAnalyze(analyzeCommand, origCtx); } catch (IOException | ParseException e) { throw new SemanticException(e); } @@ -126,9 +128,10 @@ public void insertAnalyzePipeline() throws SemanticException{ } @SuppressWarnings("rawtypes") - private Operator genSelOpForAnalyze(String analyzeCommand) throws IOException, ParseException, SemanticException{ + private Operator genSelOpForAnalyze(String analyzeCommand, Context origCtx) throws IOException, ParseException, SemanticException{ //0. initialization Context ctx = new Context(conf); + ctx.setExplainConfig(origCtx.getExplainConfig()); ParseDriver pd = new ParseDriver(); ASTNode tree = pd.parse(analyzeCommand, ctx); tree = ParseUtils.findRootNonNullToken(tree); diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsSemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsSemanticAnalyzer.java index d3aef41..ab131e2 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsSemanticAnalyzer.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsSemanticAnalyzer.java @@ -377,6 +377,7 @@ public void analyze(ASTNode ast, Context origCtx) throws SemanticException { analyzeRewrite.setColType(colType); qbp.setAnalyzeRewrite(analyzeRewrite); initCtx(ctx); + ctx.setExplainConfig(origCtx.getExplainConfig()); LOG.info("Invoking analyze on rewritten query"); analyzeInternal(rewrittenTree); } else { diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainConfiguration.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainConfiguration.java new file mode 100644 index 0000000..1ccd2f4 --- /dev/null +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainConfiguration.java @@ -0,0 +1,117 @@ +/** + * 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.parse; + +import java.util.Map; + +import org.apache.hadoop.fs.Path; + +/** + * ExplainConfiguration + */ + +public class ExplainConfiguration { + private boolean extended = false; + private boolean formatted = false; + private boolean dependency = false; + private boolean logical = false; + private boolean authorize = false; + private boolean userLevelExplain = false; + private Path explainRootPath; + Map opIdToRuntimeNumRows; + + public enum ANALYZE_STATE { + RUNNING, ANALYZING + }; + + ANALYZE_STATE analyze = null; + + public boolean isExtended() { + return extended; + } + + public void setExtended(boolean extended) { + this.extended = extended; + } + + public boolean isFormatted() { + return formatted; + } + + public void setFormatted(boolean formatted) { + this.formatted = formatted; + } + + public boolean isDependency() { + return dependency; + } + + public void setDependency(boolean dependency) { + this.dependency = dependency; + } + + public boolean isLogical() { + return logical; + } + + public void setLogical(boolean logical) { + this.logical = logical; + } + + public boolean isAuthorize() { + return authorize; + } + + public void setAuthorize(boolean authorize) { + this.authorize = authorize; + } + + public ANALYZE_STATE getAnalyze() { + return analyze; + } + + public void setAnalyze(ANALYZE_STATE analyze) { + this.analyze = analyze; + } + + public boolean isUserLevelExplain() { + return userLevelExplain; + } + + public void setUserLevelExplain(boolean userLevelExplain) { + this.userLevelExplain = userLevelExplain; + } + + public Path getExplainRootPath() { + return explainRootPath; + } + + public void setExplainRootPath(Path explainRootPath) { + this.explainRootPath = explainRootPath; + } + + public Map getOpIdToRuntimeNumRows() { + return opIdToRuntimeNumRows; + } + + public void setOpIdToRuntimeNumRows(Map opIdToRuntimeNumRows) { + this.opIdToRuntimeNumRows = opIdToRuntimeNumRows; + } + +} diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainSQRewriteSemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainSQRewriteSemanticAnalyzer.java index 8d7fd92..d00731c 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainSQRewriteSemanticAnalyzer.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainSQRewriteSemanticAnalyzer.java @@ -36,9 +36,8 @@ public ExplainSQRewriteSemanticAnalyzer(QueryState queryState) throws SemanticEx @Override public void analyzeInternal(ASTNode ast) throws SemanticException { - - ctx.setExplain(true); - + ctx.setExplainConfig(new ExplainConfiguration()); + // Create a semantic analyzer for the query ASTNode input = (ASTNode) ast.getChild(0); SemanticAnalyzer sem = (SemanticAnalyzer) diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainSemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainSemanticAnalyzer.java index 75753b0..0845854 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainSemanticAnalyzer.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainSemanticAnalyzer.java @@ -18,18 +18,40 @@ package org.apache.hadoop.hive.ql.parse; +import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; import java.util.List; - +import java.util.Map; + +import org.antlr.runtime.TokenRewriteStream; +import org.apache.hadoop.fs.FileStatus; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.hive.common.FileUtils; +import org.apache.hadoop.hive.common.StatsSetupConst; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.ql.CommandNeedRetryException; +import org.apache.hadoop.hive.ql.Context; +import org.apache.hadoop.hive.ql.Driver; import org.apache.hadoop.hive.ql.QueryState; import org.apache.hadoop.hive.ql.exec.ExplainTask; import org.apache.hadoop.hive.ql.exec.FetchTask; +import org.apache.hadoop.hive.ql.exec.StatsTask; import org.apache.hadoop.hive.ql.exec.Task; import org.apache.hadoop.hive.ql.exec.TaskFactory; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.parse.ExplainConfiguration.ANALYZE_STATE; import org.apache.hadoop.hive.ql.plan.ExplainWork; +import org.apache.hadoop.hive.ql.processors.CommandProcessor; +import org.apache.hadoop.hive.ql.processors.CommandProcessorFactory; +import org.apache.hadoop.hive.ql.session.SessionState; +import org.apache.hadoop.hive.ql.stats.StatsAggregator; +import org.apache.hadoop.hive.ql.stats.StatsCollectionContext; +import org.apache.hadoop.hive.ql.stats.fs.FSStatsAggregator; /** * ExplainSemanticAnalyzer. @@ -37,40 +59,67 @@ */ public class ExplainSemanticAnalyzer extends BaseSemanticAnalyzer { List fieldList; + ExplainConfiguration config; public ExplainSemanticAnalyzer(QueryState queryState) throws SemanticException { super(queryState); + config = new ExplainConfiguration(); } @SuppressWarnings("unchecked") @Override public void analyzeInternal(ASTNode ast) throws SemanticException { - - boolean extended = false; - boolean formatted = false; - boolean dependency = false; - boolean logical = false; - boolean authorize = false; for (int i = 1; i < ast.getChildCount(); i++) { int explainOptions = ast.getChild(i).getType(); if (explainOptions == HiveParser.KW_FORMATTED) { - formatted = true; + config.setFormatted(true); } else if (explainOptions == HiveParser.KW_EXTENDED) { - extended = true; + config.setExtended(true); } else if (explainOptions == HiveParser.KW_DEPENDENCY) { - dependency = true; + config.setDependency(true); } else if (explainOptions == HiveParser.KW_LOGICAL) { - logical = true; + config.setLogical(true); } else if (explainOptions == HiveParser.KW_AUTHORIZATION) { - authorize = true; + config.setAuthorize(true); + } else if (explainOptions == HiveParser.KW_ANALYZE) { + config.setAnalyze(ANALYZE_STATE.RUNNING); + config.setExplainRootPath(ctx.getMRTmpPath()); } } - ctx.setExplain(true); - ctx.setExplainLogical(logical); + ctx.setExplainConfig(config); - // Create a semantic analyzer for the query ASTNode input = (ASTNode) ast.getChild(0); + // explain analyze is composed of two steps + // step 1 (ANALYZE_STATE.RUNNING), run the query and collect the runtime #rows + // step 2 (ANALYZE_STATE.ANALYZING), explain the query and provide the runtime #rows collected. + if (config.getAnalyze() == ANALYZE_STATE.RUNNING) { + String query = ctx.getTokenRewriteStream().toString(input.getTokenStartIndex(), + input.getTokenStopIndex()); + LOG.info("Explain analyze (running phase) for query " + query); + Context runCtx = null; + try { + runCtx = new Context(conf); + // runCtx and ctx share the configuration + runCtx.setExplainConfig(config); + Driver driver = new Driver(conf, runCtx); + driver.run(query); + // Note that we need to call getResults for simple fetch optimization. + // However, we need to skip all the results. + while (driver.getResults(new ArrayList())) { + } + config.setOpIdToRuntimeNumRows(aggregateStats(config.getExplainRootPath())); + } catch (IOException e1) { + throw new SemanticException(e1); + } catch (CommandNeedRetryException e) { + throw new SemanticException(e); + } + ctx.resetOpContext(); + ctx.resetStream(); + TaskFactory.resetId(); + LOG.info("Explain analyze (analyzing phase) for query " + query); + config.setAnalyze(ANALYZE_STATE.ANALYZING); + } BaseSemanticAnalyzer sem = SemanticAnalyzerFactory.get(queryState, input); sem.analyze(input, ctx); sem.validate(); @@ -92,24 +141,20 @@ public void analyzeInternal(ASTNode ast) throws SemanticException { pCtx = ((SemanticAnalyzer)sem).getParseContext(); } - boolean userLevelExplain = !extended - && !formatted - && !dependency - && !logical - && !authorize + config.setUserLevelExplain(!config.isExtended() + && !config.isFormatted() + && !config.isDependency() + && !config.isLogical() + && !config.isAuthorize() && (HiveConf.getBoolVar(ctx.getConf(), HiveConf.ConfVars.HIVE_EXPLAIN_USER) && HiveConf - .getVar(conf, HiveConf.ConfVars.HIVE_EXECUTION_ENGINE).equals("tez")); + .getVar(conf, HiveConf.ConfVars.HIVE_EXECUTION_ENGINE).equals("tez"))); + ExplainWork work = new ExplainWork(ctx.getResFile(), pCtx, tasks, fetchTask, sem, - extended, - formatted, - dependency, - logical, - authorize, - userLevelExplain, + config, ctx.getCboInfo()); work.setAppendTaskType( @@ -121,6 +166,43 @@ public void analyzeInternal(ASTNode ast) throws SemanticException { rootTasks.add(explTask); } + private Map aggregateStats(Path localTmpPath) { + Map opIdToRuntimeNumRows = new HashMap(); + // localTmpPath is the root of all the stats. + // Under it, there will be SEL_1/statsfiles, SEL_2/statsfiles etc where SEL_1 and SEL_2 are the op ids. + FileSystem fs; + FileStatus[] statuses = null; + try { + fs = localTmpPath.getFileSystem(conf); + statuses = fs.listStatus(localTmpPath, FileUtils.HIDDEN_FILES_PATH_FILTER); + // statuses can be null if it is DDL, etc + } catch (IOException e) { + LOG.warn(e.toString()); + } + if (statuses != null) { + for (FileStatus status : statuses) { + if (status.isDir()) { + StatsCollectionContext scc = new StatsCollectionContext(conf); + String[] names = status.getPath().toString().split(Path.SEPARATOR); + String opId = names[names.length - 1]; + scc.setStatsTmpDir(status.getPath().toString()); + StatsAggregator statsAggregator = new FSStatsAggregator(); + if (!statsAggregator.connect(scc)) { + // -1 means that there is no stats + opIdToRuntimeNumRows.put(opId, -1L); + } else { + String value = statsAggregator.aggregateStats("", StatsSetupConst.RUN_TIME_ROW_COUNT); + opIdToRuntimeNumRows.put(opId, Long.parseLong(value)); + } + if (statsAggregator != null) { + statsAggregator.closeConnection(scc); + } + } + } + } + return opIdToRuntimeNumRows; + } + @Override public List getResultSchema() { return fieldList; @@ -133,4 +215,5 @@ public boolean skipAuthorization() { Task task = rootTasks.get(0); return task instanceof ExplainTask && ((ExplainTask)task).getWork().isAuthorize(); } + } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java index 6715dbf..fd80e6c 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java @@ -212,7 +212,7 @@ protected void setupMapWork(MapWork mapWork, GenTezProcContext context, } // removes any union operator and clones the plan - public static void removeUnionOperators(GenTezProcContext context, BaseWork work) + public static void removeUnionOperators(GenTezProcContext context, BaseWork work, int indexForTezUnion) throws SemanticException { List> roots = new ArrayList>(); @@ -223,7 +223,7 @@ public static void removeUnionOperators(GenTezProcContext context, BaseWork work roots.addAll(context.eventOperatorSet); // need to clone the plan. - List> newRoots = SerializationUtilities.cloneOperatorTree(roots); + List> newRoots = SerializationUtilities.cloneOperatorTree(roots, indexForTezUnion); // we're cloning the operator plan but we're retaining the original work. That means // that root operators have to be replaced with the cloned ops. The replacement map @@ -304,8 +304,7 @@ public static void removeUnionOperators(GenTezProcContext context, BaseWork work linked = context.linkedFileSinks.get(path); linked.add(desc); - desc.setIndexInTezUnion(linked.size()); - desc.setDirName(new Path(path, "" + desc.getIndexInTezUnion())); + desc.setDirName(new Path(path, "" + linked.size())); desc.setLinkedFileSink(true); desc.setParentDir(path); desc.setLinkedFileSinkDesc(linked); diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g index c411f5e..ecdefa9 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g @@ -719,7 +719,7 @@ explainStatement explainOption @init { msgs.push("explain option"); } @after { msgs.pop(); } - : KW_EXTENDED|KW_FORMATTED|KW_DEPENDENCY|KW_LOGICAL|KW_AUTHORIZATION + : KW_EXTENDED|KW_FORMATTED|KW_DEPENDENCY|KW_LOGICAL|KW_AUTHORIZATION|KW_ANALYZE ; execStatement diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/MapReduceCompiler.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/MapReduceCompiler.java index 5b08ed2..d7a56e5 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/MapReduceCompiler.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/MapReduceCompiler.java @@ -178,7 +178,7 @@ protected void decideExecMode(List> rootTasks, Cont throws SemanticException { // bypass for explain queries for now - if (ctx.getExplain()) { + if (ctx.isExplainSkipExecution()) { return; } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java index 66589fe..83e1165 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java @@ -134,6 +134,7 @@ import org.apache.hadoop.hive.ql.optimizer.unionproc.UnionProcContext; import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.TableSpec.SpecType; import org.apache.hadoop.hive.ql.parse.CalcitePlanner.ASTSearcher; +import org.apache.hadoop.hive.ql.parse.ExplainConfiguration.ANALYZE_STATE; import org.apache.hadoop.hive.ql.parse.PTFInvocationSpec.OrderExpression; import org.apache.hadoop.hive.ql.parse.PTFInvocationSpec.OrderSpec; import org.apache.hadoop.hive.ql.parse.PTFInvocationSpec.PTFInputSpec; @@ -7061,7 +7062,7 @@ private void genAutoColumnStatsGatheringPipeline(QB qb, TableDesc table_desc, LOG.info("Generate an operator pipleline to autogather column stats for table " + tableName + " in query " + ctx.getCmd()); ColumnStatsAutoGatherContext columnStatsAutoGatherContext = null; - columnStatsAutoGatherContext = new ColumnStatsAutoGatherContext(this, conf, curr, table, partSpec, isInsertInto); + columnStatsAutoGatherContext = new ColumnStatsAutoGatherContext(this, conf, curr, table, partSpec, isInsertInto, ctx); columnStatsAutoGatherContext.insertAnalyzePipeline(); columnStatsAutoGatherContexts.add(columnStatsAutoGatherContext); } @@ -10824,6 +10825,9 @@ void analyzeInternal(ASTNode ast, PlannerContext plannerCtx) throws SemanticExce // 5. Take care of view creation if (createVwDesc != null) { + if (ctx.getExplainAnalyze() == ANALYZE_STATE.RUNNING) { + return; + } saveViewDefinition(); // validate the create view statement at this point, the createVwDesc gets @@ -10906,7 +10910,7 @@ void analyzeInternal(ASTNode ast, PlannerContext plannerCtx) throws SemanticExce } // 11. if desired check we're not going over partition scan limits - if (!ctx.getExplain()) { + if (!ctx.isExplainSkipExecution()) { enforceScanLimits(pCtx, origFetchTask); } @@ -11691,7 +11695,7 @@ ASTNode analyzeCreateTable( case CTAS: // create table as select if (isTemporary) { - if (!ctx.getExplain() && !isMaterialization) { + if (!ctx.isExplainSkipExecution() && !isMaterialization) { String dbName = qualifiedTabName[0]; String tblName = qualifiedTabName[1]; SessionState ss = SessionState.get(); @@ -11710,7 +11714,7 @@ ASTNode analyzeCreateTable( // dumpTable is only used to check the conflict for non-temporary tables try { Table dumpTable = db.newTable(dbDotTab); - if (null != db.getTable(dumpTable.getDbName(), dumpTable.getTableName(), false) && !ctx.getExplain()) { + if (null != db.getTable(dumpTable.getDbName(), dumpTable.getTableName(), false) && !ctx.isExplainSkipExecution()) { throw new SemanticException(ErrorMsg.TABLE_ALREADY_EXISTS.getMsg(dbDotTab)); } } catch (HiveException e) { diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SubQueryDiagnostic.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/SubQueryDiagnostic.java index 57f9432..f3c6820 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SubQueryDiagnostic.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SubQueryDiagnostic.java @@ -29,7 +29,7 @@ static QBSubQueryRewrite getRewrite(QBSubQuery subQuery, TokenRewriteStream stream, Context ctx) { - if (ctx.getExplain()) { + if (ctx.isExplainSkipExecution()) { return new QBSubQueryRewrite(subQuery, stream); } else { return new QBSubQueryRewriteNoop(subQuery, stream); diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompiler.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompiler.java index 114fa2f..b7d9a48 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompiler.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompiler.java @@ -28,6 +28,7 @@ import java.util.List; import java.util.Queue; import java.util.Set; +import java.util.Stack; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,6 +42,7 @@ import org.apache.hadoop.hive.ql.QueryState; import org.apache.hadoop.hive.ql.exec.ColumnStatsTask; import org.apache.hadoop.hive.ql.exec.FetchTask; +import org.apache.hadoop.hive.ql.exec.Operator; import org.apache.hadoop.hive.ql.exec.StatsTask; import org.apache.hadoop.hive.ql.exec.Task; import org.apache.hadoop.hive.ql.exec.TaskFactory; @@ -52,6 +54,7 @@ import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.optimizer.GenMapRedUtils; +import org.apache.hadoop.hive.ql.optimizer.physical.AnnotateRunTimeStatsOptimizer; import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.AnalyzeRewriteContext; import org.apache.hadoop.hive.ql.plan.ColumnStatsDesc; import org.apache.hadoop.hive.ql.plan.ColumnStatsWork; @@ -131,6 +134,7 @@ public void compile(final ParseContext pCtx, final List> rootTasks, Pa } // we need to clone some operator plans and remove union operators still + int indexForTezUnion = 0; for (BaseWork w: procCtx.workWithUnionOperators) { - GenTezUtils.removeUnionOperators(procCtx, w); + GenTezUtils.removeUnionOperators(procCtx, w, indexForTezUnion++); } // then we make sure the file sink operators are set up right @@ -489,7 +491,8 @@ protected void optimizeTaskPlan(List> rootTasks, Pa LOG.debug("Skipping cross product analysis"); } - if (conf.getBoolVar(HiveConf.ConfVars.HIVE_VECTORIZATION_ENABLED)) { + if (conf.getBoolVar(HiveConf.ConfVars.HIVE_VECTORIZATION_ENABLED) + && ctx.getExplainAnalyze() == null) { physicalCtx = new Vectorizer().resolve(physicalCtx); } else { LOG.debug("Skipping vectorization"); @@ -517,6 +520,11 @@ protected void optimizeTaskPlan(List> rootTasks, Pa // the backend. If you have a physical optimization that changes // table scans or filters, you have to invoke it before this one. physicalCtx = new SerializeFilter().resolve(physicalCtx); + + if (physicalCtx.getContext().getExplainAnalyze() != null) { + new AnnotateRunTimeStatsOptimizer().resolve(physicalCtx); + } + perfLogger.PerfLogEnd(this.getClass().getName(), PerfLogger.TEZ_COMPILER, "optimizeTaskPlan"); return; } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java index 33fbffe..34d83ef 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java @@ -260,6 +260,7 @@ private void reparseAndSuperAnalyze(ASTNode tree) throws SemanticException { // references. HiveConf.setVar(conf, HiveConf.ConfVars.DYNAMICPARTITIONINGMODE, "nonstrict"); rewrittenCtx = new Context(conf); + rewrittenCtx.setExplainConfig(ctx.getExplainConfig()); } catch (IOException e) { throw new SemanticException(ErrorMsg.UPDATEDELETE_IO_ERROR.getMsg()); } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SparkCompiler.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SparkCompiler.java index 08278de..baf77c7 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SparkCompiler.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SparkCompiler.java @@ -61,6 +61,7 @@ import org.apache.hadoop.hive.ql.optimizer.DynamicPartitionPruningOptimization; import org.apache.hadoop.hive.ql.optimizer.SparkRemoveDynamicPruningBySize; import org.apache.hadoop.hive.ql.optimizer.metainfo.annotation.AnnotateWithOpTraits; +import org.apache.hadoop.hive.ql.optimizer.physical.AnnotateRunTimeStatsOptimizer; import org.apache.hadoop.hive.ql.optimizer.physical.MetadataOnlyOptimizer; import org.apache.hadoop.hive.ql.optimizer.physical.NullScanOptimizer; import org.apache.hadoop.hive.ql.optimizer.physical.PhysicalContext; @@ -429,7 +430,8 @@ protected void optimizeTaskPlan(List> rootTasks, Pa LOG.debug("Skipping cross product analysis"); } - if (conf.getBoolVar(HiveConf.ConfVars.HIVE_VECTORIZATION_ENABLED)) { + if (conf.getBoolVar(HiveConf.ConfVars.HIVE_VECTORIZATION_ENABLED) + && ctx.getExplainAnalyze() == null) { (new Vectorizer()).resolve(physicalCtx); } else { LOG.debug("Skipping vectorization"); @@ -443,6 +445,10 @@ protected void optimizeTaskPlan(List> rootTasks, Pa new CombineEquivalentWorkResolver().resolve(physicalCtx); + if (physicalCtx.getContext().getExplainAnalyze() != null) { + new AnnotateRunTimeStatsOptimizer().resolve(physicalCtx); + } + PERF_LOGGER.PerfLogEnd(CLASS_NAME, PerfLogger.SPARK_OPTIMIZE_TASK_TREE); return; } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/AbstractOperatorDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/AbstractOperatorDesc.java index adec5c7..e217bdf 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/plan/AbstractOperatorDesc.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/AbstractOperatorDesc.java @@ -21,8 +21,10 @@ import java.util.Map; +import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.ql.exec.PTFUtils; import org.apache.hadoop.hive.ql.plan.Explain.Level; +import org.apache.hadoop.hive.ql.stats.StatsCollectionContext; public class AbstractOperatorDesc implements OperatorDesc { @@ -31,6 +33,7 @@ protected transient OpTraits opTraits; protected transient Map opProps; protected long memNeeded = 0; + protected String runtimeStatsTmpDir; @Override @Explain(skipHeader = true, displayName = "Statistics") @@ -89,4 +92,13 @@ public long getMemoryNeeded() { public void setMemoryNeeded(long memNeeded) { this.memNeeded = memNeeded; } + + public String getRuntimeStatsTmpDir() { + return runtimeStatsTmpDir; + } + + public void setRuntimeStatsTmpDir(String runtimeStatsTmpDir) { + this.runtimeStatsTmpDir = runtimeStatsTmpDir; + } + } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/ExplainWork.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/ExplainWork.java index a213c83..9f4767c 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/plan/ExplainWork.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/ExplainWork.java @@ -27,6 +27,7 @@ import org.apache.hadoop.hive.ql.exec.Task; import org.apache.hadoop.hive.ql.hooks.ReadEntity; import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer; +import org.apache.hadoop.hive.ql.parse.ExplainConfiguration; import org.apache.hadoop.hive.ql.parse.ParseContext; /** @@ -42,15 +43,10 @@ private HashSet inputs; private ParseContext pCtx; - boolean extended; - boolean formatted; - boolean dependency; - boolean logical; + private ExplainConfiguration config; boolean appendTaskType; - boolean authorize; - boolean userLevelExplain; String cboInfo; private transient BaseSemanticAnalyzer analyzer; @@ -63,12 +59,7 @@ public ExplainWork(Path resFile, List> rootTasks, Task fetchTask, BaseSemanticAnalyzer analyzer, - boolean extended, - boolean formatted, - boolean dependency, - boolean logical, - boolean authorize, - boolean userLevelExplain, + ExplainConfiguration config, String cboInfo) { this.resFile = resFile; this.rootTasks = new ArrayList>(rootTasks); @@ -77,14 +68,9 @@ public ExplainWork(Path resFile, if (analyzer != null) { this.inputs = analyzer.getInputs(); } - this.extended = extended; - this.formatted = formatted; - this.dependency = dependency; - this.logical = logical; this.pCtx = pCtx; - this.authorize = authorize; - this.userLevelExplain = userLevelExplain; this.cboInfo = cboInfo; + this.config = config; } public Path getResFile() { @@ -120,27 +106,15 @@ public void setInputs(HashSet inputs) { } public boolean getExtended() { - return extended; - } - - public void setExtended(boolean extended) { - this.extended = extended; + return config.isExtended(); } public boolean getDependency() { - return dependency; - } - - public void setDependency(boolean dependency) { - this.dependency = dependency; + return config.isDependency(); } public boolean isFormatted() { - return formatted; - } - - public void setFormatted(boolean formatted) { - this.formatted = formatted; + return config.isFormatted(); } public ParseContext getParseContext() { @@ -152,11 +126,7 @@ public void setParseContext(ParseContext pCtx) { } public boolean isLogical() { - return logical; - } - - public void setLogical(boolean logical) { - this.logical = logical; + return config.isLogical(); } public boolean isAppendTaskType() { @@ -168,11 +138,7 @@ public void setAppendTaskType(boolean appendTaskType) { } public boolean isAuthorize() { - return authorize; - } - - public void setAuthorize(boolean authorize) { - this.authorize = authorize; + return config.isAuthorize(); } public BaseSemanticAnalyzer getAnalyzer() { @@ -180,11 +146,7 @@ public BaseSemanticAnalyzer getAnalyzer() { } public boolean isUserLevelExplain() { - return userLevelExplain; - } - - public void setUserLevelExplain(boolean userLevelExplain) { - this.userLevelExplain = userLevelExplain; + return config.isUserLevelExplain(); } public String getCboInfo() { @@ -195,4 +157,12 @@ public void setCboInfo(String cboInfo) { this.cboInfo = cboInfo; } + public ExplainConfiguration getConfig() { + return config; + } + + public void setConfig(ExplainConfiguration config) { + this.config = config; + } + } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/FileSinkDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/FileSinkDesc.java index ce0e0a8..07ed4fd 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/plan/FileSinkDesc.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/FileSinkDesc.java @@ -61,7 +61,6 @@ private DynamicPartitionCtx dpCtx; private String staticSpec; // static partition spec ends with a '/' private boolean gatherStats; - private int indexInTezUnion = -1; // Consider a query like: // insert overwrite table T3 select ... from T1 join T2 on T1.key = T2.key; @@ -475,12 +474,4 @@ public void setStatsTmpDir(String statsCollectionTempDir) { this.statsTmpDir = statsCollectionTempDir; } - public int getIndexInTezUnion() { - return indexInTezUnion; - } - - public void setIndexInTezUnion(int indexInTezUnion) { - this.indexInTezUnion = indexInTezUnion; - } - } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/MergeJoinWork.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/MergeJoinWork.java index a5527dc..20cd56f 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/plan/MergeJoinWork.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/MergeJoinWork.java @@ -19,6 +19,7 @@ package org.apache.hadoop.hive.ql.plan; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -48,7 +49,12 @@ public void replaceRoots(Map, Operator> replacementMap) { @Override public Set> getAllRootOperators() { - return getMainWork().getAllRootOperators(); + Set> set = new HashSet<>(); + set.addAll(getMainWork().getAllRootOperators()); + for (BaseWork w : mergeWorkList) { + set.addAll(w.getAllRootOperators()); + } + return set; } @Override diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/OperatorDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/OperatorDesc.java index 16be499..ad620c2 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/plan/OperatorDesc.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/OperatorDesc.java @@ -30,4 +30,6 @@ public Map getOpProps(); public long getMemoryNeeded(); public void setMemoryNeeded(long memoryNeeded); + public String getRuntimeStatsTmpDir(); + public void setRuntimeStatsTmpDir(String runtimeStatsTmpDir); } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/Statistics.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/Statistics.java index 029043f..c46ea70 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/plan/Statistics.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/Statistics.java @@ -40,18 +40,20 @@ } private long numRows; + private long runTimeNumRows; private long dataSize; private State basicStatsState; private Map columnStats; private State columnStatsState; public Statistics() { - this(0, 0); + this(0, 0, -1); } - public Statistics(long nr, long ds) { + public Statistics(long nr, long ds, long rnr) { this.setNumRows(nr); this.setDataSize(ds); + this.setRunTimeNumRows(rnr); this.basicStatsState = State.NONE; this.columnStats = null; this.columnStatsState = State.NONE; @@ -107,6 +109,9 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Num rows: "); sb.append(numRows); + if (runTimeNumRows >= 0) { + sb.append("/" + runTimeNumRows); + } sb.append(" Data size: "); sb.append(dataSize); sb.append(" Basic stats: "); @@ -121,6 +126,9 @@ public String toUserLevelExplainString() { StringBuilder sb = new StringBuilder(); sb.append("rows="); sb.append(numRows); + if (runTimeNumRows >= 0) { + sb.append("/" + runTimeNumRows); + } sb.append(" width="); // just to be safe about numRows if (numRows != 0) { @@ -148,7 +156,7 @@ public String extendedToString() { @Override public Statistics clone() throws CloneNotSupportedException { - Statistics clone = new Statistics(numRows, dataSize); + Statistics clone = new Statistics(numRows, dataSize, runTimeNumRows); clone.setBasicStatsState(basicStatsState); clone.setColumnStatsState(columnStatsState); if (columnStats != null) { @@ -263,4 +271,12 @@ public ColStatistics getColumnStatisticsFromColName(String colName) { } return null; } + + public long getRunTimeNumRows() { + return runTimeNumRows; + } + + public void setRunTimeNumRows(long runTimeNumRows) { + this.runTimeNumRows = runTimeNumRows; + } } diff --git a/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java b/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java index 990d80c..805bc5b 100644 --- a/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java +++ b/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java @@ -27,6 +27,7 @@ import org.apache.commons.io.output.ByteArrayOutputStream; import org.apache.hadoop.fs.Path; +import org.apache.hadoop.hive.ql.parse.ExplainConfiguration; import org.apache.hadoop.hive.ql.parse.ParseContext; import org.apache.hadoop.hive.ql.plan.Explain; import org.apache.hadoop.hive.ql.plan.Explain.Level; @@ -132,6 +133,7 @@ public void testExplainDoesSortMapValues() throws Exception { pCtx.setTopOps(topOps); work.setParseContext(pCtx); ByteArrayOutputStream baos = new ByteArrayOutputStream(); + work.setConfig(new ExplainConfiguration()); new ExplainTask().getJSONLogicalPlan(new PrintStream(baos), work); baos.close(); return baos.toString(); diff --git a/ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java b/ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java index ae1747d..d6fe540 100644 --- a/ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java +++ b/ql/src/test/org/apache/hadoop/hive/ql/parse/TestUpdateDeleteSemanticAnalyzer.java @@ -297,8 +297,10 @@ private String explain(SemanticAnalyzer sem, QueryPlan plan) throws Path tmp = new Path(f.getPath()); fs.create(tmp); fs.deleteOnExit(tmp); + ExplainConfiguration config = new ExplainConfiguration(); + config.setExtended(true); ExplainWork work = new ExplainWork(tmp, sem.getParseContext(), sem.getRootTasks(), - sem.getFetchTask(), sem, true, false, false, false, false, false, null); + sem.getFetchTask(), sem, config, null); ExplainTask task = new ExplainTask(); task.setWork(work); task.initialize(queryState, plan, null, null); diff --git a/ql/src/test/queries/clientpositive/explainanalyze_0.q b/ql/src/test/queries/clientpositive/explainanalyze_0.q new file mode 100644 index 0000000..a4b3dc5 --- /dev/null +++ b/ql/src/test/queries/clientpositive/explainanalyze_0.q @@ -0,0 +1,38 @@ +set hive.mapred.mode=nonstrict; + +explain analyze select * from src a union all select * from src b limit 10; + +explain analyze select key from src; + +explain analyze create table t as select key from src; + +create table t as select key from src; + +explain analyze insert overwrite table t select key from src; + +explain analyze select key from src limit 10; + +explain analyze select key from src where value < 10; + +explain analyze select key from src where key < 10; +select count(*) from (select key from src where key < 10)subq; + +explain analyze select key, count(key) from src group by key; +select count(*) from (select key, count(key) from src group by key)subq; + +explain analyze select count(*) from src a join src b on a.key = b.value where a.key > 0; + +explain analyze select count(*) from src a join src b on a.key = b.key where a.key > 0; +select count(*) from src a join src b on a.key = b.key where a.key > 0; + + +explain analyze select * from src a union all select * from src b; +select count(*) from (select * from src a union all select * from src b)subq; + +set hive.auto.convert.join=true; +set hive.auto.convert.join.noconditionaltask=true; +set hive.auto.convert.join.noconditionaltask.size=10000; + +EXPLAIN analyze +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key); diff --git a/ql/src/test/queries/clientpositive/explainanalyze_1.q b/ql/src/test/queries/clientpositive/explainanalyze_1.q new file mode 100644 index 0000000..76ebe79 --- /dev/null +++ b/ql/src/test/queries/clientpositive/explainanalyze_1.q @@ -0,0 +1,669 @@ +set hive.mapred.mode=nonstrict; +set hive.explain.user=true; + +explain analyze create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc; +create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc; + +alter table src_orc_merge_test_part add partition (ds='2012-01-03', ts='2012-01-03+14:46:31'); +desc extended src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31'); + +explain analyze insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src; +insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src; +explain analyze insert into table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src limit 100; + +explain analyze select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'; +explain analyze select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'; + +alter table src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31') concatenate; + + +explain analyze select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'; +explain analyze select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'; + +drop table src_orc_merge_test_part; + +set hive.auto.convert.join=true; + +explain analyze select sum(hash(a.k1,a.v1,a.k2, a.v2)) +from ( +select src1.key as k1, src1.value as v1, + src2.key as k2, src2.value as v2 FROM + (select * FROM src WHERE src.key < 10) src1 + JOIN + (select * FROM src WHERE src.key < 10) src2 + SORT BY k1, v1, k2, v2 +) a; + +set hive.cbo.enable=true; +set hive.exec.check.crossproducts=false; + +set hive.stats.fetch.column.stats=true; +set hive.auto.convert.join=false; + +explain analyze select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key; +explain analyze select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x; + +explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c; + +explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b % c asc, b desc) cbo_t1 left outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int % c asc, cbo_t3.c_int desc; + +explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b+c, a desc) cbo_t1 right outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 2) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c; + +explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by c+a desc) cbo_t1 full outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by p+q desc, r asc) cbo_t2 on cbo_t1.a=p full outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int; + +explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c; + +explain analyze select unionsrc.key FROM (select 'tst1' as key, count(1) as value from src) unionsrc; + +explain analyze select unionsrc.key FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1 + UNION ALL + select 'min' as key, min(c_int) as value from cbo_t3 s2 + UNION ALL + select 'avg' as key, avg(c_int) as value from cbo_t3 s3) unionsrc order by unionsrc.key; + +explain analyze select unionsrc.key, count(1) FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1 + UNION ALL + select 'min' as key, min(c_int) as value from cbo_t3 s2 + UNION ALL + select 'avg' as key, avg(c_int) as value from cbo_t3 s3) unionsrc group by unionsrc.key order by unionsrc.key; + +explain analyze select cbo_t1.key from cbo_t1 join cbo_t3 where cbo_t1.key=cbo_t3.key and cbo_t1.key >= 1; +explain analyze select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 left outer join cbo_t2 on cbo_t1.key=cbo_t2.key; +explain analyze select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 full outer join cbo_t2 on cbo_t1.key=cbo_t2.key; + +explain analyze select b, cbo_t1.c, cbo_t2.p, q, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1) cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key; +explain analyze select key, cbo_t1.c_int, cbo_t2.p, q from cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.key=p join (select key as a, c_int as b, cbo_t3.c_float as c from cbo_t3)cbo_t3 on cbo_t1.key=a; + +explain analyze select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 full outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where (q + 1 = 2) and (R.b > 0 or c_int >= 0); + +explain analyze select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 right outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where (q + 1 = 2) and (R.b > 0 or c_int >= 0); + +explain analyze select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1; +explain analyze select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x order by x,y limit 1; +explain analyze select key from(select key from (select key from cbo_t1 limit 5)cbo_t2 limit 5)cbo_t3 limit 5; +explain analyze select key, c_int from(select key, c_int from (select key, c_int from cbo_t1 order by c_int limit 5)cbo_t1 order by c_int limit 5)cbo_t2 order by c_int limit 5; + +explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a limit 5) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc limit 5) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c limit 5; + +explain analyze select cbo_t1.c_int from cbo_t1 left semi join cbo_t2 on cbo_t1.key=cbo_t2.key where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0); +explain analyze select * from (select c, b, a from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 == 2) and (b > 0 or c >= 0)) R where (b + 1 = 2) and (R.b > 0 or c >= 0); +explain analyze select a, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by a+b desc, c asc) cbo_t1 left semi join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by q+r/10 desc, p) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 >= 0) and (b > 0 or a >= 0) group by a, c having a > 0 and (a >=1 or c >= 1) and (a + c) >= 0 order by c, a; + +explain analyze select cbo_t1.key as x, c_int as c_int, (((c_int+c_float)*10)+5) as y from cbo_t1; + +explain analyze select null from cbo_t1; + +explain analyze select key from cbo_t1 where c_int = -6 or c_int = +6; + +explain analyze select count(cbo_t1.dt) from cbo_t1 join cbo_t2 on cbo_t1.dt = cbo_t2.dt where cbo_t1.dt = '2014' ; + +explain analyze select * +from src_cbo b +where not exists + (select distinct a.key + from src_cbo a + where b.value = a.value and a.value > 'val_2' + ) +; + +explain analyze select * +from src_cbo b +group by key, value +having not exists + (select a.key + from src_cbo a + where b.value = a.value and a.key = b.key and a.value > 'val_12' + ) +; + +create view cv1 as +select * +from src_cbo b +where exists + (select a.key + from src_cbo a + where b.value = a.value and a.key = b.key and a.value > 'val_9') +; + +explain analyze select * from cv1; + +explain analyze select * +from (select * + from src_cbo b + where exists + (select a.key + from src_cbo a + where b.value = a.value and a.key = b.key and a.value > 'val_9') + ) a +; + + +explain analyze select * +from src_cbo +where src_cbo.key in (select key from src_cbo s1 where s1.key > '9') +; + + +explain analyze select p.p_partkey, li.l_suppkey +from (select distinct l_partkey as p_partkey from lineitem) p join lineitem li on p.p_partkey = li.l_partkey +where li.l_linenumber = 1 and + li.l_orderkey in (select l_orderkey from lineitem where l_shipmode = 'AIR' and l_linenumber = li.l_linenumber) +; + +explain analyze select key, value, count(*) +from src_cbo b +where b.key in (select key from src_cbo where src_cbo.key > '8') +group by key, value +having count(*) in (select count(*) from src_cbo s1 where s1.key > '9' group by s1.key ) +; + +explain analyze select p_mfgr, p_name, avg(p_size) +from part +group by p_mfgr, p_name +having p_name in + (select first_value(p_name) over(partition by p_mfgr order by p_size) from part) +; + +explain analyze select * +from src_cbo +where src_cbo.key not in + ( select key from src_cbo s1 + where s1.key > '2' + ) order by key +; + +explain analyze select p_mfgr, b.p_name, p_size +from part b +where b.p_name not in + (select p_name + from (select p_mfgr, p_name, p_size as r from part) a + where r < 10 and b.p_mfgr = a.p_mfgr + ) +; + +explain analyze select p_name, p_size +from +part where part.p_size not in + (select avg(p_size) + from (select p_size from part) a + where p_size < 10 + ) order by p_name +; + +explain analyze select b.p_mfgr, min(p_retailprice) +from part b +group by b.p_mfgr +having b.p_mfgr not in + (select p_mfgr + from (select p_mfgr, min(p_retailprice) l, max(p_retailprice) r, avg(p_retailprice) a from part group by p_mfgr) a + where min(p_retailprice) = l and r - l > 600 + ) + order by b.p_mfgr +; + +explain analyze select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1; +explain analyze select * from (select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1) cbo_t1; +explain analyze select i, a, h, b, c, d, e, f, g, a as x, a +1 as y from (select max(c_int) over (partition by key order by value range UNBOUNDED PRECEDING) a, min(c_int) over (partition by key order by value range current row) b, count(c_int) over(partition by key order by value range 1 PRECEDING) c, avg(value) over (partition by key order by value range between unbounded preceding and unbounded following) d, sum(value) over (partition by key order by value range between unbounded preceding and current row) e, avg(c_float) over (partition by key order by value range between 1 preceding and unbounded following) f, sum(c_float) over (partition by key order by value range between 1 preceding and current row) g, max(c_float) over (partition by key order by value range between 1 preceding and unbounded following) h, min(c_float) over (partition by key order by value range between 1 preceding and 1 following) i from cbo_t1) cbo_t1; +explain analyze select *, rank() over(partition by key order by value) as rr from src1; + + +set hive.auto.convert.join=false; +set hive.optimize.correlation=false; +explain analyze +select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp; + +set hive.optimize.correlation=true; +explain analyze +select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp; + +set hive.auto.convert.join=true; +set hive.optimize.correlation=true; +explain analyze +select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp; + +set hive.auto.convert.join=false; +set hive.optimize.correlation=false; +explain analyze +select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x LEFT SEMI JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp; + +explain analyze create table abcd (a int, b int, c int, d int); +create table abcd (a int, b int, c int, d int); +LOAD DATA LOCAL INPATH '../../data/files/in4.txt' INTO TABLE abcd; + +set hive.map.aggr=true; +explain analyze select a, count(distinct b), count(distinct c), sum(d) from abcd group by a; + +set hive.map.aggr=false; +explain analyze select a, count(distinct b), count(distinct c), sum(d) from abcd group by a; + +explain analyze create table src_rc_merge_test(key int, value string) stored as rcfile; +create table src_rc_merge_test(key int, value string) stored as rcfile; + +load data local inpath '../../data/files/smbbucket_1.rc' into table src_rc_merge_test; + +set hive.exec.compress.output = true; + +explain analyze create table tgt_rc_merge_test(key int, value string) stored as rcfile; +create table tgt_rc_merge_test(key int, value string) stored as rcfile; +insert into table tgt_rc_merge_test select * from src_rc_merge_test; + +show table extended like `tgt_rc_merge_test`; + +explain analyze select count(1) from tgt_rc_merge_test; +explain analyze select sum(hash(key)), sum(hash(value)) from tgt_rc_merge_test; + +alter table tgt_rc_merge_test concatenate; + +show table extended like `tgt_rc_merge_test`; + +explain analyze select count(1) from tgt_rc_merge_test; +explain analyze select sum(hash(key)), sum(hash(value)) from tgt_rc_merge_test; + +drop table src_rc_merge_test; +drop table tgt_rc_merge_test; + +explain analyze select src.key from src cross join src src2; + + +explain analyze create table nzhang_Tmp(a int, b string); +create table nzhang_Tmp(a int, b string); + +explain analyze create table nzhang_CTAS1 as select key k, value from src sort by k, value limit 10; +create table nzhang_CTAS1 as select key k, value from src sort by k, value limit 10; + + +explain analyze create table nzhang_ctas3 row format serde "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" stored as RCFile as select key/2 half_key, concat(value, "_con") conb from src sort by half_key, conb limit 10; + +create table nzhang_ctas3 row format serde "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" stored as RCFile as select key/2 half_key, concat(value, "_con") conb from src sort by half_key, conb limit 10; + +explain analyze create table if not exists nzhang_ctas3 as select key, value from src sort by key, value limit 2; + +create table if not exists nzhang_ctas3 as select key, value from src sort by key, value limit 2; + +set hive.support.concurrency=true; +set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; + + +explain analyze create temporary table acid_dtt(a int, b varchar(128)) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true'); +create temporary table acid_dtt(a int, b varchar(128)) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true'); + +set hive.map.aggr=false; +set hive.groupby.skewindata=true; + + +explain analyze +select src1.key as k1, src1.value as v1, + src2.key as k2, src2.value as v2 FROM + (select * FROM src WHERE src.key < 10) src1 + JOIN + (select * FROM src WHERE src.key < 10) src2 + SORT BY k1, v1, k2, v2; + + +CREATE TABLE myinput1(key int, value int); +LOAD DATA LOCAL INPATH '../../data/files/in8.txt' INTO TABLE myinput1; + +explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value; + +explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value join myinput1 c on a.key=c.key; + +explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value join myinput1 c on a.key<=>c.key; + +explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value AND a.value=b.key join myinput1 c on a.key<=>c.key AND a.value=c.value; + +explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value AND a.value<=>b.key join myinput1 c on a.key<=>c.key AND a.value<=>c.value; + +explain analyze select * FROM myinput1 a LEFT OUTER JOIN myinput1 b ON a.key<=>b.value; +explain analyze select * FROM myinput1 a RIGHT OUTER JOIN myinput1 b ON a.key<=>b.value; +explain analyze select * FROM myinput1 a FULL OUTER JOIN myinput1 b ON a.key<=>b.value; + +explain analyze select /*+ MAPJOIN(b) */ * FROM myinput1 a JOIN myinput1 b ON a.key<=>b.value; + +CREATE TABLE smb_input(key int, value int); +LOAD DATA LOCAL INPATH '../../data/files/in4.txt' into table smb_input; +LOAD DATA LOCAL INPATH '../../data/files/in5.txt' into table smb_input; + + +; + +CREATE TABLE smb_input1(key int, value int) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS; +CREATE TABLE smb_input2(key int, value int) CLUSTERED BY (value) SORTED BY (value) INTO 2 BUCKETS; + +from smb_input +insert overwrite table smb_input1 select * +insert overwrite table smb_input2 select *; + +SET hive.optimize.bucketmapjoin = true; +SET hive.optimize.bucketmapjoin.sortedmerge = true; +SET hive.input.format = org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat; + +analyze table smb_input1 compute statistics; + +explain analyze select /*+ MAPJOIN(a) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key; +explain analyze select /*+ MAPJOIN(a) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key AND a.value <=> b.value; +explain analyze select /*+ MAPJOIN(a) */ * FROM smb_input1 a RIGHT OUTER JOIN smb_input1 b ON a.key <=> b.key; +explain analyze select /*+ MAPJOIN(b) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key; +explain analyze select /*+ MAPJOIN(b) */ * FROM smb_input1 a LEFT OUTER JOIN smb_input1 b ON a.key <=> b.key; + +drop table sales; +drop table things; + +set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat; + +CREATE TABLE sales (name STRING, id INT) +ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; + +CREATE TABLE things (id INT, name STRING) partitioned by (ds string) +ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; + +load data local inpath '../../data/files/sales.txt' INTO TABLE sales; +load data local inpath '../../data/files/things.txt' INTO TABLE things partition(ds='2011-10-23'); +load data local inpath '../../data/files/things2.txt' INTO TABLE things partition(ds='2011-10-24'); + +explain analyze select name,id FROM sales LEFT SEMI JOIN things ON (sales.id = things.id); + +drop table sales; +drop table things; + +set hive.auto.convert.join=true; +set hive.auto.convert.join.noconditionaltask=true; +set hive.auto.convert.join.noconditionaltask.size=10000; +set hive.stats.fetch.column.stats=false; + +set hive.mapjoin.optimized.hashtable=false; + +explain analyze select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) where srcpart.value > 'val_450'; + +set hive.mapjoin.optimized.hashtable=true; + +explain analyze select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) where srcpart.value > 'val_450'; +set hive.stats.fetch.column.stats=true; +explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part + partition by p_mfgr + order by p_name + ); + +explain analyze +select p_mfgr, p_name, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop (on (select p1.* from part p1 join part p2 on p1.p_partkey = p2.p_partkey) j +distribute by j.p_mfgr +sort by j.p_name) +; + +explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part + partition by p_mfgr + order by p_name + ) abc; + +explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop(on part + partition by p_mfgr + order by p_name + ) +; + +explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop(on part + partition by p_mfgr + order by p_name + ) +group by p_mfgr, p_name, p_size +; + +explain analyze +select abc.* +from noop(on part +partition by p_mfgr +order by p_name +) abc join part p1 on abc.p_partkey = p1.p_partkey; + + +explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name, p_size desc) as r +from noopwithmap(on part +partition by p_mfgr +order by p_name, p_size desc); + +explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noopwithmap(on part + partition by p_mfgr + order by p_name); + +explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part +partition by p_mfgr +order by p_name) +; + +explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on noopwithmap(on noop(on part +partition by p_mfgr +order by p_mfgr DESC, p_name +))); + +explain analyze +select p_mfgr, p_name, +sub1.cd, sub1.s1 +from (select p_mfgr, p_name, +count(p_size) over (partition by p_mfgr order by p_name) as cd, +p_retailprice, +sum(p_retailprice) over w1 as s1 +from noop(on part +partition by p_mfgr +order by p_name) +window w1 as (partition by p_mfgr order by p_name rows between 2 preceding and 2 following) +) sub1 ; + + +explain analyze +select abc.p_mfgr, abc.p_name, +rank() over (distribute by abc.p_mfgr sort by abc.p_name) as r, +dense_rank() over (distribute by abc.p_mfgr sort by abc.p_name) as dr, +count(abc.p_name) over (distribute by abc.p_mfgr sort by abc.p_name) as cd, +abc.p_retailprice, sum(abc.p_retailprice) over (distribute by abc.p_mfgr sort by abc.p_name rows between unbounded preceding and current row) as s1, +abc.p_size, abc.p_size - lag(abc.p_size,1,abc.p_size) over (distribute by abc.p_mfgr sort by abc.p_name) as deltaSz +from noop(on part +partition by p_mfgr +order by p_name +) abc join part p1 on abc.p_partkey = p1.p_partkey +; + + +explain analyze create view IF NOT EXISTS mfgr_price_view as +select p_mfgr, p_brand, +sum(p_retailprice) as s +from part +group by p_mfgr, p_brand; + +CREATE TABLE part_4( +p_mfgr STRING, +p_name STRING, +p_size INT, +r INT, +dr INT, +s DOUBLE); + +CREATE TABLE part_5( +p_mfgr STRING, +p_name STRING, +p_size INT, +s2 INT, +r INT, +dr INT, +cud DOUBLE, +fv1 INT); + +explain analyze +from noop(on part +partition by p_mfgr +order by p_name) +INSERT OVERWRITE TABLE part_4 select p_mfgr, p_name, p_size, +rank() over (distribute by p_mfgr sort by p_name) as r, +dense_rank() over (distribute by p_mfgr sort by p_name) as dr, +sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row) as s +INSERT OVERWRITE TABLE part_5 select p_mfgr,p_name, p_size, +round(sum(p_size) over (distribute by p_mfgr sort by p_size range between 5 preceding and current row),1) as s2, +rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as r, +dense_rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as dr, +cume_dist() over (distribute by p_mfgr sort by p_mfgr, p_name) as cud, +first_value(p_size, true) over w1 as fv1 +window w1 as (distribute by p_mfgr sort by p_mfgr, p_name rows between 2 preceding and 2 following); + + +explain analyze +select p_mfgr, p_name, +rank() over (partition by p_mfgr,p_name) as r, +dense_rank() over (partition by p_mfgr,p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr,p_name rows between unbounded preceding and current row) as s1 +from noop(on + noopwithmap(on + noop(on + noop(on part + partition by p_mfgr + order by p_mfgr) + ) + partition by p_mfgr,p_name + order by p_mfgr,p_name) + partition by p_mfgr,p_name + order by p_mfgr,p_name) ; + +explain analyze +select p_mfgr, p_name, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on + noop(on + noop(on + noop(on part + partition by p_mfgr + order by p_mfgr) + ) + partition by p_mfgr,p_name + order by p_mfgr,p_name) + partition by p_mfgr + order by p_mfgr ) ; + +explain analyze +select p_mfgr, p_name, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr order by p_name) as s1 +from noop(on + noop(on + noop(on + noop(on part + partition by p_mfgr,p_name + order by p_mfgr,p_name) + ) + partition by p_mfgr + order by p_mfgr)); + +explain analyze select distinct src.* from src; + +explain analyze select explode(array('a', 'b')); + +set hive.optimize.skewjoin = true; +set hive.skewjoin.key = 2; + +CREATE TABLE T1(key STRING, val STRING) STORED AS TEXTFILE; +CREATE TABLE T2(key STRING, val STRING) STORED AS TEXTFILE; +CREATE TABLE T3(key STRING, val STRING) STORED AS TEXTFILE; +CREATE TABLE T4(key STRING, val STRING) STORED AS TEXTFILE; +CREATE TABLE dest_j1(key INT, value STRING) STORED AS TEXTFILE; + +LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T1; +LOAD DATA LOCAL INPATH '../../data/files/T2.txt' INTO TABLE T2; +LOAD DATA LOCAL INPATH '../../data/files/T3.txt' INTO TABLE T3; +LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T4; + + +explain analyze +FROM src src1 JOIN src src2 ON (src1.key = src2.key) +INSERT OVERWRITE TABLE dest_j1 select src1.key, src2.value; + +FROM src src1 JOIN src src2 ON (src1.key = src2.key) +INSERT OVERWRITE TABLE dest_j1 select src1.key, src2.value; + + + +explain analyze +select /*+ STREAMTABLE(a) */ * +FROM T1 a JOIN T2 b ON a.key = b.key + JOIN T3 c ON b.key = c.key + JOIN T4 d ON c.key = d.key; + +explain analyze +select /*+ STREAMTABLE(a,c) */ * +FROM T1 a JOIN T2 b ON a.key = b.key + JOIN T3 c ON b.key = c.key + JOIN T4 d ON c.key = d.key; + +explain analyze FROM T1 a JOIN src c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)); +FROM T1 a JOIN src c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)); + +explain analyze +select * FROM +(select src.* FROM src) x +JOIN +(select src.* FROM src) Y +ON (x.key = Y.key); + + +explain analyze select /*+ mapjoin(k)*/ sum(hash(k.key)), sum(hash(v.val)) from T1 k join T1 v on k.key=v.val; + +explain analyze select sum(hash(k.key)), sum(hash(v.val)) from T1 k join T1 v on k.key=v.key; + +explain analyze select count(1) from T1 a join T1 b on a.key = b.key; + +explain analyze FROM T1 a LEFT OUTER JOIN T2 c ON c.key+1=a.key select sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)); + +explain analyze FROM T1 a RIGHT OUTER JOIN T2 c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)); + +explain analyze FROM T1 a FULL OUTER JOIN T2 c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)); + +explain analyze select /*+ mapjoin(v)*/ sum(hash(k.key)), sum(hash(v.val)) from T1 k left outer join T1 v on k.key+1=v.key; diff --git a/ql/src/test/queries/clientpositive/explainanalyze_2.q b/ql/src/test/queries/clientpositive/explainanalyze_2.q new file mode 100644 index 0000000..dfee826 --- /dev/null +++ b/ql/src/test/queries/clientpositive/explainanalyze_2.q @@ -0,0 +1,329 @@ +set hive.explain.user=true; +set hive.metastore.aggregate.stats.cache.enabled=false; + +-- SORT_QUERY_RESULTS + +CREATE TABLE dest_j1(key STRING, value STRING, val2 STRING) STORED AS TEXTFILE; + +CREATE TABLE ss(k1 STRING,v1 STRING,k2 STRING,v2 STRING,k3 STRING,v3 STRING) STORED AS TEXTFILE; + +CREATE TABLE sr(k1 STRING,v1 STRING,k2 STRING,v2 STRING,k3 STRING,v3 STRING) STORED AS TEXTFILE; + +CREATE TABLE cs(k1 STRING,v1 STRING,k2 STRING,v2 STRING,k3 STRING,v3 STRING) STORED AS TEXTFILE; + +INSERT OVERWRITE TABLE ss +SELECT x.key,x.value,y.key,y.value,z.key,z.value +FROM src1 x +JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11); + +INSERT OVERWRITE TABLE sr +SELECT x.key,x.value,y.key,y.value,z.key,z.value +FROM src1 x +JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=12); + +INSERT OVERWRITE TABLE cs +SELECT x.key,x.value,y.key,y.value,z.key,z.value +FROM src1 x +JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08'); + + +ANALYZE TABLE ss COMPUTE STATISTICS; +ANALYZE TABLE ss COMPUTE STATISTICS FOR COLUMNS k1,v1,k2,v2,k3,v3; + +ANALYZE TABLE sr COMPUTE STATISTICS; +ANALYZE TABLE sr COMPUTE STATISTICS FOR COLUMNS k1,v1,k2,v2,k3,v3; + +ANALYZE TABLE cs COMPUTE STATISTICS; +ANALYZE TABLE cs COMPUTE STATISTICS FOR COLUMNS k1,v1,k2,v2,k3,v3; + +set hive.auto.convert.join=false; + +explain analyze +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11); + +explain analyze +select +ss.k1,sr.k2,cs.k3,count(ss.v1),count(sr.v2),count(cs.v3) +FROM +ss,sr,cs,src d1,src d2,src d3,src1,srcpart +where + ss.k1 = d1.key +and sr.k1 = d2.key +and cs.k1 = d3.key +and ss.k2 = sr.k2 +and ss.k3 = sr.k3 +and ss.v1 = src1.value +and ss.v2 = srcpart.value +and sr.v2 = cs.v2 +and sr.v3 = cs.v3 +and ss.v3='ssv3' +and sr.v1='srv1' +and src1.key = 'src1key' +and srcpart.key = 'srcpartkey' +and d1.value = 'd1value' +and d2.value in ('2000Q1','2000Q2','2000Q3') +and d3.value in ('2000Q1','2000Q2','2000Q3') +group by +ss.k1,sr.k2,cs.k3 +order by +ss.k1,sr.k2,cs.k3 +limit 100; + +explain analyze +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value); + +explain analyze +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value); + + +set hive.auto.convert.join=true; +set hive.auto.convert.join.noconditionaltask=true; +set hive.auto.convert.join.noconditionaltask.size=10000; +set hive.stats.fetch.column.stats=false; + + +explain analyze +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11); + +explain analyze +select +ss.k1,sr.k2,cs.k3,count(ss.v1),count(sr.v2),count(cs.v3) +FROM +ss,sr,cs,src d1,src d2,src d3,src1,srcpart +where + ss.k1 = d1.key +and sr.k1 = d2.key +and cs.k1 = d3.key +and ss.k2 = sr.k2 +and ss.k3 = sr.k3 +and ss.v1 = src1.value +and ss.v2 = srcpart.value +and sr.v2 = cs.v2 +and sr.v3 = cs.v3 +and ss.v3='ssv3' +and sr.v1='srv1' +and src1.key = 'src1key' +and srcpart.key = 'srcpartkey' +and d1.value = 'd1value' +and d2.value in ('2000Q1','2000Q2','2000Q3') +and d3.value in ('2000Q1','2000Q2','2000Q3') +group by +ss.k1,sr.k2,cs.k3 +order by +ss.k1,sr.k2,cs.k3 +limit 100; + +explain analyze +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value); + +explain analyze +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value); + + +set hive.auto.convert.join=true; +set hive.auto.convert.join.noconditionaltask=true; +set hive.auto.convert.join.noconditionaltask.size=10000; +set hive.auto.convert.sortmerge.join.bigtable.selection.policy = org.apache.hadoop.hive.ql.optimizer.TableSizeBasedBigTableSelectorForAutoSMJ; + +CREATE TABLE srcbucket_mapjoin(key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE; +CREATE TABLE tab_part (key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE; +CREATE TABLE srcbucket_mapjoin_part (key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE; + +load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin partition(ds='2008-04-08'); +load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin partition(ds='2008-04-08'); + +load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08'); +load data local inpath '../../data/files/srcbucket21.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08'); +load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08'); +load data local inpath '../../data/files/srcbucket23.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08'); + + + +set hive.optimize.bucketingsorting=false; +insert overwrite table tab_part partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin_part; + +CREATE TABLE tab(key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE; +insert overwrite table tab partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin; + +CREATE TABLE tab2(key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE; +insert overwrite table tab2 partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin; + +set hive.convert.join.bucket.mapjoin.tez = false; +set hive.auto.convert.sortmerge.join = true; + +set hive.auto.convert.join.noconditionaltask.size=500; + +explain analyze +select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key; + +explain analyze +select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key join tab s2 on s1.value=s2.value; + +explain analyze +select s1.key as key, s1.value as value from tab s1 join tab2 s3 on s1.key=s3.key; + +explain analyze +select s1.key as key, s1.value as value from tab s1 join tab2 s3 on s1.key=s3.key join tab2 s2 on s1.value=s2.value; + +explain analyze +select count(*) from (select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key +UNION ALL +select s2.key as key, s2.value as value from tab s2 +) a join tab_part b on (a.key = b.key); + +explain analyze +select count(*) from (select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key join tab s2 on s1.value=s2.value +UNION ALL +select s2.key as key, s2.value as value from tab s2 +) a join tab_part b on (a.key = b.key); + +explain analyze +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union all select * from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src union all select key, value from src)z ON (x.value = z.value); + +explain analyze +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value); + +CREATE TABLE a(key STRING, value STRING) STORED AS TEXTFILE; +CREATE TABLE b(key STRING, value STRING) STORED AS TEXTFILE; +CREATE TABLE c(key STRING, value STRING) STORED AS TEXTFILE; + +explain analyze +from +( +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union all select * from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +) tmp +INSERT OVERWRITE TABLE a SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE b SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE c SELECT tmp.key, tmp.value; + +explain analyze +FROM +( +SELECT x.key as key, y.value as value from src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key as key, y.value as value from src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key as key, y.value as value from src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +) tmp +INSERT OVERWRITE TABLE a SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE b SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE c SELECT tmp.key, tmp.value; + + +CREATE TABLE DEST1(key STRING, value STRING) STORED AS TEXTFILE; +CREATE TABLE DEST2(key STRING, val1 STRING, val2 STRING) STORED AS TEXTFILE; + +explain analyze +FROM (select 'tst1' as key, cast(count(1) as string) as value from src s1 + UNION DISTINCT + select s2.key as key, s2.value as value from src s2) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key, unionsrc.value; + +explain analyze FROM UNIQUEJOIN PRESERVE src a (a.key), PRESERVE src1 b (b.key), PRESERVE srcpart c (c.key) SELECT a.key, b.key, c.key; + +set hive.entity.capture.transform=true; + +explain analyze +SELECT +TRANSFORM(a.key, a.value) USING 'cat' AS (tkey, tvalue) +FROM src a join src b +on a.key = b.key; + +explain analyze +FROM ( + select key, value from ( + select 'tst1' as key, cast(count(1) as string) as value, 'tst1' as value2 from src s1 + UNION all + select s2.key as key, s2.value as value, 'tst1' as value2 from src s2) unionsub + UNION all + select key, value from src s0 + ) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) +GROUP BY unionsrc.key, unionsrc.value; + +explain analyze +FROM ( + select 'tst1' as key, cast(count(1) as string) as value, 'tst1' as value2 from src s1 + UNION all + select s2.key as key, s2.value as value, 'tst1' as value2 from src s2 + ) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) +GROUP BY unionsrc.key, unionsrc.value; diff --git a/ql/src/test/queries/clientpositive/explainanalyze_3.q b/ql/src/test/queries/clientpositive/explainanalyze_3.q new file mode 100644 index 0000000..0764334 --- /dev/null +++ b/ql/src/test/queries/clientpositive/explainanalyze_3.q @@ -0,0 +1,162 @@ +set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider; +set hive.metastore.filter.hook=org.apache.hadoop.hive.metastore.DefaultMetaStoreFilterHookImpl; +set hive.mapred.mode=nonstrict; +set hive.explain.user=true; + +set hive.support.concurrency=true; +set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; + +set hive.exec.dynamic.partition.mode=nonstrict; +set hive.vectorized.execution.enabled=true; + +CREATE TABLE acid_vectorized(a INT, b STRING) CLUSTERED BY(a) INTO 2 BUCKETS STORED AS ORC TBLPROPERTIES ('transactional'='true'); +insert into table acid_vectorized select cint, cstring1 from alltypesorc where cint is not null order by cint limit 10; +explain analyze select a, b from acid_vectorized order by a, b; + +explain analyze select key, value +FROM srcpart LATERAL VIEW explode(array(1,2,3)) myTable AS myCol; + +explain analyze show tables; + +explain analyze create database newDB location "/tmp/"; + +create database newDB location "/tmp/"; + +explain analyze describe database extended newDB; + +describe database extended newDB; + +explain analyze use newDB; + +use newDB; + +create table tab (name string); + +explain analyze alter table tab rename to newName; + +explain analyze drop table tab; + +drop table tab; + +explain analyze use default; + +use default; + +drop database newDB; + +explain analyze analyze table src compute statistics; + +explain analyze analyze table src compute statistics for columns; + +explain analyze +CREATE TEMPORARY MACRO SIGMOID (x DOUBLE) 1.0 / (1.0 + EXP(-x)); + +CREATE TEMPORARY MACRO SIGMOID (x DOUBLE) 1.0 / (1.0 + EXP(-x)); + +explain analyze SELECT SIGMOID(2) FROM src LIMIT 1; +explain analyze DROP TEMPORARY MACRO SIGMOID; +DROP TEMPORARY MACRO SIGMOID; + +explain analyze create table src_autho_test as select * from src; +create table src_autho_test as select * from src; + +set hive.security.authorization.enabled=true; + +explain analyze grant select on table src_autho_test to user hive_test_user; +grant select on table src_autho_test to user hive_test_user; + +explain analyze show grant user hive_test_user on table src_autho_test; +explain analyze show grant user hive_test_user on table src_autho_test(key); + +select key from src_autho_test order by key limit 20; + +explain analyze revoke select on table src_autho_test from user hive_test_user; + +explain analyze grant select(key) on table src_autho_test to user hive_test_user; + +explain analyze revoke select(key) on table src_autho_test from user hive_test_user; + +explain analyze +create role sRc_roLE; + +create role sRc_roLE; + +explain analyze +grant role sRc_roLE to user hive_test_user; + +grant role sRc_roLE to user hive_test_user; + +explain analyze show role grant user hive_test_user; + +explain analyze drop role sRc_roLE; +drop role sRc_roLE; + +set hive.security.authorization.enabled=false; +drop table src_autho_test; + +explain analyze drop view v; + +explain analyze create view v as with cte as (select * from src order by key limit 5) +select * from cte; + +explain analyze with cte as (select * from src order by key limit 5) +select * from cte; + +create table orc_merge5 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc; + +load data local inpath '../../data/files/orc_split_elim.orc' into table orc_merge5; + +SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat; +SET mapred.min.split.size=1000; +SET mapred.max.split.size=50000; +SET hive.optimize.index.filter=true; +set hive.merge.orcfile.stripe.level=false; +set hive.merge.tezfiles=false; +set hive.merge.mapfiles=false; +set hive.merge.mapredfiles=false; +set hive.compute.splits.in.am=true; +set tez.grouping.min-size=1000; +set tez.grouping.max-size=50000; + +set hive.merge.orcfile.stripe.level=true; +set hive.merge.tezfiles=true; +set hive.merge.mapfiles=true; +set hive.merge.mapredfiles=true; + +explain analyze insert overwrite table orc_merge5 select userid,string1,subtype,decimal1,ts from orc_merge5 where userid<=13; + +drop table orc_merge5; + +set hive.auto.convert.join=true; +set hive.auto.convert.join.noconditionaltask=true; +set hive.auto.convert.join.noconditionaltask.size=10000; + +CREATE TABLE srcbucket_mapjoin(key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE; +CREATE TABLE tab_part (key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE; +CREATE TABLE srcbucket_mapjoin_part (key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE; + +load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin partition(ds='2008-04-08'); +load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin partition(ds='2008-04-08'); + +load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08'); +load data local inpath '../../data/files/srcbucket21.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08'); +load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08'); +load data local inpath '../../data/files/srcbucket23.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08'); + + + +set hive.optimize.bucketingsorting=false; +insert overwrite table tab_part partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin_part; + +CREATE TABLE tab(key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE; +insert overwrite table tab partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin; + +set hive.convert.join.bucket.mapjoin.tez = true; +explain analyze +select a.key, a.value, b.value +from tab a join tab_part b on a.key = b.key; + + + diff --git a/ql/src/test/queries/clientpositive/explainanalyze_4.q b/ql/src/test/queries/clientpositive/explainanalyze_4.q new file mode 100644 index 0000000..dad397b --- /dev/null +++ b/ql/src/test/queries/clientpositive/explainanalyze_4.q @@ -0,0 +1,103 @@ +set hive.mapred.mode=nonstrict; + +set hive.explain.user=true; +set hive.auto.convert.join=false; +set hive.optimize.dynamic.partition.hashjoin=false; + +-- First try with regular mergejoin +explain analyze +select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint; + +select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint; + +explain analyze +select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null; + +select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null; + +explain analyze +select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1; + +select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1; + +set hive.auto.convert.join=true; +set hive.optimize.dynamic.partition.hashjoin=true; +set hive.auto.convert.join.noconditionaltask.size=200000; +set hive.stats.fetch.column.stats=false; +set hive.exec.reducers.bytes.per.reducer=200000; + +-- Try with dynamically partitioned hashjoin +explain analyze +select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint; + +select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint; + +explain analyze +select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null; + +select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null; + +explain analyze +select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1; + +select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1; diff --git a/ql/src/test/queries/clientpositive/explainanalyze_5.q b/ql/src/test/queries/clientpositive/explainanalyze_5.q new file mode 100644 index 0000000..bb23e45 --- /dev/null +++ b/ql/src/test/queries/clientpositive/explainanalyze_5.q @@ -0,0 +1,81 @@ +set hive.stats.column.autogather=true; + +explain analyze analyze table src compute statistics; + +explain analyze analyze table src compute statistics for columns; + +drop table src_multi2; + +create table src_multi2 like src; + +explain analyze insert overwrite table src_multi2 select subq.key, src.value from (select * from src union select * from src1)subq join src on subq.key=src.key; + +select count(*) from (select * from src union select * from src1)subq; + +insert overwrite table src_multi2 select subq.key, src.value from (select * from src union select * from src1)subq join src on subq.key=src.key; + +describe formatted src_multi2; + + +set hive.mapred.mode=nonstrict; +set hive.exec.dynamic.partition.mode=nonstrict; +set hive.support.concurrency=true; +set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; + + +-- SORT_QUERY_RESULTS + +create table acid_uami(i int, + de decimal(5,2), + vc varchar(128)) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true'); + +insert into table acid_uami values + (1, 109.23, 'mary had a little lamb'), + (6553, 923.19, 'its fleece was white as snow'); + +insert into table acid_uami values + (10, 119.23, 'and everywhere that mary went'), + (65530, 823.19, 'the lamb was sure to go'); + +select * from acid_uami order by de; + +explain analyze update acid_uami set de = 3.14 where de = 109.23 or de = 119.23; + +select * from acid_uami order by de; + +update acid_uami set de = 3.14 where de = 109.23 or de = 119.23; + +select * from acid_uami order by de; + +set hive.support.concurrency=true; +set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; +set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat; + +dfs ${system:test.dfs.mkdir} ${system:test.tmp.dir}/delete_orig_table; +dfs -copyFromLocal ../../data/files/alltypesorc ${system:test.tmp.dir}/delete_orig_table/00000_0; + +create table acid_dot( + ctinyint TINYINT, + csmallint SMALLINT, + cint INT, + cbigint BIGINT, + cfloat FLOAT, + cdouble DOUBLE, + cstring1 STRING, + cstring2 STRING, + ctimestamp1 TIMESTAMP, + ctimestamp2 TIMESTAMP, + cboolean1 BOOLEAN, + cboolean2 BOOLEAN) clustered by (cint) into 1 buckets stored as orc location '${system:test.tmp.dir}/delete_orig_table' TBLPROPERTIES ('transactional'='true'); + +select count(*) from acid_dot; + +explain analyze delete from acid_dot where cint < -1070551679; + +select count(*) from acid_dot; + +delete from acid_dot where cint < -1070551679; + +select count(*) from acid_dot; + +dfs -rmr ${system:test.tmp.dir}/delete_orig_table; diff --git a/ql/src/test/results/clientpositive/columnstats_partlvl.q.out b/ql/src/test/results/clientpositive/columnstats_partlvl.q.out index f6f2bfa..7e2edd9 100644 --- a/ql/src/test/results/clientpositive/columnstats_partlvl.q.out +++ b/ql/src/test/results/clientpositive/columnstats_partlvl.q.out @@ -46,18 +46,22 @@ STAGE PLANS: Map Operator Tree: TableScan alias: employee_part + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: employeeid (type: int) outputColumnNames: employeeid + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(employeeid, 16) keys: 2000.0 (type: double) mode: hash outputColumnNames: _col0, _col1 + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: 2000.0 (type: double) sort order: + Map-reduce partition columns: 2000.0 (type: double) + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: struct) Reduce Operator Tree: Group By Operator @@ -65,11 +69,14 @@ STAGE PLANS: keys: 2000.0 (type: double) mode: mergepartial outputColumnNames: _col0, _col1 + Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col1 (type: struct), 2000.0 (type: double) outputColumnNames: _col0, _col1 + Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -98,20 +105,24 @@ STAGE PLANS: Map Operator Tree: TableScan alias: employee_part + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE GatherStats: false Select Operator expressions: employeeid (type: int) outputColumnNames: employeeid + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(employeeid, 16) keys: 2000.0 (type: double) mode: hash outputColumnNames: _col0, _col1 + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: 2000.0 (type: double) null sort order: a sort order: + Map-reduce partition columns: 2000.0 (type: double) + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE tag: -1 value expressions: _col1 (type: struct) auto parallelism: false @@ -173,14 +184,17 @@ STAGE PLANS: keys: 2000.0 (type: double) mode: mergepartial outputColumnNames: _col0, _col1 + Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col1 (type: struct), 2000.0 (type: double) outputColumnNames: _col0, _col1 + Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false GlobalTableId: 0 #### A masked pattern was here #### NumFilesPerFileSink: 1 + Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: NONE #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat @@ -232,18 +246,22 @@ STAGE PLANS: Map Operator Tree: TableScan alias: employee_part + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: employeeid (type: int) outputColumnNames: employeeid + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(employeeid, 16) keys: 4000.0 (type: double) mode: hash outputColumnNames: _col0, _col1 + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: 4000.0 (type: double) sort order: + Map-reduce partition columns: 4000.0 (type: double) + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: struct) Reduce Operator Tree: Group By Operator @@ -251,11 +269,14 @@ STAGE PLANS: keys: 4000.0 (type: double) mode: mergepartial outputColumnNames: _col0, _col1 + Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col1 (type: struct), 4000.0 (type: double) outputColumnNames: _col0, _col1 + Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -284,20 +305,24 @@ STAGE PLANS: Map Operator Tree: TableScan alias: employee_part + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE GatherStats: false Select Operator expressions: employeeid (type: int) outputColumnNames: employeeid + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(employeeid, 16) keys: 4000.0 (type: double) mode: hash outputColumnNames: _col0, _col1 + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: 4000.0 (type: double) null sort order: a sort order: + Map-reduce partition columns: 4000.0 (type: double) + Statistics: Num rows: 26 Data size: 105 Basic stats: COMPLETE Column stats: NONE tag: -1 value expressions: _col1 (type: struct) auto parallelism: false @@ -359,14 +384,17 @@ STAGE PLANS: keys: 4000.0 (type: double) mode: mergepartial outputColumnNames: _col0, _col1 + Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col1 (type: struct), 4000.0 (type: double) outputColumnNames: _col0, _col1 + Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false GlobalTableId: 0 #### A masked pattern was here #### NumFilesPerFileSink: 1 + Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: NONE #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat @@ -418,18 +446,22 @@ STAGE PLANS: Map Operator Tree: TableScan alias: employee_part + Statistics: Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: employeeid (type: int), employeename (type: string) outputColumnNames: employeeid, employeename + Statistics: Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(employeeid, 16), compute_stats(employeename, 16) keys: 2000.0 (type: double) mode: hash outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: 2000.0 (type: double) sort order: + Map-reduce partition columns: 2000.0 (type: double) + Statistics: Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: struct), _col2 (type: struct) Reduce Operator Tree: Group By Operator @@ -437,11 +469,14 @@ STAGE PLANS: keys: 2000.0 (type: double) mode: mergepartial outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col1 (type: struct), _col2 (type: struct), 2000.0 (type: double) outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -498,18 +533,22 @@ STAGE PLANS: Map Operator Tree: TableScan alias: employee_part + Statistics: Num rows: 2 Data size: 210 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: employeesalary (type: double), employeeid (type: int), employeename (type: string) outputColumnNames: employeesalary, employeeid, employeename + Statistics: Num rows: 2 Data size: 210 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(employeeid, 16), compute_stats(employeename, 16) keys: employeesalary (type: double) mode: hash outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 2 Data size: 210 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: double) sort order: + Map-reduce partition columns: _col0 (type: double) + Statistics: Num rows: 2 Data size: 210 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: struct), _col2 (type: struct) Reduce Operator Tree: Group By Operator @@ -517,11 +556,14 @@ STAGE PLANS: keys: KEY._col0 (type: double) mode: mergepartial outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col1 (type: struct), _col2 (type: struct), _col0 (type: double) outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -580,23 +622,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: employee_part + Statistics: Num rows: 2 Data size: 210 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: employeeid (type: int), employeename (type: string) outputColumnNames: employeeid, employeename + Statistics: Num rows: 2 Data size: 210 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(employeeid, 16), compute_stats(employeename, 16) mode: hash outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 968 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 968 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct), _col1 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1) mode: mergepartial outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 972 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 972 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git a/ql/src/test/results/clientpositive/columnstats_partlvl_dp.q.out b/ql/src/test/results/clientpositive/columnstats_partlvl_dp.q.out index 21089e1..47fffab 100644 --- a/ql/src/test/results/clientpositive/columnstats_partlvl_dp.q.out +++ b/ql/src/test/results/clientpositive/columnstats_partlvl_dp.q.out @@ -84,18 +84,22 @@ STAGE PLANS: Map Operator Tree: TableScan alias: employee_part + Statistics: Num rows: 1 Data size: 64 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: country (type: string), employeename (type: string), employeeid (type: int) outputColumnNames: country, employeename, employeeid + Statistics: Num rows: 1 Data size: 64 Basic stats: PARTIAL Column stats: NONE Group By Operator aggregations: compute_stats(employeename, 16), compute_stats(employeeid, 16) keys: 4000.0 (type: double), country (type: string) mode: hash outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: 4000.0 (type: double), _col1 (type: string) sort order: ++ Map-reduce partition columns: 4000.0 (type: double), _col1 (type: string) + Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE value expressions: _col2 (type: struct), _col3 (type: struct) Reduce Operator Tree: Group By Operator @@ -103,11 +107,14 @@ STAGE PLANS: keys: 4000.0 (type: double), KEY._col1 (type: string) mode: mergepartial outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col2 (type: struct), _col3 (type: struct), 4000.0 (type: double), _col1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -157,18 +164,22 @@ STAGE PLANS: Map Operator Tree: TableScan alias: employee_part + Statistics: Num rows: 42 Data size: 169 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: country (type: string), employeeid (type: int) outputColumnNames: country, employeeid + Statistics: Num rows: 42 Data size: 169 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(employeeid, 16) keys: 2000.0 (type: double), country (type: string) mode: hash outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 42 Data size: 169 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: 2000.0 (type: double), _col1 (type: string) sort order: ++ Map-reduce partition columns: 2000.0 (type: double), _col1 (type: string) + Statistics: Num rows: 42 Data size: 169 Basic stats: COMPLETE Column stats: NONE value expressions: _col2 (type: struct) Reduce Operator Tree: Group By Operator @@ -176,11 +187,14 @@ STAGE PLANS: keys: 2000.0 (type: double), KEY._col1 (type: string) mode: mergepartial outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 21 Data size: 84 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col2 (type: struct), 2000.0 (type: double), _col1 (type: string) outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 21 Data size: 84 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 21 Data size: 84 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -241,18 +255,22 @@ STAGE PLANS: Map Operator Tree: TableScan alias: employee_part + Statistics: Num rows: 116 Data size: 466 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: employeesalary (type: double), country (type: string), employeeid (type: int) outputColumnNames: employeesalary, country, employeeid + Statistics: Num rows: 116 Data size: 466 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(employeeid, 16) keys: employeesalary (type: double), country (type: string) mode: hash outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 116 Data size: 466 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: double), _col1 (type: string) sort order: ++ Map-reduce partition columns: _col0 (type: double), _col1 (type: string) + Statistics: Num rows: 116 Data size: 466 Basic stats: COMPLETE Column stats: NONE value expressions: _col2 (type: struct) Reduce Operator Tree: Group By Operator @@ -260,11 +278,14 @@ STAGE PLANS: keys: KEY._col0 (type: double), KEY._col1 (type: string) mode: mergepartial outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 58 Data size: 233 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col2 (type: struct), _col0 (type: double), _col1 (type: string) outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 58 Data size: 233 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 58 Data size: 233 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -322,18 +343,22 @@ STAGE PLANS: Map Operator Tree: TableScan alias: employee_part + Statistics: Num rows: 2 Data size: 466 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: employeesalary (type: double), country (type: string), employeeid (type: int), employeename (type: string) outputColumnNames: employeesalary, country, employeeid, employeename + Statistics: Num rows: 2 Data size: 466 Basic stats: PARTIAL Column stats: NONE Group By Operator aggregations: compute_stats(employeeid, 16), compute_stats(employeename, 16) keys: employeesalary (type: double), country (type: string) mode: hash outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 2 Data size: 466 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: double), _col1 (type: string) sort order: ++ Map-reduce partition columns: _col0 (type: double), _col1 (type: string) + Statistics: Num rows: 2 Data size: 466 Basic stats: COMPLETE Column stats: NONE value expressions: _col2 (type: struct), _col3 (type: struct) Reduce Operator Tree: Group By Operator @@ -341,11 +366,14 @@ STAGE PLANS: keys: KEY._col0 (type: double), KEY._col1 (type: string) mode: mergepartial outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 233 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col2 (type: struct), _col3 (type: struct), _col0 (type: double), _col1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 233 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 233 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git a/ql/src/test/results/clientpositive/columnstats_quoting.q.out b/ql/src/test/results/clientpositive/columnstats_quoting.q.out index 288e61b..52e3538 100644 --- a/ql/src/test/results/clientpositive/columnstats_quoting.q.out +++ b/ql/src/test/results/clientpositive/columnstats_quoting.q.out @@ -24,23 +24,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: user_web_events + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: user id (type: bigint), user name (type: string) outputColumnNames: user id, user name + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Group By Operator aggregations: compute_stats(user id, 16), compute_stats(user name, 16) mode: hash outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 968 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 968 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct), _col1 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1) mode: mergepartial outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 972 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 972 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -75,23 +81,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: user_web_events + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: user id (type: bigint) outputColumnNames: user id + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Group By Operator aggregations: compute_stats(user id, 16) mode: hash outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 476 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 476 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0) mode: mergepartial outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 480 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 480 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git a/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out b/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out index 8d280c1..d56ec6f 100644 --- a/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out +++ b/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out @@ -54,23 +54,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: uservisits_web_text_none + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: sourceip (type: string), avgtimeonsite (type: int), adrevenue (type: float) outputColumnNames: sourceip, avgtimeonsite, adrevenue + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(sourceip, 16), compute_stats(avgtimeonsite, 16), compute_stats(adrevenue, 16) mode: hash outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2) mode: mergepartial outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -99,17 +105,21 @@ STAGE PLANS: Map Operator Tree: TableScan alias: uservisits_web_text_none + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE GatherStats: false Select Operator expressions: sourceip (type: string), avgtimeonsite (type: int), adrevenue (type: float) outputColumnNames: sourceip, avgtimeonsite, adrevenue + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(sourceip, 16), compute_stats(avgtimeonsite, 16), compute_stats(adrevenue, 16) mode: hash outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator null sort order: sort order: + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE tag: -1 value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct) auto parallelism: false @@ -168,11 +178,13 @@ STAGE PLANS: aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2) mode: mergepartial outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false GlobalTableId: 0 #### A masked pattern was here #### NumFilesPerFileSink: 1 + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat @@ -222,23 +234,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: uservisits_web_text_none + Statistics: Num rows: 9 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: sourceip (type: string), desturl (type: string), visitdate (type: string), adrevenue (type: float), useragent (type: string), ccode (type: string), lcode (type: string), skeyword (type: string), avgtimeonsite (type: int) outputColumnNames: sourceip, desturl, visitdate, adrevenue, useragent, ccode, lcode, skeyword, avgtimeonsite + Statistics: Num rows: 9 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(sourceip, 16), compute_stats(desturl, 16), compute_stats(visitdate, 16), compute_stats(adrevenue, 16), compute_stats(useragent, 16), compute_stats(ccode, 16), compute_stats(lcode, 16), compute_stats(skeyword, 16), compute_stats(avgtimeonsite, 16) mode: hash outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 4396 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 4396 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct), _col3 (type: struct), _col4 (type: struct), _col5 (type: struct), _col6 (type: struct), _col7 (type: struct), _col8 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2), compute_stats(VALUE._col3), compute_stats(VALUE._col4), compute_stats(VALUE._col5), compute_stats(VALUE._col6), compute_stats(VALUE._col7), compute_stats(VALUE._col8) mode: mergepartial outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 4404 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 4404 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -322,23 +340,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: empty_tab + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: a (type: int), b (type: double), c (type: string), d (type: boolean), e (type: binary) outputColumnNames: a, b, c, d, e + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Group By Operator aggregations: compute_stats(a, 16), compute_stats(b, 16), compute_stats(c, 16), compute_stats(d, 16), compute_stats(e, 16) mode: hash outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 2004 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 2004 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct), _col3 (type: struct), _col4 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2), compute_stats(VALUE._col3), compute_stats(VALUE._col4) mode: mergepartial outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 2012 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 2012 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -446,23 +470,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: uservisits_in_dummy_db + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: sourceip (type: string), avgtimeonsite (type: int), adrevenue (type: float) outputColumnNames: sourceip, avgtimeonsite, adrevenue + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(sourceip, 16), compute_stats(avgtimeonsite, 16), compute_stats(adrevenue, 16) mode: hash outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2) mode: mergepartial outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -491,17 +521,21 @@ STAGE PLANS: Map Operator Tree: TableScan alias: uservisits_in_dummy_db + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE GatherStats: false Select Operator expressions: sourceip (type: string), avgtimeonsite (type: int), adrevenue (type: float) outputColumnNames: sourceip, avgtimeonsite, adrevenue + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(sourceip, 16), compute_stats(avgtimeonsite, 16), compute_stats(adrevenue, 16) mode: hash outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator null sort order: sort order: + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE tag: -1 value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct) auto parallelism: false @@ -560,11 +594,13 @@ STAGE PLANS: aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2) mode: mergepartial outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false GlobalTableId: 0 #### A masked pattern was here #### NumFilesPerFileSink: 1 + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat @@ -614,23 +650,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: uservisits_in_dummy_db + Statistics: Num rows: 9 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: sourceip (type: string), desturl (type: string), visitdate (type: string), adrevenue (type: float), useragent (type: string), ccode (type: string), lcode (type: string), skeyword (type: string), avgtimeonsite (type: int) outputColumnNames: sourceip, desturl, visitdate, adrevenue, useragent, ccode, lcode, skeyword, avgtimeonsite + Statistics: Num rows: 9 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(sourceip, 16), compute_stats(desturl, 16), compute_stats(visitdate, 16), compute_stats(adrevenue, 16), compute_stats(useragent, 16), compute_stats(ccode, 16), compute_stats(lcode, 16), compute_stats(skeyword, 16), compute_stats(avgtimeonsite, 16) mode: hash outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 4396 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 4396 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct), _col3 (type: struct), _col4 (type: struct), _col5 (type: struct), _col6 (type: struct), _col7 (type: struct), _col8 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2), compute_stats(VALUE._col3), compute_stats(VALUE._col4), compute_stats(VALUE._col5), compute_stats(VALUE._col6), compute_stats(VALUE._col7), compute_stats(VALUE._col8) mode: mergepartial outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 4404 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 4404 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git a/ql/src/test/results/clientpositive/compute_stats_date.q.out b/ql/src/test/results/clientpositive/compute_stats_date.q.out index eaf4bbe..fba8cad 100644 --- a/ql/src/test/results/clientpositive/compute_stats_date.q.out +++ b/ql/src/test/results/clientpositive/compute_stats_date.q.out @@ -64,23 +64,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: tab_date + Statistics: Num rows: 13 Data size: 778 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: fl_date (type: date) outputColumnNames: fl_date + Statistics: Num rows: 13 Data size: 778 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(fl_date, 16) mode: hash outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 572 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 572 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0) mode: mergepartial outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 576 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 576 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git a/ql/src/test/results/clientpositive/constant_prop_2.q.out b/ql/src/test/results/clientpositive/constant_prop_2.q.out index c1de559..24be518 100644 --- a/ql/src/test/results/clientpositive/constant_prop_2.q.out +++ b/ql/src/test/results/clientpositive/constant_prop_2.q.out @@ -37,18 +37,22 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) outputColumnNames: key, value + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(key, 16), compute_stats(value, 16) keys: '2008-04-08' (type: string), '11' (type: string) mode: hash outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: '2008-04-08' (type: string), '11' (type: string) sort order: ++ Map-reduce partition columns: '2008-04-08' (type: string), '11' (type: string) + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE value expressions: _col2 (type: struct), _col3 (type: struct) Reduce Operator Tree: Group By Operator @@ -56,11 +60,14 @@ STAGE PLANS: keys: '2008-04-08' (type: string), '11' (type: string) mode: mergepartial outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col2 (type: struct), _col3 (type: struct), '2008-04-08' (type: string), '11' (type: string) outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git a/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out b/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out index 42aeb6f..d974dbc 100644 --- a/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out +++ b/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out @@ -70,23 +70,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: uservisits_web_text_none + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: sourceip (type: string), avgtimeonsite (type: int), adrevenue (type: float) outputColumnNames: sourceip, avgtimeonsite, adrevenue + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(sourceip, 16), compute_stats(avgtimeonsite, 16), compute_stats(adrevenue, 16) mode: hash outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2) mode: mergepartial outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -115,17 +121,21 @@ STAGE PLANS: Map Operator Tree: TableScan alias: uservisits_web_text_none + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE GatherStats: false Select Operator expressions: sourceip (type: string), avgtimeonsite (type: int), adrevenue (type: float) outputColumnNames: sourceip, avgtimeonsite, adrevenue + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(sourceip, 16), compute_stats(avgtimeonsite, 16), compute_stats(adrevenue, 16) mode: hash outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator null sort order: sort order: + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE tag: -1 value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct) auto parallelism: false @@ -184,11 +194,13 @@ STAGE PLANS: aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2) mode: mergepartial outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false GlobalTableId: 0 #### A masked pattern was here #### NumFilesPerFileSink: 1 + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat @@ -294,23 +306,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: empty_tab + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: a (type: int), b (type: double), c (type: string), d (type: boolean), e (type: binary) outputColumnNames: a, b, c, d, e + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Group By Operator aggregations: compute_stats(a, 16), compute_stats(b, 16), compute_stats(c, 16), compute_stats(d, 16), compute_stats(e, 16) mode: hash outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 2004 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 2004 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct), _col3 (type: struct), _col4 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2), compute_stats(VALUE._col3), compute_stats(VALUE._col4) mode: mergepartial outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 2012 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 2012 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git a/ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out b/ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out index de08dc5..9b7b4d2 100644 --- a/ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out +++ b/ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out @@ -80,21 +80,27 @@ STAGE PLANS: Map Operator Tree: TableScan alias: acid + Statistics: Num rows: 1725 Data size: 5177 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (key = 'foo') (type: boolean) + Statistics: Num rows: 862 Data size: 2586 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ROW__ID (type: struct) outputColumnNames: _col0 + Statistics: Num rows: 862 Data size: 2586 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) + Statistics: Num rows: 862 Data size: 2586 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Select Operator expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), 'bar' (type: string), '2008-04-08' (type: string) outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 862 Data size: 2586 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 862 Data size: 2586 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat @@ -152,22 +158,28 @@ STAGE PLANS: Map Operator Tree: TableScan alias: acid + Statistics: Num rows: 1945 Data size: 5835 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (key = 'foo') (type: boolean) + Statistics: Num rows: 972 Data size: 2916 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ROW__ID (type: struct), ds (type: string) outputColumnNames: _col0, _col3 + Statistics: Num rows: 972 Data size: 2916 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) + Statistics: Num rows: 972 Data size: 2916 Basic stats: COMPLETE Column stats: NONE value expressions: _col3 (type: string) Reduce Operator Tree: Select Operator expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), 'bar' (type: string), VALUE._col1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 972 Data size: 2916 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 972 Data size: 2916 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat @@ -317,21 +329,27 @@ STAGE PLANS: Map Operator Tree: TableScan alias: acid + Statistics: Num rows: 1566 Data size: 4698 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (key = 'foo') (type: boolean) + Statistics: Num rows: 783 Data size: 2349 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ROW__ID (type: struct) outputColumnNames: _col0 + Statistics: Num rows: 783 Data size: 2349 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) + Statistics: Num rows: 783 Data size: 2349 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Select Operator expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), 'bar' (type: string), '2008-04-08' (type: string) outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 783 Data size: 2349 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 783 Data size: 2349 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat @@ -389,21 +407,27 @@ STAGE PLANS: Map Operator Tree: TableScan alias: acid + Statistics: Num rows: 1785 Data size: 5357 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (key = 'foo') (type: boolean) + Statistics: Num rows: 892 Data size: 2676 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ROW__ID (type: struct), ds (type: string) outputColumnNames: _col0, _col3 + Statistics: Num rows: 892 Data size: 2676 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col3 (type: string), '_bucket_number' (type: string), _col0 (type: struct) sort order: +++ Map-reduce partition columns: _col3 (type: string) + Statistics: Num rows: 892 Data size: 2676 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Select Operator expressions: KEY._col0 (type: struct), 'foo' (type: string), 'bar' (type: string), KEY._col3 (type: string), KEY.'_bucket_number' (type: string) outputColumnNames: _col0, _col1, _col2, _col3, '_bucket_number' + Statistics: Num rows: 892 Data size: 2676 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 892 Data size: 2676 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat @@ -559,21 +583,27 @@ STAGE PLANS: Map Operator Tree: TableScan alias: acid + Statistics: Num rows: 1547 Data size: 4642 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (key = 'foo') (type: boolean) + Statistics: Num rows: 773 Data size: 2319 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ROW__ID (type: struct) outputColumnNames: _col0 + Statistics: Num rows: 773 Data size: 2319 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) + Statistics: Num rows: 773 Data size: 2319 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Select Operator expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), 'bar' (type: string), '2008-04-08' (type: string), 11 (type: int) outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 773 Data size: 2319 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 773 Data size: 2319 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat @@ -632,22 +662,28 @@ STAGE PLANS: Map Operator Tree: TableScan alias: acid + Statistics: Num rows: 3032 Data size: 9099 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (key = 'foo') (type: boolean) + Statistics: Num rows: 1516 Data size: 4549 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ROW__ID (type: struct), hr (type: int) outputColumnNames: _col0, _col4 + Statistics: Num rows: 1516 Data size: 4549 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) + Statistics: Num rows: 1516 Data size: 4549 Basic stats: COMPLETE Column stats: NONE value expressions: _col4 (type: int) Reduce Operator Tree: Select Operator expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), 'bar' (type: string), '2008-04-08' (type: string), VALUE._col2 (type: int) outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1516 Data size: 4549 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1516 Data size: 4549 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat @@ -810,21 +846,27 @@ STAGE PLANS: Map Operator Tree: TableScan alias: acid + Statistics: Num rows: 1548 Data size: 4644 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (key = 'foo') (type: boolean) + Statistics: Num rows: 774 Data size: 2322 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ROW__ID (type: struct) outputColumnNames: _col0 + Statistics: Num rows: 774 Data size: 2322 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: struct) sort order: + Map-reduce partition columns: UDFToInteger(_col0) (type: int) + Statistics: Num rows: 774 Data size: 2322 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Select Operator expressions: KEY.reducesinkkey0 (type: struct), 'foo' (type: string), 'bar' (type: string), '2008-04-08' (type: string), 11 (type: int) outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 774 Data size: 2322 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 774 Data size: 2322 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat @@ -883,21 +925,27 @@ STAGE PLANS: Map Operator Tree: TableScan alias: acid + Statistics: Num rows: 3034 Data size: 9103 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (key = 'foo') (type: boolean) + Statistics: Num rows: 1517 Data size: 4551 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ROW__ID (type: struct), hr (type: int) outputColumnNames: _col0, _col4 + Statistics: Num rows: 1517 Data size: 4551 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: '2008-04-08' (type: string), _col4 (type: int), '_bucket_number' (type: string), _col0 (type: struct) sort order: ++++ Map-reduce partition columns: '2008-04-08' (type: string), _col4 (type: int) + Statistics: Num rows: 1517 Data size: 4551 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Select Operator expressions: KEY._col0 (type: struct), 'foo' (type: string), 'bar' (type: string), '2008-04-08' (type: string), KEY._col4 (type: int), KEY.'_bucket_number' (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, '_bucket_number' + Statistics: Num rows: 1517 Data size: 4551 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1517 Data size: 4551 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat @@ -1060,22 +1108,28 @@ STAGE PLANS: Map Operator Tree: TableScan alias: acid + Statistics: Num rows: 46 Data size: 4644 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (key = 'foo') (type: boolean) + Statistics: Num rows: 23 Data size: 2322 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ROW__ID (type: struct), key (type: string), ds (type: string), hr (type: int) outputColumnNames: _col0, _col1, _col3, _col4 + Statistics: Num rows: 23 Data size: 2322 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col3 (type: string), _col4 (type: int), '_bucket_number' (type: string), _col0 (type: struct) sort order: ++++ Map-reduce partition columns: _col3 (type: string), _col4 (type: int) + Statistics: Num rows: 23 Data size: 2322 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: string), 'bar' (type: string) Reduce Operator Tree: Select Operator expressions: KEY._col0 (type: struct), VALUE._col1 (type: string), VALUE._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: int), KEY.'_bucket_number' (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, '_bucket_number' + Statistics: Num rows: 23 Data size: 2322 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 23 Data size: 2322 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat @@ -1134,22 +1188,28 @@ STAGE PLANS: Map Operator Tree: TableScan alias: acid + Statistics: Num rows: 90 Data size: 9101 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (key = 'foo') (type: boolean) + Statistics: Num rows: 45 Data size: 4550 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ROW__ID (type: struct), key (type: string), ds (type: string), hr (type: int) outputColumnNames: _col0, _col1, _col3, _col4 + Statistics: Num rows: 45 Data size: 4550 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col3 (type: string), _col4 (type: int), '_bucket_number' (type: string), _col0 (type: struct) sort order: ++++ Map-reduce partition columns: _col3 (type: string), _col4 (type: int) + Statistics: Num rows: 45 Data size: 4550 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: string), 'bar' (type: string) Reduce Operator Tree: Select Operator expressions: KEY._col0 (type: struct), VALUE._col1 (type: string), VALUE._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: int), KEY.'_bucket_number' (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, '_bucket_number' + Statistics: Num rows: 45 Data size: 4550 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 45 Data size: 4550 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat diff --git a/ql/src/test/results/clientpositive/exec_parallel_column_stats.q.out b/ql/src/test/results/clientpositive/exec_parallel_column_stats.q.out index 4fcde91..f256ec1 100644 --- a/ql/src/test/results/clientpositive/exec_parallel_column_stats.q.out +++ b/ql/src/test/results/clientpositive/exec_parallel_column_stats.q.out @@ -12,23 +12,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) outputColumnNames: key, value + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(key, 16), compute_stats(value, 16) mode: hash outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 984 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 984 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct), _col1 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1) mode: mergepartial outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 984 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 984 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git a/ql/src/test/results/clientpositive/temp_table_display_colstats_tbllvl.q.out b/ql/src/test/results/clientpositive/temp_table_display_colstats_tbllvl.q.out index e229dba..d60ba82 100644 --- a/ql/src/test/results/clientpositive/temp_table_display_colstats_tbllvl.q.out +++ b/ql/src/test/results/clientpositive/temp_table_display_colstats_tbllvl.q.out @@ -78,23 +78,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: uservisits_web_text_none + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: sourceip (type: string), avgtimeonsite (type: int), adrevenue (type: float) outputColumnNames: sourceip, avgtimeonsite, adrevenue + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(sourceip, 16), compute_stats(avgtimeonsite, 16), compute_stats(adrevenue, 16) mode: hash outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2) mode: mergepartial outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -123,17 +129,21 @@ STAGE PLANS: Map Operator Tree: TableScan alias: uservisits_web_text_none + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE GatherStats: false Select Operator expressions: sourceip (type: string), avgtimeonsite (type: int), adrevenue (type: float) outputColumnNames: sourceip, avgtimeonsite, adrevenue + Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: compute_stats(sourceip, 16), compute_stats(avgtimeonsite, 16), compute_stats(adrevenue, 16) mode: hash outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator null sort order: sort order: + Statistics: Num rows: 1 Data size: 1444 Basic stats: COMPLETE Column stats: NONE tag: -1 value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct) auto parallelism: false @@ -188,11 +198,13 @@ STAGE PLANS: aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2) mode: mergepartial outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false GlobalTableId: 0 #### A masked pattern was here #### NumFilesPerFileSink: 1 + Statistics: Num rows: 1 Data size: 1452 Basic stats: COMPLETE Column stats: NONE #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat @@ -298,23 +310,29 @@ STAGE PLANS: Map Operator Tree: TableScan alias: empty_tab + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: a (type: int), b (type: double), c (type: string), d (type: boolean), e (type: binary) outputColumnNames: a, b, c, d, e + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Group By Operator aggregations: compute_stats(a, 16), compute_stats(b, 16), compute_stats(c, 16), compute_stats(d, 16), compute_stats(e, 16) mode: hash outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 2004 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: + Statistics: Num rows: 1 Data size: 2004 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct), _col3 (type: struct), _col4 (type: struct) Reduce Operator Tree: Group By Operator aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1), compute_stats(VALUE._col2), compute_stats(VALUE._col3), compute_stats(VALUE._col4) mode: mergepartial outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 2012 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false + Statistics: Num rows: 1 Data size: 2012 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_0.q.out b/ql/src/test/results/clientpositive/tez/explainanalyze_0.q.out new file mode 100644 index 0000000..101622e --- /dev/null +++ b/ql/src/test/results/clientpositive/tez/explainanalyze_0.q.out @@ -0,0 +1,471 @@ +PREHOOK: query: select * from src a union all select * from src b limit 10 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select * from src a union all select * from src b limit 10 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * from src a union all select * from src b limit 10 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * from src a union all select * from src b limit 10 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Union 2 (CONTAINS) +Map 3 <- Union 2 (CONTAINS) + +Stage-0 + Fetch Operator + limit:10 + Stage-1 + Union 2 + <-Map 1 [CONTAINS] + File Output Operator [FS_7] + Limit [LIM_6] (rows=10/10 width=178) + Number of rows:10 + Select Operator [SEL_1] (rows=500/12 width=178) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=500/13 width=178) + Output:["key","value"] + <-Map 3 [CONTAINS] + File Output Operator [FS_7] + Limit [LIM_6] (rows=10/10 width=178) + Number of rows:10 + Select Operator [SEL_3] (rows=500/12 width=178) + Output:["_col0","_col1"] + TableScan [TS_2] (rows=500/13 width=178) + Output:["key","value"] + +PREHOOK: query: select key from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select key from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze select key from src +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select key from src +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-0 + Fetch Operator + limit:-1 + Select Operator [SEL_1] + Output:["_col0"] + TableScan [TS_0] + Output:["key"] + +PREHOOK: query: create table t as select key from src +PREHOOK: type: CREATETABLE_AS_SELECT +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@t +POSTHOOK: query: create table t as select key from src +POSTHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@t +PREHOOK: query: explain analyze create table t as select key from src +PREHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: query: explain analyze create table t as select key from src +POSTHOOK: type: CREATETABLE_AS_SELECT +Plan optimized by CBO. + +Stage-3 + Stats-Aggr Operator + Stage-4 + Create Table Operator: + name:default.t + Stage-2 + Dependency Collection{} + Stage-1 + Map 1 + File Output Operator [FS_2] + table:{"name:":"default.t"} + Select Operator [SEL_1] (rows=500/500 width=87) + Output:["_col0"] + TableScan [TS_0] (rows=500/500 width=87) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + Stage-0 + Move Operator + Please refer to the previous Stage-1 + +PREHOOK: query: create table t as select key from src +PREHOOK: type: CREATETABLE_AS_SELECT +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@t +POSTHOOK: query: create table t as select key from src +POSTHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@t +POSTHOOK: Lineage: t.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] +PREHOOK: query: insert overwrite table t select key from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@t +POSTHOOK: query: insert overwrite table t select key from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@t +PREHOOK: query: explain analyze insert overwrite table t select key from src +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze insert overwrite table t select key from src +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-3 + Stats-Aggr Operator + Stage-0 + Move Operator + table:{"name:":"default.t"} + Stage-2 + Dependency Collection{} + Stage-1 + Map 1 + File Output Operator [FS_2] + table:{"name:":"default.t"} + Select Operator [SEL_1] (rows=500/500 width=87) + Output:["_col0"] + TableScan [TS_0] (rows=500/500 width=87) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select key from src limit 10 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select key from src limit 10 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze select key from src limit 10 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select key from src limit 10 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-0 + Fetch Operator + limit:10 + Limit [LIM_2] + Number of rows:10 + Select Operator [SEL_1] + Output:["_col0"] + TableScan [TS_0] + Output:["key"] + +PREHOOK: query: select key from src where value < 10 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select key from src where value < 10 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze select key from src where value < 10 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select key from src where value < 10 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-0 + Fetch Operator + limit:-1 + Select Operator [SEL_2] + Output:["_col0"] + Filter Operator [FIL_4] + predicate:(UDFToDouble(value) < 10.0) + TableScan [TS_0] + Output:["key","value"] + +PREHOOK: query: select key from src where key < 10 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select key from src where key < 10 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze select key from src where key < 10 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select key from src where key < 10 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-0 + Fetch Operator + limit:-1 + Select Operator [SEL_2] + Output:["_col0"] + Filter Operator [FIL_4] + predicate:(UDFToDouble(key) < 10.0) + TableScan [TS_0] + Output:["key"] + +PREHOOK: query: select count(*) from (select key from src where key < 10)subq +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from (select key from src where key < 10)subq +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +10 +PREHOOK: query: select key, count(key) from src group by key +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select key, count(key) from src group by key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze select key, count(key) from src group by key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select key, count(key) from src group by key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Group By Operator [GBY_4] (rows=205/309 width=95) + Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:_col0 + Group By Operator [GBY_2] (rows=205/309 width=95) + Output:["_col0","_col1"],aggregations:["count(key)"],keys:key + Select Operator [SEL_1] (rows=500/500 width=87) + Output:["key"] + TableScan [TS_0] (rows=500/500 width=87) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select count(*) from (select key, count(key) from src group by key)subq +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from (select key, count(key) from src group by key)subq +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +309 +PREHOOK: query: select count(*) from src a join src b on a.key = b.value where a.key > 0 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from src a join src b on a.key = b.value where a.key > 0 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze select count(*) from src a join src b on a.key = b.value where a.key > 0 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select count(*) from src a join src b on a.key = b.value where a.key > 0 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_14] + Group By Operator [GBY_12] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_11] + Group By Operator [GBY_10] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count()"] + Merge Join Operator [MERGEJOIN_19] (rows=382/0 width=8) + Conds:RS_6._col0=RS_7._col0(Inner) + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=166/497 width=87) + Output:["_col0"] + Filter Operator [FIL_17] (rows=166/497 width=87) + predicate:(UDFToDouble(key) > 0.0) + TableScan [TS_0] (rows=500/500 width=87) + default@src,a,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=166/0 width=91) + Output:["_col0"] + Filter Operator [FIL_18] (rows=166/0 width=91) + predicate:(UDFToDouble(value) > 0.0) + TableScan [TS_3] (rows=500/500 width=91) + default@src,b,Tbl:COMPLETE,Col:COMPLETE,Output:["value"] + +PREHOOK: query: select count(*) from src a join src b on a.key = b.key where a.key > 0 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from src a join src b on a.key = b.key where a.key > 0 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze select count(*) from src a join src b on a.key = b.key where a.key > 0 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select count(*) from src a join src b on a.key = b.key where a.key > 0 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_14] + Group By Operator [GBY_12] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_11] + Group By Operator [GBY_10] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count()"] + Merge Join Operator [MERGEJOIN_19] (rows=399/1019 width=8) + Conds:RS_6._col0=RS_7._col0(Inner) + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=166/497 width=87) + Output:["_col0"] + Filter Operator [FIL_17] (rows=166/497 width=87) + predicate:(UDFToDouble(key) > 0.0) + TableScan [TS_0] (rows=500/500 width=87) + default@src,a,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=166/497 width=87) + Output:["_col0"] + Filter Operator [FIL_18] (rows=166/497 width=87) + predicate:(UDFToDouble(key) > 0.0) + TableScan [TS_3] (rows=500/500 width=87) + default@src,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select count(*) from src a join src b on a.key = b.key where a.key > 0 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from src a join src b on a.key = b.key where a.key > 0 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +1019 +PREHOOK: query: select * from src a union all select * from src b +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select * from src a union all select * from src b +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * from src a union all select * from src b +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * from src a union all select * from src b +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Union 2 (CONTAINS) +Map 3 <- Union 2 (CONTAINS) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Union 2 + <-Map 1 [CONTAINS] + File Output Operator [FS_6] + Select Operator [SEL_1] (rows=500/500 width=178) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=500/500 width=178) + Output:["key","value"] + <-Map 3 [CONTAINS] + File Output Operator [FS_6] + Select Operator [SEL_3] (rows=500/500 width=178) + Output:["_col0","_col1"] + TableScan [TS_2] (rows=500/500 width=178) + Output:["key","value"] + +PREHOOK: query: select count(*) from (select * from src a union all select * from src b)subq +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from (select * from src a union all select * from src b)subq +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +1000 +PREHOOK: query: SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: EXPLAIN analyze +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN analyze +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_10] + Select Operator [SEL_9] (rows=1219/1028 width=178) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_15] (rows=1219/1028 width=178) + Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col0","_col2"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=500/500 width=87) + Output:["_col0"] + Filter Operator [FIL_13] (rows=500/500 width=87) + predicate:key is not null + TableScan [TS_0] (rows=500/500 width=87) + default@src,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_14] (rows=500/500 width=178) + predicate:key is not null + TableScan [TS_3] (rows=500/500 width=178) + default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_1.q.out b/ql/src/test/results/clientpositive/tez/explainanalyze_1.q.out new file mode 100644 index 0000000..314a527 --- /dev/null +++ b/ql/src/test/results/clientpositive/tez/explainanalyze_1.q.out @@ -0,0 +1,7562 @@ +PREHOOK: query: create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@src_orc_merge_test_part +POSTHOOK: query: create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@src_orc_merge_test_part +PREHOOK: query: explain analyze create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc +PREHOOK: type: CREATETABLE +POSTHOOK: query: explain analyze create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc +POSTHOOK: type: CREATETABLE +Stage-0 + Create Table Operator: + name:default.src_orc_merge_test_part + +PREHOOK: query: create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@src_orc_merge_test_part +POSTHOOK: query: create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@src_orc_merge_test_part +PREHOOK: query: alter table src_orc_merge_test_part add partition (ds='2012-01-03', ts='2012-01-03+14:46:31') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Output: default@src_orc_merge_test_part +POSTHOOK: query: alter table src_orc_merge_test_part add partition (ds='2012-01-03', ts='2012-01-03+14:46:31') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Output: default@src_orc_merge_test_part +POSTHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +PREHOOK: query: desc extended src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31') +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@src_orc_merge_test_part +POSTHOOK: query: desc extended src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31') +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@src_orc_merge_test_part +key int +value string +ds string +ts string + +# Partition Information +# col_name data_type comment + +ds string +ts string + +#### A masked pattern was here #### +PREHOOK: query: insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +POSTHOOK: query: insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +PREHOOK: query: explain analyze insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-3 + Stats-Aggr Operator + Stage-0 + Move Operator + table:{"name:":"default.src_orc_merge_test_part"} + Stage-2 + Dependency Collection{} + Stage-1 + Map 1 + File Output Operator [FS_3] + table:{"name:":"default.src_orc_merge_test_part"} + Select Operator [SEL_1] (rows=500/500 width=95) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +POSTHOOK: query: insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +POSTHOOK: Lineage: src_orc_merge_test_part PARTITION(ds=2012-01-03,ts=2012-01-03+14:46:31).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: src_orc_merge_test_part PARTITION(ds=2012-01-03,ts=2012-01-03+14:46:31).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: insert into table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src limit 100 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +POSTHOOK: query: insert into table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src limit 100 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +PREHOOK: query: explain analyze insert into table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze insert into table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src limit 100 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-3 + Stats-Aggr Operator + Stage-0 + Move Operator + table:{"name:":"default.src_orc_merge_test_part"} + Stage-2 + Dependency Collection{} + Stage-1 + Reducer 2 + File Output Operator [FS_7] + table:{"name:":"default.src_orc_merge_test_part"} + Select Operator [SEL_6] (rows=100/100 width=95) + Output:["_col0","_col1"] + Limit [LIM_5] (rows=100/100 width=178) + Number of rows:100 + Select Operator [SEL_4] (rows=100/100 width=178) + Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + Limit [LIM_2] (rows=100/100 width=178) + Number of rows:100 + Select Operator [SEL_1] (rows=500/102 width=178) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=500/103 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +PREHOOK: type: QUERY +PREHOOK: Input: default@src_orc_merge_test_part +#### A masked pattern was here #### +POSTHOOK: query: select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_orc_merge_test_part +#### A masked pattern was here #### +PREHOOK: query: explain analyze select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-0 + Fetch Operator + limit:1 + +PREHOOK: query: select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +PREHOOK: type: QUERY +PREHOOK: Input: default@src_orc_merge_test_part +PREHOOK: Input: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +#### A masked pattern was here #### +POSTHOOK: query: select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_orc_merge_test_part +POSTHOOK: Input: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_8] + Group By Operator [GBY_6] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_5] + Group By Operator [GBY_4] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(_col0)","sum(_col1)"] + Select Operator [SEL_2] (rows=500/500 width=102) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=500/500 width=102) + default@src_orc_merge_test_part,src_orc_merge_test_part,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: alter table src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31') concatenate +PREHOOK: type: ALTER_PARTITION_MERGE +PREHOOK: Input: default@src_orc_merge_test_part +PREHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +POSTHOOK: query: alter table src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31') concatenate +POSTHOOK: type: ALTER_PARTITION_MERGE +POSTHOOK: Input: default@src_orc_merge_test_part +POSTHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +PREHOOK: query: select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +PREHOOK: type: QUERY +PREHOOK: Input: default@src_orc_merge_test_part +PREHOOK: Input: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +#### A masked pattern was here #### +POSTHOOK: query: select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_orc_merge_test_part +POSTHOOK: Input: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_8] + Group By Operator [GBY_6] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_5] + Group By Operator [GBY_4] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(1)"] + Select Operator [SEL_2] (rows=500/500 width=102) + TableScan [TS_0] (rows=500/500 width=102) + default@src_orc_merge_test_part,src_orc_merge_test_part,Tbl:COMPLETE,Col:COMPLETE + +PREHOOK: query: select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +PREHOOK: type: QUERY +PREHOOK: Input: default@src_orc_merge_test_part +PREHOOK: Input: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +#### A masked pattern was here #### +POSTHOOK: query: select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_orc_merge_test_part +POSTHOOK: Input: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31' +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_8] + Group By Operator [GBY_6] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_5] + Group By Operator [GBY_4] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(_col0)","sum(_col1)"] + Select Operator [SEL_2] (rows=500/500 width=102) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=500/500 width=102) + default@src_orc_merge_test_part,src_orc_merge_test_part,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: drop table src_orc_merge_test_part +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@src_orc_merge_test_part +PREHOOK: Output: default@src_orc_merge_test_part +POSTHOOK: query: drop table src_orc_merge_test_part +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@src_orc_merge_test_part +POSTHOOK: Output: default@src_orc_merge_test_part +Warning: Map Join MAPJOIN[20][bigTable=?] in task 'Map 1' is a cross product +PREHOOK: query: select sum(hash(a.k1,a.v1,a.k2, a.v2)) +from ( +select src1.key as k1, src1.value as v1, + src2.key as k2, src2.value as v2 FROM + (select * FROM src WHERE src.key < 10) src1 + JOIN + (select * FROM src WHERE src.key < 10) src2 + SORT BY k1, v1, k2, v2 +) a +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select sum(hash(a.k1,a.v1,a.k2, a.v2)) +from ( +select src1.key as k1, src1.value as v1, + src2.key as k2, src2.value as v2 FROM + (select * FROM src WHERE src.key < 10) src1 + JOIN + (select * FROM src WHERE src.key < 10) src2 + SORT BY k1, v1, k2, v2 +) a +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +Warning: Map Join MAPJOIN[20][bigTable=?] in task 'Map 1' is a cross product +PREHOOK: query: explain analyze select sum(hash(a.k1,a.v1,a.k2, a.v2)) +from ( +select src1.key as k1, src1.value as v1, + src2.key as k2, src2.value as v2 FROM + (select * FROM src WHERE src.key < 10) src1 + JOIN + (select * FROM src WHERE src.key < 10) src2 + SORT BY k1, v1, k2, v2 +) a +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select sum(hash(a.k1,a.v1,a.k2, a.v2)) +from ( +select src1.key as k1, src1.value as v1, + src2.key as k2, src2.value as v2 FROM + (select * FROM src WHERE src.key < 10) src1 + JOIN + (select * FROM src WHERE src.key < 10) src2 + SORT BY k1, v1, k2, v2 +) a +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Map 4 (BROADCAST_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_17] + Group By Operator [GBY_15] (rows=1/1 width=8) + Output:["_col0"],aggregations:["sum(VALUE._col0)"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_14] + Group By Operator [GBY_13] (rows=1/1 width=8) + Output:["_col0"],aggregations:["sum(hash(_col0,_col1,_col2,_col3))"] + Select Operator [SEL_11] (rows=27556/100 width=356) + Output:["_col0","_col1","_col2","_col3"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_10] + Map Join Operator [MAPJOIN_20] (rows=27556/100 width=356) + Conds:(Inner),Output:["_col0","_col1","_col2","_col3"] + <-Map 4 [BROADCAST_EDGE] + BROADCAST [RS_7] + Select Operator [SEL_5] (rows=166/10 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_19] (rows=166/10 width=178) + predicate:(key < 10) + TableScan [TS_3] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Select Operator [SEL_2] (rows=166/10 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_18] (rows=166/10 width=178) + predicate:(key < 10) + TableScan [TS_0] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_7] + Select Operator [SEL_5] (rows=10/5 width=21) + Output:["_col0","_col1","_col2"] + Group By Operator [GBY_4] (rows=10/5 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_2] (rows=20/5 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Select Operator [SEL_1] (rows=20/20 width=21) + Output:["key","c_int","c_float"] + TableScan [TS_0] (rows=20/20 width=21) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:NONE,Output:["key","c_int","c_float"] + +PREHOOK: query: select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_12] + Select Operator [SEL_11] (rows=5/3 width=21) + Output:["_col0","_col1","_col2"] + Group By Operator [GBY_10] (rows=5/3 width=21) + Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1 + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0, _col1 + Group By Operator [GBY_8] (rows=10/3 width=21) + Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col0, _col1 + Select Operator [SEL_5] (rows=10/5 width=21) + Output:["_col0","_col1"] + Group By Operator [GBY_4] (rows=10/5 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_2] (rows=20/5 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Select Operator [SEL_1] (rows=20/20 width=21) + Output:["key","c_int","c_float"] + TableScan [TS_0] (rows=20/20 width=21) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:NONE,Output:["key","c_int","c_float"] + +PREHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 10 <- Reducer 9 (SIMPLE_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE) +Reducer 5 <- Map 11 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE) +Reducer 6 <- Reducer 5 (SIMPLE_EDGE) +Reducer 7 <- Reducer 6 (SIMPLE_EDGE) +Reducer 9 <- Map 8 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 7 + File Output Operator [FS_42] + Select Operator [SEL_41] (rows=6/2 width=87) + Output:["_col0","_col1","_col2"] + <-Reducer 6 [SIMPLE_EDGE] + SHUFFLE [RS_40] + Select Operator [SEL_38] (rows=6/2 width=87) + Output:["_col0","_col1","_col2"] + Group By Operator [GBY_37] (rows=6/2 width=87) + Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1 + <-Reducer 5 [SIMPLE_EDGE] + SHUFFLE [RS_36] + PartitionCols:_col0, _col1 + Group By Operator [GBY_35] (rows=12/2 width=87) + Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col2, _col6 + Select Operator [SEL_34] (rows=12/12 width=87) + Output:["_col2","_col6"] + Filter Operator [FIL_33] (rows=12/12 width=87) + predicate:((_col1 > 0) or (_col6 >= 0)) + Merge Join Operator [MERGEJOIN_52] (rows=19/12 width=87) + Conds:RS_30._col0=RS_31._col0(Inner),Output:["_col1","_col2","_col6"] + <-Map 11 [SIMPLE_EDGE] + SHUFFLE [RS_31] + PartitionCols:_col0 + Select Operator [SEL_29] (rows=18/18 width=84) + Output:["_col0","_col1"] + Filter Operator [FIL_50] (rows=18/18 width=84) + predicate:key is not null + TableScan [TS_27] (rows=20/20 width=84) + default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_30] + PartitionCols:_col0 + Select Operator [SEL_26] (rows=1/4 width=23) + Output:["_col0","_col1","_col2"] + Filter Operator [FIL_25] (rows=1/4 width=23) + predicate:((_col1 + _col4) >= 0) + Merge Join Operator [MERGEJOIN_51] (rows=2/4 width=23) + Conds:RS_22._col0=RS_23._col0(Inner),Output:["_col0","_col1","_col2","_col4"] + <-Reducer 10 [SIMPLE_EDGE] + SHUFFLE [RS_23] + PartitionCols:_col0 + Select Operator [SEL_20] (rows=2/5 width=21) + Output:["_col0","_col1"] + <-Reducer 9 [SIMPLE_EDGE] + SHUFFLE [RS_19] + Select Operator [SEL_17] (rows=2/5 width=21) + Output:["_col0","_col1","_col2","_col3"] + Group By Operator [GBY_16] (rows=2/5 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 8 [SIMPLE_EDGE] + SHUFFLE [RS_15] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_14] (rows=4/5 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Filter Operator [FIL_49] (rows=4/18 width=21) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and key is not null) + TableScan [TS_11] (rows=20/20 width=21) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:NONE,Output:["key","c_int","c_float"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_22] + PartitionCols:_col0 + Select Operator [SEL_9] (rows=2/4 width=21) + Output:["_col0","_col1","_col2"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_8] + Select Operator [SEL_6] (rows=2/4 width=21) + Output:["_col0","_col1","_col2"] + Group By Operator [GBY_5] (rows=2/4 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_3] (rows=4/4 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Filter Operator [FIL_48] (rows=4/18 width=21) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and key is not null) + TableScan [TS_0] (rows=20/20 width=21) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:NONE,Output:["key","c_int","c_float"] + +PREHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b % c asc, b desc) cbo_t1 left outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int % c asc, cbo_t3.c_int desc +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b % c asc, b desc) cbo_t1 left outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int % c asc, cbo_t3.c_int desc +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b % c asc, b desc) cbo_t1 left outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int % c asc, cbo_t3.c_int desc +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b % c asc, b desc) cbo_t1 left outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int % c asc, cbo_t3.c_int desc +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) +Reducer 5 <- Map 10 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE) +Reducer 6 <- Reducer 5 (SIMPLE_EDGE) +Reducer 7 <- Reducer 6 (SIMPLE_EDGE) +Reducer 9 <- Map 8 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 7 + File Output Operator [FS_39] + Select Operator [SEL_38] (rows=1/2 width=87) + Output:["_col0","_col1","_col2"] + <-Reducer 6 [SIMPLE_EDGE] + SHUFFLE [RS_37] + Group By Operator [GBY_34] (rows=1/2 width=87) + Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1 + <-Reducer 5 [SIMPLE_EDGE] + SHUFFLE [RS_33] + PartitionCols:_col0, _col1 + Group By Operator [GBY_32] (rows=2/2 width=87) + Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col6, _col2 + Select Operator [SEL_31] (rows=2/12 width=87) + Output:["_col6","_col2"] + Filter Operator [FIL_30] (rows=2/12 width=87) + predicate:(((_col1 > 0) or (_col6 >= 0)) and ((_col6 >= 1) or (_col2 >= 1)) and ((UDFToLong(_col6) + _col2) >= 0)) + Merge Join Operator [MERGEJOIN_48] (rows=19/12 width=87) + Conds:RS_27._col0=RS_28._col0(Inner),Output:["_col1","_col2","_col6"] + <-Map 10 [SIMPLE_EDGE] + SHUFFLE [RS_28] + PartitionCols:_col0 + Select Operator [SEL_26] (rows=18/18 width=84) + Output:["_col0","_col1"] + Filter Operator [FIL_46] (rows=18/18 width=84) + predicate:((c_int > 0) and key is not null) + TableScan [TS_24] (rows=20/20 width=84) + default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_27] + PartitionCols:_col0 + Select Operator [SEL_23] (rows=1/4 width=23) + Output:["_col0","_col1","_col2"] + Filter Operator [FIL_22] (rows=1/4 width=23) + predicate:((_col1 + _col4) >= 0) + Merge Join Operator [MERGEJOIN_47] (rows=1/4 width=23) + Conds:RS_19._col0=RS_20._col0(Left Outer),Output:["_col0","_col1","_col2","_col4"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_19] + PartitionCols:_col0 + Select Operator [SEL_9] (rows=1/4 width=21) + Output:["_col0","_col1","_col2"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_8] + Select Operator [SEL_6] (rows=1/4 width=21) + Output:["_col0","_col1","_col2","_col3"] + Group By Operator [GBY_5] (rows=1/4 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_3] (rows=1/4 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Filter Operator [FIL_44] (rows=1/18 width=21) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and (c_float > 0) and ((c_int >= 1) or (c_float >= 1)) and ((UDFToFloat(c_int) + c_float) >= 0.0) and key is not null) + TableScan [TS_0] (rows=20/20 width=21) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:NONE,Output:["key","c_int","c_float"] + <-Reducer 9 [SIMPLE_EDGE] + SHUFFLE [RS_20] + PartitionCols:_col0 + Select Operator [SEL_17] (rows=1/5 width=21) + Output:["_col0","_col1"] + Group By Operator [GBY_16] (rows=1/5 width=21) + Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 8 [SIMPLE_EDGE] + SHUFFLE [RS_15] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_14] (rows=1/5 width=21) + Output:["_col0","_col1","_col2"],keys:key, c_int, c_float + Filter Operator [FIL_45] (rows=1/18 width=21) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and (c_float > 0) and ((c_int >= 1) or (c_float >= 1)) and ((UDFToFloat(c_int) + c_float) >= 0.0) and key is not null) + TableScan [TS_11] (rows=20/20 width=21) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:NONE,Output:["key","c_int","c_float"] + +PREHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b+c, a desc) cbo_t1 right outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 2) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b+c, a desc) cbo_t1 right outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 2) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b+c, a desc) cbo_t1 right outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 2) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b+c, a desc) cbo_t1 right outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 2) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Map 8 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) +Reducer 7 <- Map 6 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 5 + File Output Operator [FS_31] + Select Operator [SEL_30] (rows=4/2 width=84) + Output:["_col0","_col1","_col2"] + Group By Operator [GBY_29] (rows=4/2 width=84) + Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1 + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_28] + PartitionCols:_col0, _col1 + Group By Operator [GBY_27] (rows=8/2 width=84) + Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col2, _col6 + Select Operator [SEL_26] (rows=8/12 width=84) + Output:["_col2","_col6"] + Filter Operator [FIL_25] (rows=8/12 width=84) + predicate:(((_col1 + _col4) >= 2) and ((_col1 > 0) or (_col6 >= 0))) + Merge Join Operator [MERGEJOIN_36] (rows=44/20 width=84) + Conds:RS_21._col0=RS_22._col0(Right Outer),RS_21._col0=RS_23._col0(Right Outer),Output:["_col1","_col2","_col4","_col6"] + <-Map 8 [SIMPLE_EDGE] + SHUFFLE [RS_23] + PartitionCols:_col0 + Select Operator [SEL_20] (rows=20/20 width=84) + Output:["_col0","_col1"] + TableScan [TS_19] (rows=20/20 width=84) + default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_21] + PartitionCols:_col0 + Select Operator [SEL_9] (rows=1/4 width=21) + Output:["_col0","_col1","_col2"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_8] + Select Operator [SEL_6] (rows=1/4 width=21) + Output:["_col0","_col1","_col2","_col3"] + Group By Operator [GBY_5] (rows=1/4 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_3] (rows=1/4 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Filter Operator [FIL_34] (rows=1/18 width=21) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and (c_float > 0) and ((c_int >= 1) or (c_float >= 1)) and ((UDFToFloat(c_int) + c_float) >= 0.0)) + TableScan [TS_0] (rows=20/20 width=21) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:NONE,Output:["key","c_int","c_float"] + <-Reducer 7 [SIMPLE_EDGE] + SHUFFLE [RS_22] + PartitionCols:_col0 + Select Operator [SEL_17] (rows=1/5 width=21) + Output:["_col0","_col1"] + Group By Operator [GBY_16] (rows=1/5 width=21) + Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 6 [SIMPLE_EDGE] + SHUFFLE [RS_15] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_14] (rows=1/5 width=21) + Output:["_col0","_col1","_col2"],keys:key, c_int, c_float + Filter Operator [FIL_35] (rows=1/18 width=21) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and (c_float > 0) and ((c_int >= 1) or (c_float >= 1)) and ((UDFToFloat(c_int) + c_float) >= 0.0)) + TableScan [TS_11] (rows=20/20 width=21) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:NONE,Output:["key","c_int","c_float"] + +PREHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by c+a desc) cbo_t1 full outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by p+q desc, r asc) cbo_t2 on cbo_t1.a=p full outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by c+a desc) cbo_t1 full outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by p+q desc, r asc) cbo_t2 on cbo_t1.a=p full outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by c+a desc) cbo_t1 full outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by p+q desc, r asc) cbo_t2 on cbo_t1.a=p full outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by c+a desc) cbo_t1 full outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by p+q desc, r asc) cbo_t2 on cbo_t1.a=p full outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) +Reducer 6 <- Reducer 5 (SIMPLE_EDGE) +Reducer 8 <- Map 7 (SIMPLE_EDGE) +Reducer 9 <- Reducer 8 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 6 + File Output Operator [FS_37] + Select Operator [SEL_36] (rows=1/2 width=84) + Output:["_col0","_col1","_col2"] + <-Reducer 5 [SIMPLE_EDGE] + SHUFFLE [RS_35] + Group By Operator [GBY_33] (rows=1/2 width=84) + Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1 + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_32] + PartitionCols:_col0, _col1 + Group By Operator [GBY_31] (rows=1/2 width=84) + Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col6, _col2 + Select Operator [SEL_30] (rows=1/12 width=84) + Output:["_col6","_col2"] + Filter Operator [FIL_29] (rows=1/12 width=84) + predicate:(((_col1 + _col4) >= 0) and ((_col1 > 0) or (_col6 >= 0)) and ((_col6 >= 1) or (_col2 >= 1)) and ((UDFToLong(_col6) + _col2) >= 0)) + Merge Join Operator [MERGEJOIN_42] (rows=44/18 width=84) + Conds:RS_25._col0=RS_26._col0(Outer),RS_25._col0=RS_27._col0(Right Outer),Output:["_col1","_col2","_col4","_col6"] + <-Map 10 [SIMPLE_EDGE] + SHUFFLE [RS_27] + PartitionCols:_col0 + Select Operator [SEL_24] (rows=20/18 width=84) + Output:["_col0","_col1"] + Filter Operator [FIL_41] (rows=20/18 width=84) + predicate:(c_int > 0) + TableScan [TS_22] (rows=20/20 width=84) + default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_25] + PartitionCols:_col0 + Select Operator [SEL_9] (rows=1/4 width=21) + Output:["_col0","_col1","_col2"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_8] + Select Operator [SEL_6] (rows=1/4 width=21) + Output:["_col0","_col1","_col2","_col3"] + Group By Operator [GBY_5] (rows=1/4 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_3] (rows=1/4 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Filter Operator [FIL_39] (rows=1/18 width=21) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and (c_float > 0) and ((c_int >= 1) or (c_float >= 1)) and ((UDFToFloat(c_int) + c_float) >= 0.0)) + TableScan [TS_0] (rows=20/20 width=21) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:NONE,Output:["key","c_int","c_float"] + <-Reducer 9 [SIMPLE_EDGE] + SHUFFLE [RS_26] + PartitionCols:_col0 + Select Operator [SEL_20] (rows=1/5 width=21) + Output:["_col0","_col1"] + <-Reducer 8 [SIMPLE_EDGE] + SHUFFLE [RS_19] + Select Operator [SEL_17] (rows=1/5 width=21) + Output:["_col0","_col1","_col2","_col3"] + Group By Operator [GBY_16] (rows=1/5 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 7 [SIMPLE_EDGE] + SHUFFLE [RS_15] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_14] (rows=1/5 width=21) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Filter Operator [FIL_40] (rows=1/18 width=21) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and (c_float > 0) and ((c_int >= 1) or (c_float >= 1)) and ((UDFToFloat(c_int) + c_float) >= 0.0)) + TableScan [TS_11] (rows=20/20 width=21) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:NONE,Output:["key","c_int","c_float"] + +PREHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) +Reducer 4 <- Map 8 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) +Reducer 7 <- Map 6 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 5 + File Output Operator [FS_33] + Select Operator [SEL_32] (rows=1/2 width=20) + Output:["_col0","_col1","_col2"] + Group By Operator [GBY_31] (rows=1/2 width=20) + Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1 + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_30] + PartitionCols:_col0, _col1 + Group By Operator [GBY_29] (rows=1/2 width=20) + Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col2, _col6 + Select Operator [SEL_28] (rows=3/12 width=16) + Output:["_col2","_col6"] + Filter Operator [FIL_27] (rows=3/12 width=16) + predicate:((_col1 > 0) or (_col6 >= 0)) + Merge Join Operator [MERGEJOIN_43] (rows=3/12 width=16) + Conds:RS_24._col0=RS_25._col0(Inner),Output:["_col1","_col2","_col6"] + <-Map 8 [SIMPLE_EDGE] + SHUFFLE [RS_25] + PartitionCols:_col0 + Select Operator [SEL_23] (rows=18/18 width=84) + Output:["_col0","_col1"] + Filter Operator [FIL_41] (rows=18/18 width=84) + predicate:key is not null + TableScan [TS_21] (rows=20/20 width=84) + default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_24] + PartitionCols:_col0 + Select Operator [SEL_20] (rows=1/4 width=101) + Output:["_col0","_col1","_col2"] + Filter Operator [FIL_19] (rows=1/4 width=101) + predicate:((_col1 + _col4) >= 0) + Merge Join Operator [MERGEJOIN_42] (rows=1/4 width=101) + Conds:RS_16._col0=RS_17._col0(Inner),Output:["_col0","_col1","_col2","_col4"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_16] + PartitionCols:_col0 + Select Operator [SEL_6] (rows=1/4 width=97) + Output:["_col0","_col1","_col2"] + Group By Operator [GBY_5] (rows=1/4 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_3] (rows=1/4 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Filter Operator [FIL_39] (rows=1/18 width=93) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and (c_float > 0) and ((c_int >= 1) or (c_float >= 1)) and ((UDFToFloat(c_int) + c_float) >= 0.0) and key is not null) + TableScan [TS_0] (rows=20/20 width=88) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + <-Reducer 7 [SIMPLE_EDGE] + SHUFFLE [RS_17] + PartitionCols:_col0 + Select Operator [SEL_14] (rows=1/5 width=89) + Output:["_col0","_col1"] + Group By Operator [GBY_13] (rows=1/5 width=93) + Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 6 [SIMPLE_EDGE] + SHUFFLE [RS_12] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_11] (rows=1/5 width=93) + Output:["_col0","_col1","_col2"],keys:key, c_int, c_float + Filter Operator [FIL_40] (rows=1/18 width=93) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and (c_float > 0) and ((c_int >= 1) or (c_float >= 1)) and ((UDFToFloat(c_int) + c_float) >= 0.0) and key is not null) + TableScan [TS_8] (rows=20/20 width=88) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + +PREHOOK: query: select unionsrc.key FROM (select 'tst1' as key, count(1) as value from src) unionsrc +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select unionsrc.key FROM (select 'tst1' as key, count(1) as value from src) unionsrc +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze select unionsrc.key FROM (select 'tst1' as key, count(1) as value from src) unionsrc +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select unionsrc.key FROM (select 'tst1' as key, count(1) as value from src) unionsrc +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-0 + Fetch Operator + limit:1 + +PREHOOK: query: select unionsrc.key FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1 + UNION ALL + select 'min' as key, min(c_int) as value from cbo_t3 s2 + UNION ALL + select 'avg' as key, avg(c_int) as value from cbo_t3 s3) unionsrc order by unionsrc.key +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select unionsrc.key FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1 + UNION ALL + select 'min' as key, min(c_int) as value from cbo_t3 s2 + UNION ALL + select 'avg' as key, avg(c_int) as value from cbo_t3 s3) unionsrc order by unionsrc.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select unionsrc.key FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1 + UNION ALL + select 'min' as key, min(c_int) as value from cbo_t3 s2 + UNION ALL + select 'avg' as key, avg(c_int) as value from cbo_t3 s3) unionsrc order by unionsrc.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select unionsrc.key FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1 + UNION ALL + select 'min' as key, min(c_int) as value from cbo_t3 s2 + UNION ALL + select 'avg' as key, avg(c_int) as value from cbo_t3 s3) unionsrc order by unionsrc.key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Union 3 (CONTAINS) +Reducer 4 <- Union 3 (SIMPLE_EDGE) +Reducer 6 <- Map 5 (SIMPLE_EDGE), Union 3 (CONTAINS) +Reducer 8 <- Map 7 (SIMPLE_EDGE), Union 3 (CONTAINS) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_26] + Select Operator [SEL_25] (rows=3/3 width=87) + Output:["_col0"] + <-Union 3 [SIMPLE_EDGE] + <-Reducer 2 [CONTAINS] + Reduce Output Operator [RS_24] + Select Operator [SEL_5] (rows=1/1 width=87) + Output:["_col0"] + Group By Operator [GBY_4] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + Group By Operator [GBY_2] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(key)"] + Select Operator [SEL_1] (rows=20/20 width=80) + Output:["key"] + TableScan [TS_0] (rows=20/20 width=80) + default@cbo_t3,s1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Reducer 6 [CONTAINS] + Reduce Output Operator [RS_24] + Select Operator [SEL_12] (rows=1/1 width=87) + Output:["_col0"] + Group By Operator [GBY_11] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Map 5 [SIMPLE_EDGE] + SHUFFLE [RS_10] + Group By Operator [GBY_9] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(key)"] + Select Operator [SEL_8] (rows=20/20 width=80) + Output:["key"] + TableScan [TS_7] (rows=20/20 width=80) + default@cbo_t3,s2,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Reducer 8 [CONTAINS] + Reduce Output Operator [RS_24] + Select Operator [SEL_21] (rows=1/1 width=87) + Output:["_col0"] + Group By Operator [GBY_20] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Map 7 [SIMPLE_EDGE] + SHUFFLE [RS_19] + Group By Operator [GBY_18] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(key)"] + Select Operator [SEL_17] (rows=20/20 width=80) + Output:["key"] + TableScan [TS_16] (rows=20/20 width=80) + default@cbo_t3,s3,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select unionsrc.key, count(1) FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1 + UNION ALL + select 'min' as key, min(c_int) as value from cbo_t3 s2 + UNION ALL + select 'avg' as key, avg(c_int) as value from cbo_t3 s3) unionsrc group by unionsrc.key order by unionsrc.key +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select unionsrc.key, count(1) FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1 + UNION ALL + select 'min' as key, min(c_int) as value from cbo_t3 s2 + UNION ALL + select 'avg' as key, avg(c_int) as value from cbo_t3 s3) unionsrc group by unionsrc.key order by unionsrc.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select unionsrc.key, count(1) FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1 + UNION ALL + select 'min' as key, min(c_int) as value from cbo_t3 s2 + UNION ALL + select 'avg' as key, avg(c_int) as value from cbo_t3 s3) unionsrc group by unionsrc.key order by unionsrc.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select unionsrc.key, count(1) FROM (select 'max' as key, max(c_int) as value from cbo_t3 s1 + UNION ALL + select 'min' as key, min(c_int) as value from cbo_t3 s2 + UNION ALL + select 'avg' as key, avg(c_int) as value from cbo_t3 s3) unionsrc group by unionsrc.key order by unionsrc.key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Union 3 (CONTAINS) +Reducer 4 <- Union 3 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) +Reducer 7 <- Map 6 (SIMPLE_EDGE), Union 3 (CONTAINS) +Reducer 9 <- Map 8 (SIMPLE_EDGE), Union 3 (CONTAINS) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 5 + File Output Operator [FS_31] + Select Operator [SEL_30] (rows=1/3 width=95) + Output:["_col0","_col1"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_29] + Group By Operator [GBY_27] (rows=1/3 width=95) + Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0 + <-Union 3 [SIMPLE_EDGE] + <-Reducer 2 [CONTAINS] + Reduce Output Operator [RS_26] + PartitionCols:_col0 + Group By Operator [GBY_25] (rows=1/3 width=95) + Output:["_col0","_col1"],aggregations:["count(1)"],keys:_col0 + Select Operator [SEL_5] (rows=1/1 width=87) + Output:["_col0"] + Group By Operator [GBY_4] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + Group By Operator [GBY_2] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(key)"] + Select Operator [SEL_1] (rows=20/20 width=80) + Output:["key"] + TableScan [TS_0] (rows=20/20 width=80) + default@cbo_t3,s1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Reducer 7 [CONTAINS] + Reduce Output Operator [RS_26] + PartitionCols:_col0 + Group By Operator [GBY_25] (rows=1/3 width=95) + Output:["_col0","_col1"],aggregations:["count(1)"],keys:_col0 + Select Operator [SEL_12] (rows=1/1 width=87) + Output:["_col0"] + Group By Operator [GBY_11] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Map 6 [SIMPLE_EDGE] + SHUFFLE [RS_10] + Group By Operator [GBY_9] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(key)"] + Select Operator [SEL_8] (rows=20/20 width=80) + Output:["key"] + TableScan [TS_7] (rows=20/20 width=80) + default@cbo_t3,s2,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Reducer 9 [CONTAINS] + Reduce Output Operator [RS_26] + PartitionCols:_col0 + Group By Operator [GBY_25] (rows=1/3 width=95) + Output:["_col0","_col1"],aggregations:["count(1)"],keys:_col0 + Select Operator [SEL_21] (rows=1/1 width=87) + Output:["_col0"] + Group By Operator [GBY_20] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Map 8 [SIMPLE_EDGE] + SHUFFLE [RS_19] + Group By Operator [GBY_18] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(key)"] + Select Operator [SEL_17] (rows=20/20 width=80) + Output:["key"] + TableScan [TS_16] (rows=20/20 width=80) + default@cbo_t3,s3,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select cbo_t1.key from cbo_t1 join cbo_t3 where cbo_t1.key=cbo_t3.key and cbo_t1.key >= 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select cbo_t1.key from cbo_t1 join cbo_t3 where cbo_t1.key=cbo_t3.key and cbo_t1.key >= 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select cbo_t1.key from cbo_t1 join cbo_t3 where cbo_t1.key=cbo_t3.key and cbo_t1.key >= 1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select cbo_t1.key from cbo_t1 join cbo_t3 where cbo_t1.key=cbo_t3.key and cbo_t1.key >= 1 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_10] + Merge Join Operator [MERGEJOIN_15] (rows=18/84 width=85) + Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col0"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=6/18 width=85) + Output:["_col0"] + Filter Operator [FIL_13] (rows=6/18 width=85) + predicate:(UDFToDouble(key) >= 1.0) + TableScan [TS_0] (rows=20/20 width=80) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=6/18 width=85) + Output:["_col0"] + Filter Operator [FIL_14] (rows=6/18 width=85) + predicate:(UDFToDouble(key) >= 1.0) + TableScan [TS_3] (rows=20/20 width=80) + default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 left outer join cbo_t2 on cbo_t1.key=cbo_t2.key +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 left outer join cbo_t2 on cbo_t1.key=cbo_t2.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 left outer join cbo_t2 on cbo_t1.key=cbo_t2.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 left outer join cbo_t2 on cbo_t1.key=cbo_t2.key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_8] + Select Operator [SEL_7] (rows=100/98 width=8) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_11] (rows=100/98 width=8) + Conds:RS_4._col0=RS_5._col0(Left Outer),Output:["_col1","_col3"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col0 + Select Operator [SEL_1] (rows=20/20 width=84) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=20/20 width=84) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_5] + PartitionCols:_col0 + Select Operator [SEL_3] (rows=20/20 width=84) + Output:["_col0","_col1"] + TableScan [TS_2] (rows=20/20 width=84) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + +PREHOOK: query: select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 full outer join cbo_t2 on cbo_t1.key=cbo_t2.key +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 full outer join cbo_t2 on cbo_t1.key=cbo_t2.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 full outer join cbo_t2 on cbo_t1.key=cbo_t2.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select cbo_t1.c_int, cbo_t2.c_int from cbo_t1 full outer join cbo_t2 on cbo_t1.key=cbo_t2.key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_8] + Select Operator [SEL_7] (rows=100/105 width=8) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_9] (rows=100/105 width=8) + Conds:RS_4._col0=RS_5._col0(Outer),Output:["_col1","_col3"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col0 + Select Operator [SEL_1] (rows=20/20 width=84) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=20/20 width=84) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_5] + PartitionCols:_col0 + Select Operator [SEL_3] (rows=20/20 width=84) + Output:["_col0","_col1"] + TableScan [TS_2] (rows=20/20 width=84) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + +PREHOOK: query: select b, cbo_t1.c, cbo_t2.p, q, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1) cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select b, cbo_t1.c, cbo_t2.p, q, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1) cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select b, cbo_t1.c, cbo_t2.p, q, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1) cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select b, cbo_t1.c, cbo_t2.p, q, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1) cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_14] + Select Operator [SEL_13] (rows=291/528 width=101) + Output:["_col0","_col1","_col2","_col3","_col4"] + Merge Join Operator [MERGEJOIN_24] (rows=291/528 width=101) + Conds:RS_9._col0=RS_10._col0(Inner),RS_9._col0=RS_11._col0(Inner),Output:["_col1","_col2","_col4","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=18/18 width=87) + Output:["_col0","_col1","_col2"] + Filter Operator [FIL_21] (rows=18/18 width=87) + predicate:key is not null + TableScan [TS_0] (rows=20/20 width=88) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_10] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=18/18 width=84) + Output:["_col0","_col1"] + Filter Operator [FIL_22] (rows=18/18 width=84) + predicate:key is not null + TableScan [TS_3] (rows=20/20 width=84) + default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_11] + PartitionCols:_col0 + Select Operator [SEL_8] (rows=18/18 width=84) + Output:["_col0","_col1"] + Filter Operator [FIL_23] (rows=18/18 width=84) + predicate:key is not null + TableScan [TS_6] (rows=20/20 width=84) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + +PREHOOK: query: select key, cbo_t1.c_int, cbo_t2.p, q from cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.key=p join (select key as a, c_int as b, cbo_t3.c_float as c from cbo_t3)cbo_t3 on cbo_t1.key=a +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select key, cbo_t1.c_int, cbo_t2.p, q from cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.key=p join (select key as a, c_int as b, cbo_t3.c_float as c from cbo_t3)cbo_t3 on cbo_t1.key=a +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select key, cbo_t1.c_int, cbo_t2.p, q from cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.key=p join (select key as a, c_int as b, cbo_t3.c_float as c from cbo_t3)cbo_t3 on cbo_t1.key=a +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select key, cbo_t1.c_int, cbo_t2.p, q from cbo_t1 join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2) cbo_t2 on cbo_t1.key=p join (select key as a, c_int as b, cbo_t3.c_float as c from cbo_t3)cbo_t3 on cbo_t1.key=a +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_14] + Select Operator [SEL_13] (rows=291/528 width=178) + Output:["_col0","_col1","_col2","_col3"] + Merge Join Operator [MERGEJOIN_24] (rows=291/528 width=178) + Conds:RS_9._col0=RS_10._col0(Inner),RS_9._col0=RS_11._col0(Inner),Output:["_col0","_col1","_col3","_col4"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=18/18 width=84) + Output:["_col0","_col1"] + Filter Operator [FIL_21] (rows=18/18 width=84) + predicate:key is not null + TableScan [TS_0] (rows=20/20 width=84) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_10] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=18/18 width=80) + Output:["_col0"] + Filter Operator [FIL_22] (rows=18/18 width=80) + predicate:key is not null + TableScan [TS_3] (rows=20/20 width=80) + default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_11] + PartitionCols:_col0 + Select Operator [SEL_8] (rows=18/18 width=84) + Output:["_col0","_col1"] + Filter Operator [FIL_23] (rows=18/18 width=84) + predicate:key is not null + TableScan [TS_6] (rows=20/20 width=84) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + +PREHOOK: query: select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 full outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where (q + 1 = 2) and (R.b > 0 or c_int >= 0) +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 full outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where (q + 1 = 2) and (R.b > 0 or c_int >= 0) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 full outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where (q + 1 = 2) and (R.b > 0 or c_int >= 0) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 full outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where (q + 1 = 2) and (R.b > 0 or c_int >= 0) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) +Reducer 3 <- Map 5 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_19] + Select Operator [SEL_18] (rows=36/528 width=101) + Output:["_col0","_col1","_col2","_col3","_col4"] + Filter Operator [FIL_17] (rows=36/528 width=101) + predicate:((_col1 > 0) or (_col6 >= 0)) + Merge Join Operator [MERGEJOIN_28] (rows=36/528 width=101) + Conds:RS_14._col0=RS_15._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6"] + <-Map 5 [SIMPLE_EDGE] + SHUFFLE [RS_15] + PartitionCols:_col0 + Select Operator [SEL_13] (rows=18/18 width=84) + Output:["_col0","_col1"] + Filter Operator [FIL_26] (rows=18/18 width=84) + predicate:key is not null + TableScan [TS_11] (rows=20/20 width=84) + default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_14] + PartitionCols:_col0 + Filter Operator [FIL_9] (rows=10/96 width=182) + predicate:(((_col1 + _col4) = 2) and ((_col4 + 1) = 2)) + Merge Join Operator [MERGEJOIN_27] (rows=40/96 width=182) + Conds:RS_6._col0=RS_7._col0(Left Outer),Output:["_col0","_col1","_col2","_col3","_col4"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=9/18 width=93) + Output:["_col0","_col1","_col2"] + Filter Operator [FIL_24] (rows=9/18 width=93) + predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0)) and key is not null) + TableScan [TS_0] (rows=20/20 width=88) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=9/13 width=89) + Output:["_col0","_col1"] + Filter Operator [FIL_25] (rows=9/13 width=93) + predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0)) and key is not null) + TableScan [TS_3] (rows=20/20 width=88) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + +PREHOOK: query: select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 right outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where (q + 1 = 2) and (R.b > 0 or c_int >= 0) +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 right outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where (q + 1 = 2) and (R.b > 0 or c_int >= 0) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 right outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where (q + 1 = 2) and (R.b > 0 or c_int >= 0) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * from (select q, b, cbo_t2.p, cbo_t1.c, cbo_t3.c_int from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 right outer join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q == 2) and (b > 0 or c_int >= 0)) R where (q + 1 = 2) and (R.b > 0 or c_int >= 0) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_14] + Select Operator [SEL_13] (rows=50/528 width=101) + Output:["_col0","_col1","_col2","_col3","_col4"] + Filter Operator [FIL_12] (rows=50/528 width=101) + predicate:(((_col1 + _col4) = 2) and ((_col1 > 0) or (_col6 >= 0)) and ((_col4 + 1) = 2)) + Merge Join Operator [MERGEJOIN_19] (rows=200/536 width=101) + Conds:RS_8._col0=RS_9._col0(Right Outer),RS_8._col0=RS_10._col0(Right Outer),Output:["_col1","_col2","_col3","_col4","_col6"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=10/18 width=93) + Output:["_col0","_col1","_col2"] + Filter Operator [FIL_17] (rows=10/18 width=93) + predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0))) + TableScan [TS_0] (rows=20/20 width=88) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=10/13 width=89) + Output:["_col0","_col1"] + Filter Operator [FIL_18] (rows=10/13 width=93) + predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0))) + TableScan [TS_3] (rows=20/20 width=88) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_10] + PartitionCols:_col0 + Select Operator [SEL_7] (rows=20/20 width=84) + Output:["_col0","_col1"] + TableScan [TS_6] (rows=20/20 width=84) + default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + +PREHOOK: query: select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:1 + Stage-1 + Reducer 3 + File Output Operator [FS_10] + Limit [LIM_9] (rows=1/1 width=97) + Number of rows:1 + Select Operator [SEL_8] (rows=10/1 width=97) + Output:["_col0","_col1","_col2"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_7] + Select Operator [SEL_5] (rows=10/5 width=97) + Output:["_col0","_col1","_col2"] + Group By Operator [GBY_4] (rows=10/5 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_2] (rows=10/5 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Select Operator [SEL_1] (rows=20/20 width=88) + Output:["key","c_int","c_float"] + TableScan [TS_0] (rows=20/20 width=88) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + +PREHOOK: query: select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x order by x,y limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x order by x,y limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x order by x,y limit 1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x order by x,y limit 1 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:1 + Stage-1 + Reducer 4 + File Output Operator [FS_15] + Limit [LIM_14] (rows=1/1 width=20) + Number of rows:1 + Select Operator [SEL_13] (rows=5/1 width=20) + Output:["_col0","_col1","_col2"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_12] + Group By Operator [GBY_10] (rows=5/1 width=20) + Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1 + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0, _col1 + Group By Operator [GBY_8] (rows=5/3 width=20) + Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col0 + Select Operator [SEL_5] (rows=10/5 width=101) + Output:["_col0","_col1"] + Group By Operator [GBY_4] (rows=10/5 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_2] (rows=10/5 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Select Operator [SEL_1] (rows=20/20 width=88) + Output:["key","c_int","c_float"] + TableScan [TS_0] (rows=20/20 width=88) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + +PREHOOK: query: select key from(select key from (select key from cbo_t1 limit 5)cbo_t2 limit 5)cbo_t3 limit 5 +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select key from(select key from (select key from cbo_t1 limit 5)cbo_t2 limit 5)cbo_t3 limit 5 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select key from(select key from (select key from cbo_t1 limit 5)cbo_t2 limit 5)cbo_t3 limit 5 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select key from(select key from (select key from cbo_t1 limit 5)cbo_t2 limit 5)cbo_t3 limit 5 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:5 + Stage-1 + Reducer 3 + File Output Operator [FS_13] + Limit [LIM_12] (rows=5/5 width=85) + Number of rows:5 + Limit [LIM_10] (rows=5/5 width=85) + Number of rows:5 + Select Operator [SEL_9] (rows=5/5 width=85) + Output:["_col0"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_8] + Limit [LIM_7] (rows=5/5 width=85) + Number of rows:5 + Limit [LIM_5] (rows=5/5 width=85) + Number of rows:5 + Select Operator [SEL_4] (rows=5/5 width=85) + Output:["_col0"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + Limit [LIM_2] (rows=5/5 width=85) + Number of rows:5 + Select Operator [SEL_1] (rows=20/7 width=80) + Output:["_col0"] + TableScan [TS_0] (rows=20/8 width=80) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select key, c_int from(select key, c_int from (select key, c_int from cbo_t1 order by c_int limit 5)cbo_t1 order by c_int limit 5)cbo_t2 order by c_int limit 5 +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select key, c_int from(select key, c_int from (select key, c_int from cbo_t1 order by c_int limit 5)cbo_t1 order by c_int limit 5)cbo_t2 order by c_int limit 5 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select key, c_int from(select key, c_int from (select key, c_int from cbo_t1 order by c_int limit 5)cbo_t1 order by c_int limit 5)cbo_t2 order by c_int limit 5 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select key, c_int from(select key, c_int from (select key, c_int from cbo_t1 order by c_int limit 5)cbo_t1 order by c_int limit 5)cbo_t2 order by c_int limit 5 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:5 + Stage-1 + Reducer 4 + File Output Operator [FS_13] + Limit [LIM_12] (rows=5/5 width=89) + Number of rows:5 + Select Operator [SEL_11] (rows=5/5 width=89) + Output:["_col0","_col1"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_10] + Limit [LIM_8] (rows=5/5 width=89) + Number of rows:5 + Select Operator [SEL_7] (rows=5/5 width=89) + Output:["_col0","_col1"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_6] + Limit [LIM_4] (rows=5/5 width=89) + Number of rows:5 + Select Operator [SEL_3] (rows=20/5 width=84) + Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + Select Operator [SEL_1] (rows=20/20 width=84) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=20/20 width=84) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + +PREHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a limit 5) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc limit 5) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c limit 5 +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a limit 5) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc limit 5) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c limit 5 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a limit 5) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc limit 5) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c limit 5 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a limit 5) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc limit 5) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c limit 5 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 10 <- Reducer 9 (SIMPLE_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE) +Reducer 5 <- Map 11 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE) +Reducer 6 <- Reducer 5 (SIMPLE_EDGE) +Reducer 7 <- Reducer 6 (SIMPLE_EDGE) +Reducer 9 <- Map 8 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:5 + Stage-1 + Reducer 7 + File Output Operator [FS_49] + Limit [LIM_48] (rows=1/2 width=20) + Number of rows:5 + Select Operator [SEL_47] (rows=1/2 width=20) + Output:["_col0","_col1","_col2"] + <-Reducer 6 [SIMPLE_EDGE] + SHUFFLE [RS_46] + Select Operator [SEL_44] (rows=1/2 width=20) + Output:["_col0","_col1","_col2"] + Group By Operator [GBY_43] (rows=1/2 width=20) + Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1 + <-Reducer 5 [SIMPLE_EDGE] + SHUFFLE [RS_42] + PartitionCols:_col0, _col1 + Group By Operator [GBY_41] (rows=1/2 width=20) + Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col2, _col6 + Select Operator [SEL_40] (rows=3/12 width=16) + Output:["_col2","_col6"] + Filter Operator [FIL_39] (rows=3/12 width=16) + predicate:((_col1 > 0) or (_col6 >= 0)) + Merge Join Operator [MERGEJOIN_61] (rows=3/12 width=16) + Conds:RS_36._col0=RS_37._col0(Inner),Output:["_col1","_col2","_col6"] + <-Map 11 [SIMPLE_EDGE] + SHUFFLE [RS_37] + PartitionCols:_col0 + Select Operator [SEL_35] (rows=18/18 width=84) + Output:["_col0","_col1"] + Filter Operator [FIL_59] (rows=18/18 width=84) + predicate:key is not null + TableScan [TS_33] (rows=20/20 width=84) + default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_36] + PartitionCols:_col0 + Select Operator [SEL_32] (rows=1/4 width=101) + Output:["_col0","_col1","_col2"] + Filter Operator [FIL_31] (rows=1/4 width=101) + predicate:((_col1 + _col4) >= 0) + Merge Join Operator [MERGEJOIN_60] (rows=2/4 width=101) + Conds:RS_28._col0=RS_29._col0(Inner),Output:["_col0","_col1","_col2","_col4"] + <-Reducer 10 [SIMPLE_EDGE] + SHUFFLE [RS_29] + PartitionCols:_col0 + Filter Operator [FIL_26] (rows=2/5 width=105) + predicate:_col0 is not null + Limit [LIM_24] (rows=3/5 width=105) + Number of rows:5 + Select Operator [SEL_23] (rows=3/5 width=105) + Output:["_col0","_col1"] + <-Reducer 9 [SIMPLE_EDGE] + SHUFFLE [RS_22] + Select Operator [SEL_20] (rows=3/5 width=105) + Output:["_col0","_col1","_col2","_col3"] + Group By Operator [GBY_19] (rows=3/5 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 8 [SIMPLE_EDGE] + SHUFFLE [RS_18] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_17] (rows=3/5 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Filter Operator [FIL_58] (rows=6/18 width=93) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0))) + TableScan [TS_14] (rows=20/20 width=88) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_28] + PartitionCols:_col0 + Filter Operator [FIL_12] (rows=2/4 width=97) + predicate:_col0 is not null + Limit [LIM_10] (rows=3/4 width=97) + Number of rows:5 + Select Operator [SEL_9] (rows=3/4 width=97) + Output:["_col0","_col1","_col2"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_8] + Select Operator [SEL_6] (rows=3/4 width=97) + Output:["_col0","_col1","_col2"] + Group By Operator [GBY_5] (rows=3/4 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_3] (rows=3/4 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Filter Operator [FIL_56] (rows=6/18 width=93) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0))) + TableScan [TS_0] (rows=20/20 width=88) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + +PREHOOK: query: select cbo_t1.c_int from cbo_t1 left semi join cbo_t2 on cbo_t1.key=cbo_t2.key where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select cbo_t1.c_int from cbo_t1 left semi join cbo_t2 on cbo_t1.key=cbo_t2.key where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select cbo_t1.c_int from cbo_t1 left semi join cbo_t2 on cbo_t1.key=cbo_t2.key where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select cbo_t1.c_int from cbo_t1 left semi join cbo_t2 on cbo_t1.key=cbo_t2.key where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_12] + Select Operator [SEL_11] (rows=9/18 width=4) + Output:["_col0"] + Merge Join Operator [MERGEJOIN_17] (rows=9/18 width=4) + Conds:RS_8._col0=RS_9._col0(Left Semi),Output:["_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=9/18 width=93) + Output:["_col0","_col1"] + Filter Operator [FIL_15] (rows=9/18 width=93) + predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0)) and key is not null) + TableScan [TS_0] (rows=20/20 width=88) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0 + Group By Operator [GBY_7] (rows=5/5 width=85) + Output:["_col0"],keys:_col0 + Select Operator [SEL_5] (rows=18/18 width=80) + Output:["_col0"] + Filter Operator [FIL_16] (rows=18/18 width=80) + predicate:key is not null + TableScan [TS_3] (rows=20/20 width=80) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select * from (select c, b, a from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 == 2) and (b > 0 or c >= 0)) R where (b + 1 = 2) and (R.b > 0 or c >= 0) +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select * from (select c, b, a from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 == 2) and (b > 0 or c >= 0)) R where (b + 1 = 2) and (R.b > 0 or c >= 0) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * from (select c, b, a from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 == 2) and (b > 0 or c >= 0)) R where (b + 1 = 2) and (R.b > 0 or c >= 0) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * from (select c, b, a from (select key as a, c_int as b, cbo_t1.c_float as c from cbo_t1 where (cbo_t1.c_int + 1 == 2) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)) cbo_t1 left semi join (select cbo_t2.key as p, cbo_t2.c_int as q, c_float as r from cbo_t2 where (cbo_t2.c_int + 1 == 2) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 == 2) and (b > 0 or c >= 0)) R where (b + 1 = 2) and (R.b > 0 or c >= 0) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_18] + Select Operator [SEL_17] (rows=16/18 width=93) + Output:["_col0","_col1","_col2"] + Merge Join Operator [MERGEJOIN_28] (rows=16/18 width=93) + Conds:RS_13._col0=RS_14._col0(Left Semi),RS_13._col0=RS_15._col0(Left Semi),Output:["_col0","_col1","_col2"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_13] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=9/18 width=93) + Output:["_col0","_col1","_col2"] + Filter Operator [FIL_25] (rows=9/18 width=93) + predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0)) and key is not null) + TableScan [TS_0] (rows=20/20 width=88) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_14] + PartitionCols:_col0 + Group By Operator [GBY_10] (rows=3/4 width=85) + Output:["_col0"],keys:_col0 + Select Operator [SEL_5] (rows=9/13 width=85) + Output:["_col0"] + Filter Operator [FIL_26] (rows=9/13 width=93) + predicate:(((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0)) and key is not null) + TableScan [TS_3] (rows=20/20 width=88) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_15] + PartitionCols:_col0 + Group By Operator [GBY_12] (rows=6/6 width=85) + Output:["_col0"],keys:_col0 + Select Operator [SEL_8] (rows=18/18 width=80) + Output:["_col0"] + Filter Operator [FIL_27] (rows=18/18 width=80) + predicate:key is not null + TableScan [TS_6] (rows=20/20 width=80) + default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select a, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by a+b desc, c asc) cbo_t1 left semi join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by q+r/10 desc, p) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 >= 0) and (b > 0 or a >= 0) group by a, c having a > 0 and (a >=1 or c >= 1) and (a + c) >= 0 order by c, a +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +PREHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +POSTHOOK: query: select a, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by a+b desc, c asc) cbo_t1 left semi join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by q+r/10 desc, p) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 >= 0) and (b > 0 or a >= 0) group by a, c having a > 0 and (a >=1 or c >= 1) and (a + c) >= 0 order by c, a +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +POSTHOOK: Input: default@cbo_t3 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select a, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by a+b desc, c asc) cbo_t1 left semi join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by q+r/10 desc, p) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 >= 0) and (b > 0 or a >= 0) group by a, c having a > 0 and (a >=1 or c >= 1) and (a + c) >= 0 order by c, a +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select a, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by a+b desc, c asc) cbo_t1 left semi join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0) group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by q+r/10 desc, p) cbo_t2 on cbo_t1.a=p left semi join cbo_t3 on cbo_t1.a=key where (b + 1 >= 0) and (b > 0 or a >= 0) group by a, c having a > 0 and (a >=1 or c >= 1) and (a + c) >= 0 order by c, a +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) +Reducer 6 <- Reducer 5 (SIMPLE_EDGE) +Reducer 8 <- Map 7 (SIMPLE_EDGE) +Reducer 9 <- Reducer 8 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 6 + File Output Operator [FS_41] + Select Operator [SEL_40] (rows=1/4 width=101) + Output:["_col0","_col1","_col2"] + <-Reducer 5 [SIMPLE_EDGE] + SHUFFLE [RS_39] + Select Operator [SEL_38] (rows=1/4 width=101) + Output:["_col0","_col1","_col2"] + Group By Operator [GBY_37] (rows=1/4 width=101) + Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1 + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_36] + PartitionCols:_col0, _col1 + Group By Operator [GBY_35] (rows=1/4 width=101) + Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col0 + Merge Join Operator [MERGEJOIN_51] (rows=1/4 width=93) + Conds:RS_30._col0=RS_31._col0(Left Semi),RS_30._col0=RS_32._col0(Left Semi),Output:["_col0","_col1"] + <-Map 10 [SIMPLE_EDGE] + SHUFFLE [RS_32] + PartitionCols:_col0 + Group By Operator [GBY_29] (rows=3/6 width=85) + Output:["_col0"],keys:_col0 + Select Operator [SEL_25] (rows=6/18 width=85) + Output:["_col0"] + Filter Operator [FIL_50] (rows=6/18 width=85) + predicate:(UDFToDouble(key) > 0.0) + TableScan [TS_23] (rows=20/20 width=80) + default@cbo_t3,cbo_t3,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_30] + PartitionCols:_col0 + Select Operator [SEL_10] (rows=1/4 width=93) + Output:["_col0","_col1"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_9] + Select Operator [SEL_8] (rows=1/4 width=101) + Output:["_col0","_col1","_col2"] + Filter Operator [FIL_7] (rows=1/4 width=101) + predicate:(((UDFToDouble(_col2) >= 1.0) or (_col3 >= 1)) and ((UDFToDouble(_col2) + UDFToDouble(_col3)) >= 0.0)) + Select Operator [SEL_6] (rows=1/4 width=101) + Output:["_col1","_col2","_col3"] + Group By Operator [GBY_5] (rows=1/4 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_3] (rows=1/4 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Filter Operator [FIL_48] (rows=1/18 width=93) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and (c_float > 0) and ((c_int >= 1) or (c_float >= 1)) and ((UDFToFloat(c_int) + c_float) >= 0.0) and (((c_int + 1) + 1) >= 0) and (((c_int + 1) > 0) or (UDFToDouble(key) >= 0.0)) and (UDFToDouble(key) > 0.0)) + TableScan [TS_0] (rows=20/20 width=88) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + <-Reducer 9 [SIMPLE_EDGE] + SHUFFLE [RS_31] + PartitionCols:_col0 + Group By Operator [GBY_27] (rows=1/5 width=85) + Output:["_col0"],keys:_col0 + Select Operator [SEL_21] (rows=1/5 width=85) + Output:["_col0"] + <-Reducer 8 [SIMPLE_EDGE] + SHUFFLE [RS_20] + Select Operator [SEL_18] (rows=1/5 width=93) + Output:["_col0","_col1"] + Group By Operator [GBY_17] (rows=1/5 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 7 [SIMPLE_EDGE] + SHUFFLE [RS_16] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_15] (rows=1/5 width=101) + Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float + Filter Operator [FIL_49] (rows=1/18 width=93) + predicate:(((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0)) and (c_float > 0) and ((c_int >= 1) or (c_float >= 1)) and ((UDFToFloat(c_int) + c_float) >= 0.0) and (UDFToDouble(key) > 0.0)) + TableScan [TS_12] (rows=20/20 width=88) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] + +PREHOOK: query: select cbo_t1.key as x, c_int as c_int, (((c_int+c_float)*10)+5) as y from cbo_t1 +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select cbo_t1.key as x, c_int as c_int, (((c_int+c_float)*10)+5) as y from cbo_t1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select cbo_t1.key as x, c_int as c_int, (((c_int+c_float)*10)+5) as y from cbo_t1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select cbo_t1.key as x, c_int as c_int, (((c_int+c_float)*10)+5) as y from cbo_t1 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-0 + Fetch Operator + limit:-1 + Select Operator [SEL_1] + Output:["_col0","_col1","_col2"] + TableScan [TS_0] + Output:["key","c_int","c_float"] + +PREHOOK: query: select null from cbo_t1 +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select null from cbo_t1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select null from cbo_t1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select null from cbo_t1 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-0 + Fetch Operator + limit:-1 + Select Operator [SEL_1] + Output:["_col0"] + TableScan [TS_0] + +PREHOOK: query: select key from cbo_t1 where c_int = -6 or c_int = +6 +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select key from cbo_t1 where c_int = -6 or c_int = +6 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select key from cbo_t1 where c_int = -6 or c_int = +6 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select key from cbo_t1 where c_int = -6 or c_int = +6 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-0 + Fetch Operator + limit:-1 + Select Operator [SEL_2] + Output:["_col0"] + Filter Operator [FIL_4] + predicate:((c_int = -6) or (c_int = 6)) + TableScan [TS_0] + Output:["key","c_int"] + +PREHOOK: query: select count(cbo_t1.dt) from cbo_t1 join cbo_t2 on cbo_t1.dt = cbo_t2.dt where cbo_t1.dt = '2014' +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +PREHOOK: Input: default@cbo_t2 +PREHOOK: Input: default@cbo_t2@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select count(cbo_t1.dt) from cbo_t1 join cbo_t2 on cbo_t1.dt = cbo_t2.dt where cbo_t1.dt = '2014' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +POSTHOOK: Input: default@cbo_t2 +POSTHOOK: Input: default@cbo_t2@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select count(cbo_t1.dt) from cbo_t1 join cbo_t2 on cbo_t1.dt = cbo_t2.dt where cbo_t1.dt = '2014' +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select count(cbo_t1.dt) from cbo_t1 join cbo_t2 on cbo_t1.dt = cbo_t2.dt where cbo_t1.dt = '2014' +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_15] + Group By Operator [GBY_13] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_12] + Group By Operator [GBY_11] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count('2014')"] + Merge Join Operator [MERGEJOIN_18] (rows=400/400 width=8) + Conds:(Inner) + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + Select Operator [SEL_2] (rows=20/20 width=88) + TableScan [TS_0] (rows=20/20 width=21) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_7] + Select Operator [SEL_5] (rows=20/20 width=88) + TableScan [TS_3] (rows=20/20 width=21) + default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE + +PREHOOK: query: select * +from src_cbo b +where not exists + (select distinct a.key + from src_cbo a + where b.value = a.value and a.value > 'val_2' + ) +PREHOOK: type: QUERY +PREHOOK: Input: default@src_cbo +#### A masked pattern was here #### +POSTHOOK: query: select * +from src_cbo b +where not exists + (select distinct a.key + from src_cbo a + where b.value = a.value and a.value > 'val_2' + ) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_cbo +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * +from src_cbo b +where not exists + (select distinct a.key + from src_cbo a + where b.value = a.value and a.value > 'val_2' + ) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * +from src_cbo b +where not exists + (select distinct a.key + from src_cbo a + where b.value = a.value and a.value > 'val_2' + ) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE) +Reducer 4 <- Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_14] + Select Operator [SEL_13] (rows=1/119 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_12] (rows=1/119 width=269) + predicate:_col3 is null + Merge Join Operator [MERGEJOIN_17] (rows=500/500 width=269) + Conds:RS_9._col1=RS_10._col1(Left Outer),Output:["_col0","_col1","_col3"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col1 + Select Operator [SEL_1] (rows=500/500 width=178) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=500/500 width=178) + default@src_cbo,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_10] + PartitionCols:_col1 + Select Operator [SEL_8] (rows=83/236 width=178) + Output:["_col1"] + Group By Operator [GBY_7] (rows=83/236 width=178) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col0, _col1 + Group By Operator [GBY_5] (rows=83/236 width=178) + Output:["_col0","_col1"],keys:value, key + Select Operator [SEL_4] (rows=166/381 width=178) + Output:["value","key"] + Filter Operator [FIL_16] (rows=166/381 width=178) + predicate:(value > 'val_2') + TableScan [TS_2] (rows=500/500 width=178) + default@src_cbo,a,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: select * +from src_cbo b +group by key, value +having not exists + (select a.key + from src_cbo a + where b.value = a.value and a.key = b.key and a.value > 'val_12' + ) +PREHOOK: type: QUERY +PREHOOK: Input: default@src_cbo +#### A masked pattern was here #### +POSTHOOK: query: select * +from src_cbo b +group by key, value +having not exists + (select a.key + from src_cbo a + where b.value = a.value and a.key = b.key and a.value > 'val_12' + ) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_cbo +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * +from src_cbo b +group by key, value +having not exists + (select a.key + from src_cbo a + where b.value = a.value and a.key = b.key and a.value > 'val_12' + ) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * +from src_cbo b +group by key, value +having not exists + (select a.key + from src_cbo a + where b.value = a.value and a.key = b.key and a.value > 'val_12' + ) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Map 4 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_14] + Select Operator [SEL_13] (rows=1/14 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_12] (rows=1/14 width=265) + predicate:_col3 is null + Merge Join Operator [MERGEJOIN_17] (rows=250/490 width=265) + Conds:RS_9._col0, _col1=RS_10._col1, _col0(Left Outer),Output:["_col0","_col1","_col3"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_10] + PartitionCols:_col1, _col0 + Select Operator [SEL_8] (rows=166/476 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_16] (rows=166/476 width=178) + predicate:(value > 'val_12') + TableScan [TS_6] (rows=500/500 width=178) + default@src_cbo,a,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0, _col1 + Group By Operator [GBY_4] (rows=250/309 width=178) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:_col0, _col1 + Group By Operator [GBY_2] (rows=250/309 width=178) + Output:["_col0","_col1"],keys:key, value + Select Operator [SEL_1] (rows=500/500 width=178) + Output:["key","value"] + TableScan [TS_0] (rows=500/500 width=178) + default@src_cbo,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: create view cv1 as +select * +from src_cbo b +where exists + (select a.key + from src_cbo a + where b.value = a.value and a.key = b.key and a.value > 'val_9') +PREHOOK: type: CREATEVIEW +PREHOOK: Input: default@src_cbo +PREHOOK: Output: database:default +PREHOOK: Output: default@cv1 +POSTHOOK: query: create view cv1 as +select * +from src_cbo b +where exists + (select a.key + from src_cbo a + where b.value = a.value and a.key = b.key and a.value > 'val_9') +POSTHOOK: type: CREATEVIEW +POSTHOOK: Input: default@src_cbo +POSTHOOK: Output: database:default +POSTHOOK: Output: default@cv1 +PREHOOK: query: select * from cv1 +PREHOOK: type: QUERY +PREHOOK: Input: default@cv1 +PREHOOK: Input: default@src_cbo +#### A masked pattern was here #### +POSTHOOK: query: select * from cv1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cv1 +POSTHOOK: Input: default@src_cbo +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * from cv1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * from cv1 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_12] + Merge Join Operator [MERGEJOIN_17] (rows=2/11 width=178) + Conds:RS_8._col0, _col1=RS_9._col0, _col1(Left Semi),Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:_col0, _col1 + Select Operator [SEL_2] (rows=166/11 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_15] (rows=166/11 width=178) + predicate:((value > 'val_9') and key is not null) + TableScan [TS_0] (rows=500/500 width=178) + default@src_cbo,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0, _col1 + Group By Operator [GBY_7] (rows=83/6 width=178) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_5] (rows=166/11 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_16] (rows=166/11 width=178) + predicate:((value > 'val_9') and key is not null) + TableScan [TS_3] (rows=500/500 width=178) + default@src_cbo,a,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: select * +from (select * + from src_cbo b + where exists + (select a.key + from src_cbo a + where b.value = a.value and a.key = b.key and a.value > 'val_9') + ) a +PREHOOK: type: QUERY +PREHOOK: Input: default@src_cbo +#### A masked pattern was here #### +POSTHOOK: query: select * +from (select * + from src_cbo b + where exists + (select a.key + from src_cbo a + where b.value = a.value and a.key = b.key and a.value > 'val_9') + ) a +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_cbo +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * +from (select * + from src_cbo b + where exists + (select a.key + from src_cbo a + where b.value = a.value and a.key = b.key and a.value > 'val_9') + ) a +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * +from (select * + from src_cbo b + where exists + (select a.key + from src_cbo a + where b.value = a.value and a.key = b.key and a.value > 'val_9') + ) a +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_12] + Merge Join Operator [MERGEJOIN_17] (rows=2/11 width=178) + Conds:RS_8._col0, _col1=RS_9._col0, _col1(Left Semi),Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:_col0, _col1 + Select Operator [SEL_2] (rows=166/11 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_15] (rows=166/11 width=178) + predicate:((value > 'val_9') and key is not null) + TableScan [TS_0] (rows=500/500 width=178) + default@src_cbo,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0, _col1 + Group By Operator [GBY_7] (rows=83/6 width=178) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_5] (rows=166/11 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_16] (rows=166/11 width=178) + predicate:((value > 'val_9') and key is not null) + TableScan [TS_3] (rows=500/500 width=178) + default@src_cbo,a,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: select * +from src_cbo +where src_cbo.key in (select key from src_cbo s1 where s1.key > '9') +PREHOOK: type: QUERY +PREHOOK: Input: default@src_cbo +#### A masked pattern was here #### +POSTHOOK: query: select * +from src_cbo +where src_cbo.key in (select key from src_cbo s1 where s1.key > '9') +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_cbo +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * +from src_cbo +where src_cbo.key in (select key from src_cbo s1 where s1.key > '9') +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * +from src_cbo +where src_cbo.key in (select key from src_cbo s1 where s1.key > '9') +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_12] + Merge Join Operator [MERGEJOIN_17] (rows=166/11 width=178) + Conds:RS_8._col0=RS_9._col0(Left Semi),Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=166/11 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_15] (rows=166/11 width=178) + predicate:(key > '9') + TableScan [TS_0] (rows=500/500 width=178) + default@src_cbo,src_cbo,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0 + Group By Operator [GBY_7] (rows=69/6 width=87) + Output:["_col0"],keys:_col0 + Select Operator [SEL_5] (rows=166/11 width=87) + Output:["_col0"] + Filter Operator [FIL_16] (rows=166/11 width=87) + predicate:(key > '9') + TableScan [TS_3] (rows=500/500 width=87) + default@src_cbo,s1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select p.p_partkey, li.l_suppkey +from (select distinct l_partkey as p_partkey from lineitem) p join lineitem li on p.p_partkey = li.l_partkey +where li.l_linenumber = 1 and + li.l_orderkey in (select l_orderkey from lineitem where l_shipmode = 'AIR' and l_linenumber = li.l_linenumber) +PREHOOK: type: QUERY +PREHOOK: Input: default@lineitem +#### A masked pattern was here #### +POSTHOOK: query: select p.p_partkey, li.l_suppkey +from (select distinct l_partkey as p_partkey from lineitem) p join lineitem li on p.p_partkey = li.l_partkey +where li.l_linenumber = 1 and + li.l_orderkey in (select l_orderkey from lineitem where l_shipmode = 'AIR' and l_linenumber = li.l_linenumber) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@lineitem +#### A masked pattern was here #### +PREHOOK: query: explain analyze select p.p_partkey, li.l_suppkey +from (select distinct l_partkey as p_partkey from lineitem) p join lineitem li on p.p_partkey = li.l_partkey +where li.l_linenumber = 1 and + li.l_orderkey in (select l_orderkey from lineitem where l_shipmode = 'AIR' and l_linenumber = li.l_linenumber) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select p.p_partkey, li.l_suppkey +from (select distinct l_partkey as p_partkey from lineitem) p join lineitem li on p.p_partkey = li.l_partkey +where li.l_linenumber = 1 and + li.l_orderkey in (select l_orderkey from lineitem where l_shipmode = 'AIR' and l_linenumber = li.l_linenumber) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE) +Reducer 6 <- Map 5 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_22] + Select Operator [SEL_21] (rows=4/2 width=8) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_32] (rows=4/2 width=8) + Conds:RS_18._col1=RS_19._col0(Inner),Output:["_col2","_col4"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_18] + PartitionCols:_col1 + Merge Join Operator [MERGEJOIN_31] (rows=13/2 width=8) + Conds:RS_15._col0, 1=RS_16._col0, _col1(Left Semi),Output:["_col1","_col2"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_15] + PartitionCols:_col0, 1 + Select Operator [SEL_2] (rows=17/26 width=16) + Output:["_col0","_col1","_col2"] + Filter Operator [FIL_28] (rows=17/26 width=16) + predicate:((l_linenumber = 1) and l_partkey is not null and l_orderkey is not null) + TableScan [TS_0] (rows=100/100 width=16) + default@lineitem,li,Tbl:COMPLETE,Col:COMPLETE,Output:["l_orderkey","l_partkey","l_suppkey","l_linenumber"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_16] + PartitionCols:_col0, _col1 + Group By Operator [GBY_14] (rows=4/2 width=8) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_5] (rows=14/2 width=8) + Output:["_col0","_col1"] + Filter Operator [FIL_29] (rows=14/2 width=96) + predicate:((l_shipmode = 'AIR') and (l_linenumber = 1) and l_orderkey is not null) + TableScan [TS_3] (rows=100/100 width=96) + default@lineitem,lineitem,Tbl:COMPLETE,Col:COMPLETE,Output:["l_orderkey","l_linenumber","l_shipmode"] + <-Reducer 6 [SIMPLE_EDGE] + SHUFFLE [RS_19] + PartitionCols:_col0 + Group By Operator [GBY_11] (rows=50/100 width=4) + Output:["_col0"],keys:KEY._col0 + <-Map 5 [SIMPLE_EDGE] + SHUFFLE [RS_10] + PartitionCols:_col0 + Group By Operator [GBY_9] (rows=50/100 width=4) + Output:["_col0"],keys:l_partkey + Filter Operator [FIL_30] (rows=100/100 width=4) + predicate:l_partkey is not null + TableScan [TS_6] (rows=100/100 width=4) + default@lineitem,lineitem,Tbl:COMPLETE,Col:COMPLETE,Output:["l_partkey"] + +PREHOOK: query: select key, value, count(*) +from src_cbo b +where b.key in (select key from src_cbo where src_cbo.key > '8') +group by key, value +having count(*) in (select count(*) from src_cbo s1 where s1.key > '9' group by s1.key ) +PREHOOK: type: QUERY +PREHOOK: Input: default@src_cbo +#### A masked pattern was here #### +POSTHOOK: query: select key, value, count(*) +from src_cbo b +where b.key in (select key from src_cbo where src_cbo.key > '8') +group by key, value +having count(*) in (select count(*) from src_cbo s1 where s1.key > '9' group by s1.key ) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_cbo +#### A masked pattern was here #### +PREHOOK: query: explain analyze select key, value, count(*) +from src_cbo b +where b.key in (select key from src_cbo where src_cbo.key > '8') +group by key, value +having count(*) in (select count(*) from src_cbo s1 where s1.key > '9' group by s1.key ) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select key, value, count(*) +from src_cbo b +where b.key in (select key from src_cbo where src_cbo.key > '8') +group by key, value +having count(*) in (select count(*) from src_cbo s1 where s1.key > '9' group by s1.key ) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) +Reducer 7 <- Map 6 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_31] + Merge Join Operator [MERGEJOIN_44] (rows=34/14 width=186) + Conds:RS_27._col2=RS_28._col0(Left Semi),Output:["_col0","_col1","_col2"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_27] + PartitionCols:_col2 + Filter Operator [FIL_37] (rows=83/14 width=186) + predicate:_col2 is not null + Group By Operator [GBY_14] (rows=83/14 width=186) + Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1 + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_13] + PartitionCols:_col0, _col1 + Group By Operator [GBY_12] (rows=83/14 width=186) + Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col0, _col1 + Merge Join Operator [MERGEJOIN_43] (rows=166/21 width=178) + Conds:RS_8._col0=RS_9._col0(Left Semi),Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=166/21 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_38] (rows=166/21 width=178) + predicate:(key > '8') + TableScan [TS_0] (rows=500/500 width=178) + default@src_cbo,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Map 5 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0 + Group By Operator [GBY_7] (rows=69/14 width=87) + Output:["_col0"],keys:_col0 + Select Operator [SEL_5] (rows=166/21 width=87) + Output:["_col0"] + Filter Operator [FIL_39] (rows=166/21 width=87) + predicate:(key > '8') + TableScan [TS_3] (rows=500/500 width=87) + default@src_cbo,src_cbo,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Reducer 7 [SIMPLE_EDGE] + SHUFFLE [RS_28] + PartitionCols:_col0 + Group By Operator [GBY_26] (rows=34/3 width=8) + Output:["_col0"],keys:_col0 + Select Operator [SEL_24] (rows=69/6 width=8) + Output:["_col0"] + Filter Operator [FIL_40] (rows=69/6 width=8) + predicate:_col1 is not null + Select Operator [SEL_42] (rows=69/6 width=8) + Output:["_col1"] + Group By Operator [GBY_22] (rows=69/6 width=95) + Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0 + <-Map 6 [SIMPLE_EDGE] + SHUFFLE [RS_21] + PartitionCols:_col0 + Group By Operator [GBY_20] (rows=69/6 width=95) + Output:["_col0","_col1"],aggregations:["count()"],keys:key + Filter Operator [FIL_41] (rows=166/11 width=87) + predicate:(key > '9') + TableScan [TS_17] (rows=500/500 width=87) + default@src_cbo,s1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select p_mfgr, p_name, avg(p_size) +from part +group by p_mfgr, p_name +having p_name in + (select first_value(p_name) over(partition by p_mfgr order by p_size) from part) +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, avg(p_size) +from part +group by p_mfgr, p_name +having p_name in + (select first_value(p_name) over(partition by p_mfgr order by p_size) from part) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze select p_mfgr, p_name, avg(p_size) +from part +group by p_mfgr, p_name +having p_name in + (select first_value(p_name) over(partition by p_mfgr order by p_size) from part) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select p_mfgr, p_name, avg(p_size) +from part +group by p_mfgr, p_name +having p_name in + (select first_value(p_name) over(partition by p_mfgr order by p_size) from part) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE) +Reducer 5 <- Map 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_21] + Merge Join Operator [MERGEJOIN_26] (rows=6/5 width=227) + Conds:RS_17._col1=RS_18._col0(Left Semi),Output:["_col0","_col1","_col2"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_17] + PartitionCols:_col1 + Select Operator [SEL_6] (rows=13/25 width=227) + Output:["_col0","_col1","_col2"] + Group By Operator [GBY_5] (rows=13/25 width=227) + Output:["_col0","_col1","_col2"],aggregations:["avg(VALUE._col0)"],keys:KEY._col0, KEY._col1 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col0, _col1 + Group By Operator [GBY_3] (rows=13/25 width=295) + Output:["_col0","_col1","_col2"],aggregations:["avg(p_size)"],keys:p_name, p_mfgr + Filter Operator [FIL_24] (rows=26/26 width=223) + predicate:p_name is not null + TableScan [TS_0] (rows=26/26 width=223) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_name","p_mfgr","p_size"] + <-Reducer 5 [SIMPLE_EDGE] + SHUFFLE [RS_18] + PartitionCols:_col0 + Group By Operator [GBY_16] (rows=13/5 width=184) + Output:["_col0"],keys:_col0 + Select Operator [SEL_11] (rows=26/26 width=184) + Output:["_col0"] + Filter Operator [FIL_25] (rows=26/26 width=491) + predicate:first_value_window_0 is not null + PTF Operator [PTF_10] (rows=26/21 width=491) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col5 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_9] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:p_mfgr + TableScan [TS_7] (rows=26/26 width=223) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_size"] + +PREHOOK: query: select * +from src_cbo +where src_cbo.key not in + ( select key from src_cbo s1 + where s1.key > '2' + ) order by key +PREHOOK: type: QUERY +PREHOOK: Input: default@src_cbo +#### A masked pattern was here #### +POSTHOOK: query: select * +from src_cbo +where src_cbo.key not in + ( select key from src_cbo s1 + where s1.key > '2' + ) order by key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_cbo +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * +from src_cbo +where src_cbo.key not in + ( select key from src_cbo s1 + where s1.key > '2' + ) order by key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * +from src_cbo +where src_cbo.key not in + ( select key from src_cbo s1 + where s1.key > '2' + ) order by key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE) +Reducer 3 <- Map 7 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) +Reducer 6 <- Map 5 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_25] + Select Operator [SEL_24] (rows=1/119 width=178) + Output:["_col0","_col1"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_23] + Select Operator [SEL_22] (rows=1/119 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_21] (rows=1/119 width=265) + predicate:_col3 is null + Merge Join Operator [MERGEJOIN_29] (rows=500/910 width=265) + Conds:RS_18._col0=RS_19._col0(Left Outer),Output:["_col0","_col1","_col3"] + <-Map 7 [SIMPLE_EDGE] + SHUFFLE [RS_19] + PartitionCols:_col0 + Select Operator [SEL_14] (rows=166/381 width=87) + Output:["_col0"] + Filter Operator [FIL_27] (rows=166/381 width=87) + predicate:(key > '2') + TableScan [TS_12] (rows=500/500 width=87) + default@src_cbo,s1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_18] + PartitionCols:_col0 + Merge Join Operator [MERGEJOIN_28] (rows=500/500 width=178) + Conds:(Inner),Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_15] + Select Operator [SEL_1] (rows=500/500 width=178) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=500/500 width=178) + default@src_cbo,src_cbo,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 6 [SIMPLE_EDGE] + SHUFFLE [RS_16] + Select Operator [SEL_11] (rows=1/1 width=8) + Filter Operator [FIL_10] (rows=1/1 width=8) + predicate:(_col0 = 0) + Group By Operator [GBY_8] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Map 5 [SIMPLE_EDGE] + SHUFFLE [RS_7] + Group By Operator [GBY_6] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count()"] + Filter Operator [FIL_4] (rows=1/0 width=4) + predicate:false + Select Operator [SEL_3] (rows=500/1 width=4) + TableScan [TS_2] (rows=500/1 width=10) + default@src_cbo,s1,Tbl:COMPLETE,Col:COMPLETE + +PREHOOK: query: select p_mfgr, b.p_name, p_size +from part b +where b.p_name not in + (select p_name + from (select p_mfgr, p_name, p_size as r from part) a + where r < 10 and b.p_mfgr = a.p_mfgr + ) +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, b.p_name, p_size +from part b +where b.p_name not in + (select p_name + from (select p_mfgr, p_name, p_size as r from part) a + where r < 10 and b.p_mfgr = a.p_mfgr + ) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze select p_mfgr, b.p_name, p_size +from part b +where b.p_name not in + (select p_name + from (select p_mfgr, p_name, p_size as r from part) a + where r < 10 and b.p_mfgr = a.p_mfgr + ) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select p_mfgr, b.p_name, p_size +from part b +where b.p_name not in + (select p_name + from (select p_mfgr, p_name, p_size as r from part) a + where r < 10 and b.p_mfgr = a.p_mfgr + ) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE) +Reducer 3 <- Map 6 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) +Reducer 5 <- Map 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_22] + Select Operator [SEL_21] (rows=1/18 width=223) + Output:["_col0","_col1","_col2"] + Filter Operator [FIL_20] (rows=1/18 width=344) + predicate:_col4 is null + Merge Join Operator [MERGEJOIN_27] (rows=26/28 width=344) + Conds:RS_17._col0, _col1=RS_18._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4"] + <-Map 6 [SIMPLE_EDGE] + SHUFFLE [RS_18] + PartitionCols:_col0, _col1 + Select Operator [SEL_13] (rows=8/8 width=219) + Output:["_col0","_col1"] + Filter Operator [FIL_25] (rows=8/8 width=223) + predicate:(p_size < 10) + TableScan [TS_11] (rows=26/26 width=223) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_name","p_mfgr","p_size"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_17] + PartitionCols:_col0, _col1 + Merge Join Operator [MERGEJOIN_26] (rows=26/26 width=223) + Conds:(Inner),Output:["_col0","_col1","_col2"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_14] + Select Operator [SEL_1] (rows=26/26 width=223) + Output:["_col0","_col1","_col2"] + TableScan [TS_0] (rows=26/26 width=223) + default@part,b,Tbl:COMPLETE,Col:COMPLETE,Output:["p_name","p_mfgr","p_size"] + <-Reducer 5 [SIMPLE_EDGE] + SHUFFLE [RS_15] + Select Operator [SEL_10] (rows=1/1 width=8) + Filter Operator [FIL_9] (rows=1/1 width=8) + predicate:(_col0 = 0) + Group By Operator [GBY_7] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_6] + Group By Operator [GBY_5] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count()"] + Select Operator [SEL_4] (rows=1/0 width=223) + Filter Operator [FIL_24] (rows=1/0 width=223) + predicate:((p_size < 10) and (p_name is null or p_mfgr is null)) + TableScan [TS_2] (rows=26/26 width=223) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_name","p_mfgr","p_size"] + +PREHOOK: query: select p_name, p_size +from +part where part.p_size not in + (select avg(p_size) + from (select p_size from part) a + where p_size < 10 + ) order by p_name +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_name, p_size +from +part where part.p_size not in + (select avg(p_size) + from (select p_size from part) a + where p_size < 10 + ) order by p_name +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze select p_name, p_size +from +part where part.p_size not in + (select avg(p_size) + from (select p_size from part) a + where p_size < 10 + ) order by p_name +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select p_name, p_size +from +part where part.p_size not in + (select avg(p_size) + from (select p_size from part) a + where p_size < 10 + ) order by p_name +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) +Reducer 6 <- Map 5 (SIMPLE_EDGE) +Reducer 8 <- Map 7 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_35] + Select Operator [SEL_34] (rows=1/26 width=125) + Output:["_col0","_col1"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_33] + Select Operator [SEL_32] (rows=1/26 width=125) + Output:["_col0","_col1"] + Filter Operator [FIL_31] (rows=1/26 width=133) + predicate:_col3 is null + Merge Join Operator [MERGEJOIN_41] (rows=26/26 width=133) + Conds:RS_28.UDFToDouble(_col1)=RS_29._col0(Left Outer),Output:["_col0","_col1","_col3"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_28] + PartitionCols:UDFToDouble(_col1) + Merge Join Operator [MERGEJOIN_40] (rows=26/26 width=125) + Conds:(Inner),Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_25] + Select Operator [SEL_1] (rows=26/26 width=125) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=26/26 width=125) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_name","p_size"] + <-Reducer 6 [SIMPLE_EDGE] + SHUFFLE [RS_26] + Select Operator [SEL_17] (rows=1/1 width=8) + Filter Operator [FIL_16] (rows=1/1 width=8) + predicate:(_col0 = 0) + Group By Operator [GBY_14] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count()"] + Select Operator [SEL_10] (rows=1/0 width=8) + Filter Operator [FIL_9] (rows=1/0 width=8) + predicate:_col0 is null + Group By Operator [GBY_7] (rows=1/1 width=8) + Output:["_col0"],aggregations:["avg(VALUE._col0)"] + <-Map 5 [SIMPLE_EDGE] + SHUFFLE [RS_6] + Group By Operator [GBY_5] (rows=1/1 width=76) + Output:["_col0"],aggregations:["avg(p_size)"] + Filter Operator [FIL_37] (rows=8/8 width=4) + predicate:(p_size < 10) + TableScan [TS_2] (rows=26/26 width=4) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_size"] + <-Reducer 8 [SIMPLE_EDGE] + SHUFFLE [RS_29] + PartitionCols:_col0 + Group By Operator [GBY_23] (rows=1/1 width=8) + Output:["_col0"],aggregations:["avg(VALUE._col0)"] + <-Map 7 [SIMPLE_EDGE] + SHUFFLE [RS_22] + Group By Operator [GBY_21] (rows=1/1 width=76) + Output:["_col0"],aggregations:["avg(p_size)"] + Filter Operator [FIL_39] (rows=8/8 width=4) + predicate:(p_size < 10) + TableScan [TS_18] (rows=26/26 width=4) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_size"] + +PREHOOK: query: select b.p_mfgr, min(p_retailprice) +from part b +group by b.p_mfgr +having b.p_mfgr not in + (select p_mfgr + from (select p_mfgr, min(p_retailprice) l, max(p_retailprice) r, avg(p_retailprice) a from part group by p_mfgr) a + where min(p_retailprice) = l and r - l > 600 + ) + order by b.p_mfgr +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select b.p_mfgr, min(p_retailprice) +from part b +group by b.p_mfgr +having b.p_mfgr not in + (select p_mfgr + from (select p_mfgr, min(p_retailprice) l, max(p_retailprice) r, avg(p_retailprice) a from part group by p_mfgr) a + where min(p_retailprice) = l and r - l > 600 + ) + order by b.p_mfgr +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze select b.p_mfgr, min(p_retailprice) +from part b +group by b.p_mfgr +having b.p_mfgr not in + (select p_mfgr + from (select p_mfgr, min(p_retailprice) l, max(p_retailprice) r, avg(p_retailprice) a from part group by p_mfgr) a + where min(p_retailprice) = l and r - l > 600 + ) + order by b.p_mfgr +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select b.p_mfgr, min(p_retailprice) +from part b +group by b.p_mfgr +having b.p_mfgr not in + (select p_mfgr + from (select p_mfgr, min(p_retailprice) l, max(p_retailprice) r, avg(p_retailprice) a from part group by p_mfgr) a + where min(p_retailprice) = l and r - l > 600 + ) + order by b.p_mfgr +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 10 <- Map 9 (SIMPLE_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE) +Reducer 4 <- Reducer 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) +Reducer 7 <- Map 6 (SIMPLE_EDGE) +Reducer 8 <- Reducer 7 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 5 + File Output Operator [FS_37] + Select Operator [SEL_36] (rows=1/2 width=106) + Output:["_col0","_col1"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_35] + Select Operator [SEL_34] (rows=1/2 width=106) + Output:["_col0","_col1"] + Filter Operator [FIL_33] (rows=1/2 width=204) + predicate:_col3 is null + Merge Join Operator [MERGEJOIN_42] (rows=5/5 width=204) + Conds:RS_30._col0, _col1=RS_31._col0, _col1(Left Outer),Output:["_col0","_col1","_col3"] + <-Reducer 10 [SIMPLE_EDGE] + SHUFFLE [RS_31] + PartitionCols:_col0, _col1 + Select Operator [SEL_26] (rows=1/3 width=106) + Output:["_col0","_col1"] + Filter Operator [FIL_39] (rows=1/3 width=114) + predicate:((_col2 - _col1) > 600.0) + Group By Operator [GBY_24] (rows=5/5 width=114) + Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)"],keys:KEY._col0 + <-Map 9 [SIMPLE_EDGE] + SHUFFLE [RS_23] + PartitionCols:_col0 + Group By Operator [GBY_22] (rows=5/5 width=114) + Output:["_col0","_col1","_col2"],aggregations:["min(p_retailprice)","max(p_retailprice)"],keys:p_mfgr + TableScan [TS_20] (rows=26/26 width=106) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_retailprice"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_30] + PartitionCols:_col0, _col1 + Merge Join Operator [MERGEJOIN_41] (rows=5/5 width=106) + Conds:(Inner),Output:["_col0","_col1"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_27] + Group By Operator [GBY_4] (rows=5/5 width=106) + Output:["_col0","_col1"],aggregations:["min(VALUE._col0)"],keys:KEY._col0 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:_col0 + Group By Operator [GBY_2] (rows=5/5 width=106) + Output:["_col0","_col1"],aggregations:["min(p_retailprice)"],keys:p_mfgr + Select Operator [SEL_1] (rows=26/26 width=106) + Output:["p_mfgr","p_retailprice"] + TableScan [TS_0] (rows=26/26 width=106) + default@part,b,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_retailprice"] + <-Reducer 8 [SIMPLE_EDGE] + SHUFFLE [RS_28] + Select Operator [SEL_19] (rows=1/1 width=8) + Filter Operator [FIL_18] (rows=1/1 width=8) + predicate:(_col0 = 0) + Group By Operator [GBY_16] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Reducer 7 [SIMPLE_EDGE] + SHUFFLE [RS_15] + Group By Operator [GBY_14] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count()"] + Select Operator [SEL_12] (rows=1/0 width=114) + Filter Operator [FIL_11] (rows=1/0 width=114) + predicate:(((_col2 - _col1) > 600.0) and (_col0 is null or _col1 is null)) + Group By Operator [GBY_10] (rows=5/5 width=114) + Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)"],keys:KEY._col0 + <-Map 6 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0 + Group By Operator [GBY_8] (rows=5/5 width=114) + Output:["_col0","_col1","_col2"],aggregations:["min(p_retailprice)","max(p_retailprice)"],keys:p_mfgr + Select Operator [SEL_7] (rows=26/26 width=106) + Output:["p_mfgr","p_retailprice"] + TableScan [TS_6] (rows=26/26 width=106) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_retailprice"] + +PREHOOK: query: select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1 +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_4] (rows=20/20 width=52) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"] + PTF Operator [PTF_3] (rows=20/0 width=459) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"0 ASC NULLS FIRST","partition by:":"0"}] + Select Operator [SEL_2] (rows=20/20 width=459) + Output:["_col2","_col3"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:0 + TableScan [TS_0] (rows=20/20 width=7) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["c_float","c_int"] + +PREHOOK: query: select * from (select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1) cbo_t1 +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select * from (select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1) cbo_t1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * from (select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1) cbo_t1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * from (select count(c_int) over(), sum(c_float) over(), max(c_int) over(), min(c_int) over(), row_number() over(), rank() over(), dense_rank() over(), percent_rank() over(), lead(c_int, 2, c_int) over(), lag(c_float, 2, c_float) over() from cbo_t1) cbo_t1 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_4] (rows=20/20 width=52) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"] + PTF Operator [PTF_3] (rows=20/0 width=459) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"0 ASC NULLS FIRST","partition by:":"0"}] + Select Operator [SEL_2] (rows=20/20 width=459) + Output:["_col2","_col3"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:0 + TableScan [TS_0] (rows=20/20 width=7) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["c_float","c_int"] + +PREHOOK: query: select i, a, h, b, c, d, e, f, g, a as x, a +1 as y from (select max(c_int) over (partition by key order by value range UNBOUNDED PRECEDING) a, min(c_int) over (partition by key order by value range current row) b, count(c_int) over(partition by key order by value range 1 PRECEDING) c, avg(value) over (partition by key order by value range between unbounded preceding and unbounded following) d, sum(value) over (partition by key order by value range between unbounded preceding and current row) e, avg(c_float) over (partition by key order by value range between 1 preceding and unbounded following) f, sum(c_float) over (partition by key order by value range between 1 preceding and current row) g, max(c_float) over (partition by key order by value range between 1 preceding and unbounded following) h, min(c_float) over (partition by key order by value range between 1 preceding and 1 following) i from cbo_t1) cbo_t1 +PREHOOK: type: QUERY +PREHOOK: Input: default@cbo_t1 +PREHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +POSTHOOK: query: select i, a, h, b, c, d, e, f, g, a as x, a +1 as y from (select max(c_int) over (partition by key order by value range UNBOUNDED PRECEDING) a, min(c_int) over (partition by key order by value range current row) b, count(c_int) over(partition by key order by value range 1 PRECEDING) c, avg(value) over (partition by key order by value range between unbounded preceding and unbounded following) d, sum(value) over (partition by key order by value range between unbounded preceding and current row) e, avg(c_float) over (partition by key order by value range between 1 preceding and unbounded following) f, sum(c_float) over (partition by key order by value range between 1 preceding and current row) g, max(c_float) over (partition by key order by value range between 1 preceding and unbounded following) h, min(c_float) over (partition by key order by value range between 1 preceding and 1 following) i from cbo_t1) cbo_t1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cbo_t1 +POSTHOOK: Input: default@cbo_t1@dt=2014 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select i, a, h, b, c, d, e, f, g, a as x, a +1 as y from (select max(c_int) over (partition by key order by value range UNBOUNDED PRECEDING) a, min(c_int) over (partition by key order by value range current row) b, count(c_int) over(partition by key order by value range 1 PRECEDING) c, avg(value) over (partition by key order by value range between unbounded preceding and unbounded following) d, sum(value) over (partition by key order by value range between unbounded preceding and current row) e, avg(c_float) over (partition by key order by value range between 1 preceding and unbounded following) f, sum(c_float) over (partition by key order by value range between 1 preceding and current row) g, max(c_float) over (partition by key order by value range between 1 preceding and unbounded following) h, min(c_float) over (partition by key order by value range between 1 preceding and 1 following) i from cbo_t1) cbo_t1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select i, a, h, b, c, d, e, f, g, a as x, a +1 as y from (select max(c_int) over (partition by key order by value range UNBOUNDED PRECEDING) a, min(c_int) over (partition by key order by value range current row) b, count(c_int) over(partition by key order by value range 1 PRECEDING) c, avg(value) over (partition by key order by value range between unbounded preceding and unbounded following) d, sum(value) over (partition by key order by value range between unbounded preceding and current row) e, avg(c_float) over (partition by key order by value range between 1 preceding and unbounded following) f, sum(c_float) over (partition by key order by value range between 1 preceding and current row) g, max(c_float) over (partition by key order by value range between 1 preceding and unbounded following) h, min(c_float) over (partition by key order by value range between 1 preceding and 1 following) i from cbo_t1) cbo_t1 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_4] (rows=20/20 width=64) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"] + PTF Operator [PTF_3] (rows=20/18 width=621) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col0"}] + Select Operator [SEL_2] (rows=20/20 width=621) + Output:["_col0","_col1","_col2","_col3"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:key + TableScan [TS_0] (rows=20/20 width=169) + default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["c_float","c_int","key","value"] + +PREHOOK: query: select *, rank() over(partition by key order by value) as rr from src1 +PREHOOK: type: QUERY +PREHOOK: Input: default@src1 +#### A masked pattern was here #### +POSTHOOK: query: select *, rank() over(partition by key order by value) as rr from src1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select *, rank() over(partition by key order by value) as rr from src1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select *, rank() over(partition by key order by value) as rr from src1 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_4] (rows=25/25 width=179) + Output:["_col0","_col1","_col2"] + PTF Operator [PTF_3] (rows=25/25 width=443) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col0"}] + Select Operator [SEL_2] (rows=25/25 width=443) + Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:key + TableScan [TS_0] (rows=25/25 width=175) + default@src1,src1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +#### A masked pattern was here #### +POSTHOOK: query: select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_20] + Group By Operator [GBY_18] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_17] + Group By Operator [GBY_16] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(_col0)","sum(_col1)"] + Select Operator [SEL_14] (rows=14/15 width=94) + Output:["_col0","_col1"] + Group By Operator [GBY_13] (rows=14/15 width=94) + Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0 + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_12] + PartitionCols:_col0 + Group By Operator [GBY_11] (rows=14/15 width=94) + Output:["_col0","_col1"],aggregations:["count(1)"],keys:_col0 + Merge Join Operator [MERGEJOIN_25] (rows=60/37 width=86) + Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col0"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=25/25 width=86) + Output:["_col0"] + Filter Operator [FIL_23] (rows=25/25 width=86) + predicate:key is not null + TableScan [TS_0] (rows=25/25 width=86) + default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Map 5 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=500/500 width=87) + Output:["_col0"] + Filter Operator [FIL_24] (rows=500/500 width=87) + predicate:key is not null + TableScan [TS_3] (rows=500/500 width=87) + default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +#### A masked pattern was here #### +POSTHOOK: query: select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_20] + Group By Operator [GBY_18] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_17] + Group By Operator [GBY_16] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(_col0)","sum(_col1)"] + Select Operator [SEL_14] (rows=14/15 width=94) + Output:["_col0","_col1"] + Group By Operator [GBY_13] (rows=14/15 width=94) + Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0 + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_12] + PartitionCols:_col0 + Group By Operator [GBY_11] (rows=14/15 width=94) + Output:["_col0","_col1"],aggregations:["count(1)"],keys:_col0 + Merge Join Operator [MERGEJOIN_25] (rows=60/37 width=86) + Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col0"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=25/25 width=86) + Output:["_col0"] + Filter Operator [FIL_23] (rows=25/25 width=86) + predicate:key is not null + TableScan [TS_0] (rows=25/25 width=86) + default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Map 5 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=500/500 width=87) + Output:["_col0"] + Filter Operator [FIL_24] (rows=500/500 width=87) + predicate:key is not null + TableScan [TS_3] (rows=500/500 width=87) + default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +#### A masked pattern was here #### +POSTHOOK: query: select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 2 <- Map 1 (BROADCAST_EDGE) +Reducer 3 <- Map 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_20] + Group By Operator [GBY_18] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_17] + Group By Operator [GBY_16] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(_col0)","sum(_col1)"] + Select Operator [SEL_14] (rows=14/15 width=94) + Output:["_col0","_col1"] + Group By Operator [GBY_13] (rows=14/15 width=94) + Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0 + <-Map 2 [SIMPLE_EDGE] + SHUFFLE [RS_12] + PartitionCols:_col0 + Group By Operator [GBY_11] (rows=14/15 width=94) + Output:["_col0","_col1"],aggregations:["count(1)"],keys:_col0 + Map Join Operator [MAPJOIN_25] (rows=60/37 width=86) + Conds:RS_6._col0=SEL_5._col0(Inner),HybridGraceHashJoin:true,Output:["_col0"] + <-Map 1 [BROADCAST_EDGE] + BROADCAST [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=25/25 width=86) + Output:["_col0"] + Filter Operator [FIL_23] (rows=25/25 width=86) + predicate:key is not null + TableScan [TS_0] (rows=25/25 width=86) + default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Select Operator [SEL_5] (rows=500/500 width=87) + Output:["_col0"] + Filter Operator [FIL_24] (rows=500/500 width=87) + predicate:key is not null + TableScan [TS_3] (rows=500/500 width=87) + default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x LEFT SEMI JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +#### A masked pattern was here #### +POSTHOOK: query: select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x LEFT SEMI JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x LEFT SEMI JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select SUM(HASH(tmp.key)), SUM(HASH(tmp.cnt)) +FROM (select x.key AS key, count(1) AS cnt + FROM src1 x LEFT SEMI JOIN src y ON (x.key = y.key) + GROUP BY x.key) tmp +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_22] + Group By Operator [GBY_20] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_19] + Group By Operator [GBY_18] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(_col0)","sum(_col1)"] + Select Operator [SEL_16] (rows=12/15 width=94) + Output:["_col0","_col1"] + Group By Operator [GBY_15] (rows=12/15 width=94) + Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0 + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_14] + PartitionCols:_col0 + Group By Operator [GBY_13] (rows=12/15 width=94) + Output:["_col0","_col1"],aggregations:["count(1)"],keys:_col0 + Merge Join Operator [MERGEJOIN_27] (rows=25/15 width=86) + Conds:RS_8._col0=RS_9._col0(Left Semi),Output:["_col0"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=25/25 width=86) + Output:["_col0"] + Filter Operator [FIL_25] (rows=25/25 width=86) + predicate:key is not null + TableScan [TS_0] (rows=25/25 width=86) + default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Map 5 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0 + Group By Operator [GBY_7] (rows=205/309 width=87) + Output:["_col0"],keys:_col0 + Select Operator [SEL_5] (rows=500/500 width=87) + Output:["_col0"] + Filter Operator [FIL_26] (rows=500/500 width=87) + predicate:key is not null + TableScan [TS_3] (rows=500/500 width=87) + default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: create table abcd (a int, b int, c int, d int) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@abcd +POSTHOOK: query: create table abcd (a int, b int, c int, d int) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@abcd +PREHOOK: query: explain analyze create table abcd (a int, b int, c int, d int) +PREHOOK: type: CREATETABLE +POSTHOOK: query: explain analyze create table abcd (a int, b int, c int, d int) +POSTHOOK: type: CREATETABLE +Stage-0 + Create Table Operator: + name:default.abcd + +PREHOOK: query: create table abcd (a int, b int, c int, d int) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@abcd +POSTHOOK: query: create table abcd (a int, b int, c int, d int) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@abcd +PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/in4.txt' INTO TABLE abcd +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@abcd +POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/in4.txt' INTO TABLE abcd +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@abcd +PREHOOK: query: select a, count(distinct b), count(distinct c), sum(d) from abcd group by a +PREHOOK: type: QUERY +PREHOOK: Input: default@abcd +#### A masked pattern was here #### +POSTHOOK: query: select a, count(distinct b), count(distinct c), sum(d) from abcd group by a +POSTHOOK: type: QUERY +POSTHOOK: Input: default@abcd +#### A masked pattern was here #### +PREHOOK: query: explain analyze select a, count(distinct b), count(distinct c), sum(d) from abcd group by a +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select a, count(distinct b), count(distinct c), sum(d) from abcd group by a +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Group By Operator [GBY_4] (rows=2/4 width=19) + Output:["_col0","_col1","_col2","_col3"],aggregations:["count(DISTINCT KEY._col1:0._col0)","count(DISTINCT KEY._col1:1._col0)","sum(VALUE._col2)"],keys:KEY._col0 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:_col0 + Group By Operator [GBY_2] (rows=4/7 width=19) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(DISTINCT b)","count(DISTINCT c)","sum(d)"],keys:a, b, c + Select Operator [SEL_1] (rows=4/7 width=19) + Output:["a","b","c","d"] + TableScan [TS_0] (rows=4/7 width=19) + default@abcd,abcd,Tbl:COMPLETE,Col:NONE,Output:["a","b","c","d"] + +PREHOOK: query: select a, count(distinct b), count(distinct c), sum(d) from abcd group by a +PREHOOK: type: QUERY +PREHOOK: Input: default@abcd +#### A masked pattern was here #### +POSTHOOK: query: select a, count(distinct b), count(distinct c), sum(d) from abcd group by a +POSTHOOK: type: QUERY +POSTHOOK: Input: default@abcd +#### A masked pattern was here #### +PREHOOK: query: explain analyze select a, count(distinct b), count(distinct c), sum(d) from abcd group by a +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select a, count(distinct b), count(distinct c), sum(d) from abcd group by a +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_5] + Group By Operator [GBY_3] (rows=2/4 width=19) + Output:["_col0","_col1","_col2","_col3"],aggregations:["count(DISTINCT KEY._col1:0._col0)","count(DISTINCT KEY._col1:1._col0)","sum(VALUE._col0)"],keys:KEY._col0 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:a + Select Operator [SEL_1] (rows=4/7 width=19) + Output:["a","b","c","d"] + TableScan [TS_0] (rows=4/7 width=19) + default@abcd,abcd,Tbl:COMPLETE,Col:NONE,Output:["a","b","c","d"] + +PREHOOK: query: create table src_rc_merge_test(key int, value string) stored as rcfile +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@src_rc_merge_test +POSTHOOK: query: create table src_rc_merge_test(key int, value string) stored as rcfile +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@src_rc_merge_test +PREHOOK: query: explain analyze create table src_rc_merge_test(key int, value string) stored as rcfile +PREHOOK: type: CREATETABLE +POSTHOOK: query: explain analyze create table src_rc_merge_test(key int, value string) stored as rcfile +POSTHOOK: type: CREATETABLE +Stage-0 + Create Table Operator: + name:default.src_rc_merge_test + +PREHOOK: query: create table src_rc_merge_test(key int, value string) stored as rcfile +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@src_rc_merge_test +POSTHOOK: query: create table src_rc_merge_test(key int, value string) stored as rcfile +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@src_rc_merge_test +PREHOOK: query: load data local inpath '../../data/files/smbbucket_1.rc' into table src_rc_merge_test +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@src_rc_merge_test +POSTHOOK: query: load data local inpath '../../data/files/smbbucket_1.rc' into table src_rc_merge_test +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@src_rc_merge_test +PREHOOK: query: create table tgt_rc_merge_test(key int, value string) stored as rcfile +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@tgt_rc_merge_test +POSTHOOK: query: create table tgt_rc_merge_test(key int, value string) stored as rcfile +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@tgt_rc_merge_test +PREHOOK: query: explain analyze create table tgt_rc_merge_test(key int, value string) stored as rcfile +PREHOOK: type: CREATETABLE +POSTHOOK: query: explain analyze create table tgt_rc_merge_test(key int, value string) stored as rcfile +POSTHOOK: type: CREATETABLE +Stage-0 + Create Table Operator: + name:default.tgt_rc_merge_test + +PREHOOK: query: create table tgt_rc_merge_test(key int, value string) stored as rcfile +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@tgt_rc_merge_test +POSTHOOK: query: create table tgt_rc_merge_test(key int, value string) stored as rcfile +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@tgt_rc_merge_test +PREHOOK: query: insert into table tgt_rc_merge_test select * from src_rc_merge_test +PREHOOK: type: QUERY +PREHOOK: Input: default@src_rc_merge_test +PREHOOK: Output: default@tgt_rc_merge_test +POSTHOOK: query: insert into table tgt_rc_merge_test select * from src_rc_merge_test +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_rc_merge_test +POSTHOOK: Output: default@tgt_rc_merge_test +POSTHOOK: Lineage: tgt_rc_merge_test.key SIMPLE [(src_rc_merge_test)src_rc_merge_test.FieldSchema(name:key, type:int, comment:null), ] +POSTHOOK: Lineage: tgt_rc_merge_test.value SIMPLE [(src_rc_merge_test)src_rc_merge_test.FieldSchema(name:value, type:string, comment:null), ] +PREHOOK: query: show table extended like `tgt_rc_merge_test` +PREHOOK: type: SHOW_TABLESTATUS +POSTHOOK: query: show table extended like `tgt_rc_merge_test` +POSTHOOK: type: SHOW_TABLESTATUS +tableName:tgt_rc_merge_test +#### A masked pattern was here #### +inputformat:org.apache.hadoop.hive.ql.io.RCFileInputFormat +outputformat:org.apache.hadoop.hive.ql.io.RCFileOutputFormat +columns:struct columns { i32 key, string value} +partitioned:false +partitionColumns: +totalNumberFiles:1 +totalFileSize:171 +maxFileSize:171 +minFileSize:171 +#### A masked pattern was here #### + +PREHOOK: query: select count(1) from tgt_rc_merge_test +PREHOOK: type: QUERY +PREHOOK: Input: default@tgt_rc_merge_test +#### A masked pattern was here #### +POSTHOOK: query: select count(1) from tgt_rc_merge_test +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tgt_rc_merge_test +#### A masked pattern was here #### +PREHOOK: query: explain analyze select count(1) from tgt_rc_merge_test +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select count(1) from tgt_rc_merge_test +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Group By Operator [GBY_4] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(1)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + Select Operator [SEL_1] (rows=5/5 width=6) + TableScan [TS_0] (rows=5/5 width=6) + default@tgt_rc_merge_test,tgt_rc_merge_test,Tbl:COMPLETE,Col:COMPLETE + +PREHOOK: query: select sum(hash(key)), sum(hash(value)) from tgt_rc_merge_test +PREHOOK: type: QUERY +PREHOOK: Input: default@tgt_rc_merge_test +#### A masked pattern was here #### +POSTHOOK: query: select sum(hash(key)), sum(hash(value)) from tgt_rc_merge_test +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tgt_rc_merge_test +#### A masked pattern was here #### +PREHOOK: query: explain analyze select sum(hash(key)), sum(hash(value)) from tgt_rc_merge_test +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select sum(hash(key)), sum(hash(value)) from tgt_rc_merge_test +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Group By Operator [GBY_4] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + Select Operator [SEL_1] (rows=5/5 width=6) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=5/5 width=6) + default@tgt_rc_merge_test,tgt_rc_merge_test,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: alter table tgt_rc_merge_test concatenate +PREHOOK: type: ALTER_TABLE_MERGE +PREHOOK: Input: default@tgt_rc_merge_test +PREHOOK: Output: default@tgt_rc_merge_test +POSTHOOK: query: alter table tgt_rc_merge_test concatenate +POSTHOOK: type: ALTER_TABLE_MERGE +POSTHOOK: Input: default@tgt_rc_merge_test +POSTHOOK: Output: default@tgt_rc_merge_test +PREHOOK: query: show table extended like `tgt_rc_merge_test` +PREHOOK: type: SHOW_TABLESTATUS +POSTHOOK: query: show table extended like `tgt_rc_merge_test` +POSTHOOK: type: SHOW_TABLESTATUS +tableName:tgt_rc_merge_test +#### A masked pattern was here #### +inputformat:org.apache.hadoop.hive.ql.io.RCFileInputFormat +outputformat:org.apache.hadoop.hive.ql.io.RCFileOutputFormat +columns:struct columns { i32 key, string value} +partitioned:false +partitionColumns: +totalNumberFiles:1 +totalFileSize:171 +maxFileSize:171 +minFileSize:171 +#### A masked pattern was here #### + +PREHOOK: query: select count(1) from tgt_rc_merge_test +PREHOOK: type: QUERY +PREHOOK: Input: default@tgt_rc_merge_test +#### A masked pattern was here #### +POSTHOOK: query: select count(1) from tgt_rc_merge_test +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tgt_rc_merge_test +#### A masked pattern was here #### +PREHOOK: query: explain analyze select count(1) from tgt_rc_merge_test +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select count(1) from tgt_rc_merge_test +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Group By Operator [GBY_4] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(1)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + Select Operator [SEL_1] (rows=5/5 width=6) + TableScan [TS_0] (rows=5/5 width=6) + default@tgt_rc_merge_test,tgt_rc_merge_test,Tbl:COMPLETE,Col:COMPLETE + +PREHOOK: query: select sum(hash(key)), sum(hash(value)) from tgt_rc_merge_test +PREHOOK: type: QUERY +PREHOOK: Input: default@tgt_rc_merge_test +#### A masked pattern was here #### +POSTHOOK: query: select sum(hash(key)), sum(hash(value)) from tgt_rc_merge_test +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tgt_rc_merge_test +#### A masked pattern was here #### +PREHOOK: query: explain analyze select sum(hash(key)), sum(hash(value)) from tgt_rc_merge_test +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select sum(hash(key)), sum(hash(value)) from tgt_rc_merge_test +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Group By Operator [GBY_4] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + Select Operator [SEL_1] (rows=5/5 width=6) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=5/5 width=6) + default@tgt_rc_merge_test,tgt_rc_merge_test,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: drop table src_rc_merge_test +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@src_rc_merge_test +PREHOOK: Output: default@src_rc_merge_test +POSTHOOK: query: drop table src_rc_merge_test +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@src_rc_merge_test +POSTHOOK: Output: default@src_rc_merge_test +PREHOOK: query: drop table tgt_rc_merge_test +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@tgt_rc_merge_test +PREHOOK: Output: default@tgt_rc_merge_test +POSTHOOK: query: drop table tgt_rc_merge_test +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@tgt_rc_merge_test +POSTHOOK: Output: default@tgt_rc_merge_test +PREHOOK: query: select src.key from src cross join src src2 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select src.key from src cross join src src2 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze select src.key from src cross join src src2 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select src.key from src cross join src src2 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_8] + Merge Join Operator [MERGEJOIN_9] (rows=250000/250000 width=87) + Conds:(Inner),Output:["_col0"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_4] + Select Operator [SEL_1] (rows=500/500 width=87) + Output:["_col0"] + TableScan [TS_0] (rows=500/500 width=87) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_5] + Select Operator [SEL_3] (rows=500/500 width=4) + TableScan [TS_2] (rows=500/500 width=10) + default@src,src2,Tbl:COMPLETE,Col:COMPLETE + +PREHOOK: query: create table nzhang_Tmp(a int, b string) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@nzhang_Tmp +POSTHOOK: query: create table nzhang_Tmp(a int, b string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@nzhang_Tmp +PREHOOK: query: explain analyze create table nzhang_Tmp(a int, b string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: explain analyze create table nzhang_Tmp(a int, b string) +POSTHOOK: type: CREATETABLE +Stage-0 + Create Table Operator: + name:default.nzhang_Tmp + +PREHOOK: query: create table nzhang_Tmp(a int, b string) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@nzhang_Tmp +POSTHOOK: query: create table nzhang_Tmp(a int, b string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@nzhang_Tmp +PREHOOK: query: create table nzhang_CTAS1 as select key k, value from src sort by k, value limit 10 +PREHOOK: type: CREATETABLE_AS_SELECT +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@nzhang_CTAS1 +POSTHOOK: query: create table nzhang_CTAS1 as select key k, value from src sort by k, value limit 10 +POSTHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@nzhang_CTAS1 +PREHOOK: query: explain analyze create table nzhang_CTAS1 as select key k, value from src sort by k, value limit 10 +PREHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: query: explain analyze create table nzhang_CTAS1 as select key k, value from src sort by k, value limit 10 +POSTHOOK: type: CREATETABLE_AS_SELECT +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-3 + Stats-Aggr Operator + Stage-4 + Create Table Operator: + name:default.nzhang_CTAS1 + Stage-2 + Dependency Collection{} + Stage-1 + Reducer 3 + File Output Operator [FS_8] + table:{"name:":"default.nzhang_CTAS1"} + Limit [LIM_7] (rows=10/10 width=178) + Number of rows:10 + Select Operator [SEL_6] (rows=10/10 width=178) + Output:["_col0","_col1"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_5] + Limit [LIM_4] (rows=10/10 width=178) + Number of rows:10 + Select Operator [SEL_3] (rows=500/10 width=178) + Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + Select Operator [SEL_1] (rows=500/500 width=178) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + Stage-0 + Move Operator + Please refer to the previous Stage-1 + +PREHOOK: query: create table nzhang_CTAS1 as select key k, value from src sort by k, value limit 10 +PREHOOK: type: CREATETABLE_AS_SELECT +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@nzhang_CTAS1 +POSTHOOK: query: create table nzhang_CTAS1 as select key k, value from src sort by k, value limit 10 +POSTHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@nzhang_CTAS1 +POSTHOOK: Lineage: nzhang_ctas1.k SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: nzhang_ctas1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: create table nzhang_ctas3 row format serde "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" stored as RCFile as select key/2 half_key, concat(value, "_con") conb from src sort by half_key, conb limit 10 +PREHOOK: type: CREATETABLE_AS_SELECT +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@nzhang_ctas3 +POSTHOOK: query: create table nzhang_ctas3 row format serde "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" stored as RCFile as select key/2 half_key, concat(value, "_con") conb from src sort by half_key, conb limit 10 +POSTHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@nzhang_ctas3 +PREHOOK: query: explain analyze create table nzhang_ctas3 row format serde "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" stored as RCFile as select key/2 half_key, concat(value, "_con") conb from src sort by half_key, conb limit 10 +PREHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: query: explain analyze create table nzhang_ctas3 row format serde "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" stored as RCFile as select key/2 half_key, concat(value, "_con") conb from src sort by half_key, conb limit 10 +POSTHOOK: type: CREATETABLE_AS_SELECT +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-3 + Stats-Aggr Operator + Stage-4 + Create Table Operator: + name:default.nzhang_ctas3 + Stage-2 + Dependency Collection{} + Stage-1 + Reducer 3 + File Output Operator [FS_8] + table:{"name:":"default.nzhang_ctas3"} + Limit [LIM_7] (rows=10/10 width=192) + Number of rows:10 + Select Operator [SEL_6] (rows=10/10 width=192) + Output:["_col0","_col1"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_5] + Limit [LIM_4] (rows=10/10 width=192) + Number of rows:10 + Select Operator [SEL_3] (rows=500/10 width=192) + Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + Select Operator [SEL_1] (rows=500/500 width=192) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + Stage-0 + Move Operator + Please refer to the previous Stage-1 + +PREHOOK: query: create table nzhang_ctas3 row format serde "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" stored as RCFile as select key/2 half_key, concat(value, "_con") conb from src sort by half_key, conb limit 10 +PREHOOK: type: CREATETABLE_AS_SELECT +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@nzhang_ctas3 +POSTHOOK: query: create table nzhang_ctas3 row format serde "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" stored as RCFile as select key/2 half_key, concat(value, "_con") conb from src sort by half_key, conb limit 10 +POSTHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@nzhang_ctas3 +POSTHOOK: Lineage: nzhang_ctas3.conb EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: nzhang_ctas3.half_key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +PREHOOK: query: create table if not exists nzhang_ctas3 as select key, value from src sort by key, value limit 2 +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table if not exists nzhang_ctas3 as select key, value from src sort by key, value limit 2 +POSTHOOK: type: CREATETABLE +PREHOOK: query: explain analyze create table if not exists nzhang_ctas3 as select key, value from src sort by key, value limit 2 +PREHOOK: type: CREATETABLE +POSTHOOK: query: explain analyze create table if not exists nzhang_ctas3 as select key, value from src sort by key, value limit 2 +POSTHOOK: type: CREATETABLE + +PREHOOK: query: create table if not exists nzhang_ctas3 as select key, value from src sort by key, value limit 2 +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table if not exists nzhang_ctas3 as select key, value from src sort by key, value limit 2 +POSTHOOK: type: CREATETABLE +PREHOOK: query: create temporary table acid_dtt(a int, b varchar(128)) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@acid_dtt +POSTHOOK: query: create temporary table acid_dtt(a int, b varchar(128)) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@acid_dtt +PREHOOK: query: explain analyze create temporary table acid_dtt(a int, b varchar(128)) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +PREHOOK: type: CREATETABLE +POSTHOOK: query: explain analyze create temporary table acid_dtt(a int, b varchar(128)) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +POSTHOOK: type: CREATETABLE +Stage-0 + Create Table Operator: + name:default.acid_dtt + +PREHOOK: query: create temporary table acid_dtt(a int, b varchar(128)) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@acid_dtt +POSTHOOK: query: create temporary table acid_dtt(a int, b varchar(128)) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@acid_dtt +PREHOOK: query: select src1.key as k1, src1.value as v1, + src2.key as k2, src2.value as v2 FROM + (select * FROM src WHERE src.key < 10) src1 + JOIN + (select * FROM src WHERE src.key < 10) src2 + SORT BY k1, v1, k2, v2 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select src1.key as k1, src1.value as v1, + src2.key as k2, src2.value as v2 FROM + (select * FROM src WHERE src.key < 10) src1 + JOIN + (select * FROM src WHERE src.key < 10) src2 + SORT BY k1, v1, k2, v2 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select src1.key as k1, src1.value as v1, + src2.key as k2, src2.value as v2 FROM + (select * FROM src WHERE src.key < 10) src1 + JOIN + (select * FROM src WHERE src.key < 10) src2 + SORT BY k1, v1, k2, v2 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select src1.key as k1, src1.value as v1, + src2.key as k2, src2.value as v2 FROM + (select * FROM src WHERE src.key < 10) src1 + JOIN + (select * FROM src WHERE src.key < 10) src2 + SORT BY k1, v1, k2, v2 +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_12] + Select Operator [SEL_11] (rows=27556/100 width=356) + Output:["_col0","_col1","_col2","_col3"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_10] + Merge Join Operator [MERGEJOIN_15] (rows=27556/100 width=356) + Conds:(Inner),Output:["_col0","_col1","_col2","_col3"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + Select Operator [SEL_2] (rows=166/10 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_13] (rows=166/10 width=178) + predicate:(key < 10) + TableScan [TS_0] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_7] + Select Operator [SEL_5] (rows=166/10 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_14] (rows=166/10 width=178) + predicate:(key < 10) + TableScan [TS_3] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: CREATE TABLE myinput1(key int, value int) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@myinput1 +POSTHOOK: query: CREATE TABLE myinput1(key int, value int) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@myinput1 +PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/in8.txt' INTO TABLE myinput1 +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@myinput1 +POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/in8.txt' INTO TABLE myinput1 +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@myinput1 +PREHOOK: query: select * from myinput1 a join myinput1 b on a.key<=>b.value +PREHOOK: type: QUERY +PREHOOK: Input: default@myinput1 +#### A masked pattern was here #### +POSTHOOK: query: select * from myinput1 a join myinput1 b on a.key<=>b.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@myinput1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_5] (rows=3/11 width=9) + Output:["_col0","_col1","_col2","_col3"] + Merge Join Operator [MERGEJOIN_7] (rows=3/11 width=9) + Conds:RS_2.key=RS_3.value(Inner),Output:["_col0","_col1","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:key + TableScan [TS_0] (rows=3/6 width=8) + default@myinput1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:value + TableScan [TS_1] (rows=3/6 width=8) + default@myinput1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select * from myinput1 a join myinput1 b on a.key<=>b.value join myinput1 c on a.key=c.key +PREHOOK: type: QUERY +PREHOOK: Input: default@myinput1 +#### A masked pattern was here #### +POSTHOOK: query: select * from myinput1 a join myinput1 b on a.key<=>b.value join myinput1 c on a.key=c.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@myinput1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value join myinput1 c on a.key=c.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value join myinput1 c on a.key=c.key +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_11] + Select Operator [SEL_10] (rows=6/2 width=9) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + Merge Join Operator [MERGEJOIN_21] (rows=6/2 width=9) + Conds:RS_4.key=RS_6.value(Inner),RS_4.key=RS_8.key(Inner),Output:["_col0","_col1","_col5","_col6","_col10","_col11"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:key + Filter Operator [FIL_18] (rows=3/3 width=8) + predicate:key is not null + TableScan [TS_0] (rows=3/6 width=8) + default@myinput1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:value + Filter Operator [FIL_19] (rows=3/3 width=8) + predicate:value is not null + TableScan [TS_1] (rows=3/6 width=8) + default@myinput1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:key + Filter Operator [FIL_20] (rows=3/3 width=8) + predicate:key is not null + TableScan [TS_2] (rows=3/6 width=8) + default@myinput1,c,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select * from myinput1 a join myinput1 b on a.key<=>b.value join myinput1 c on a.key<=>c.key +PREHOOK: type: QUERY +PREHOOK: Input: default@myinput1 +#### A masked pattern was here #### +POSTHOOK: query: select * from myinput1 a join myinput1 b on a.key<=>b.value join myinput1 c on a.key<=>c.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@myinput1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value join myinput1 c on a.key<=>c.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value join myinput1 c on a.key<=>c.key +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_8] + Select Operator [SEL_7] (rows=6/29 width=9) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + Merge Join Operator [MERGEJOIN_9] (rows=6/29 width=9) + Conds:RS_3.key=RS_4.value(Inner),RS_3.key=RS_5.key(Inner),Output:["_col0","_col1","_col5","_col6","_col10","_col11"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:key + TableScan [TS_0] (rows=3/6 width=8) + default@myinput1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:value + TableScan [TS_1] (rows=3/6 width=8) + default@myinput1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_5] + PartitionCols:key + TableScan [TS_2] (rows=3/6 width=8) + default@myinput1,c,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select * from myinput1 a join myinput1 b on a.key<=>b.value AND a.value=b.key join myinput1 c on a.key<=>c.key AND a.value=c.value +PREHOOK: type: QUERY +PREHOOK: Input: default@myinput1 +#### A masked pattern was here #### +POSTHOOK: query: select * from myinput1 a join myinput1 b on a.key<=>b.value AND a.value=b.key join myinput1 c on a.key<=>c.key AND a.value=c.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@myinput1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value AND a.value=b.key join myinput1 c on a.key<=>c.key AND a.value=c.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value AND a.value=b.key join myinput1 c on a.key<=>c.key AND a.value=c.value +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_11] + Select Operator [SEL_10] (rows=6/2 width=9) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + Merge Join Operator [MERGEJOIN_15] (rows=6/2 width=9) + Conds:RS_4.key, value=RS_6.value, key(Inner),RS_4.key, value=RS_8.key, value(Inner),Output:["_col0","_col1","_col5","_col6","_col10","_col11"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:key, value + Filter Operator [FIL_12] (rows=3/3 width=8) + predicate:value is not null + TableScan [TS_0] (rows=3/6 width=8) + default@myinput1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:value, key + Filter Operator [FIL_13] (rows=3/3 width=8) + predicate:key is not null + TableScan [TS_1] (rows=3/6 width=8) + default@myinput1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:key, value + Filter Operator [FIL_14] (rows=3/3 width=8) + predicate:value is not null + TableScan [TS_2] (rows=3/6 width=8) + default@myinput1,c,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select * from myinput1 a join myinput1 b on a.key<=>b.value AND a.value<=>b.key join myinput1 c on a.key<=>c.key AND a.value<=>c.value +PREHOOK: type: QUERY +PREHOOK: Input: default@myinput1 +#### A masked pattern was here #### +POSTHOOK: query: select * from myinput1 a join myinput1 b on a.key<=>b.value AND a.value<=>b.key join myinput1 c on a.key<=>c.key AND a.value<=>c.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@myinput1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value AND a.value<=>b.key join myinput1 c on a.key<=>c.key AND a.value<=>c.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * from myinput1 a join myinput1 b on a.key<=>b.value AND a.value<=>b.key join myinput1 c on a.key<=>c.key AND a.value<=>c.value +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_8] + Select Operator [SEL_7] (rows=6/4 width=9) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + Merge Join Operator [MERGEJOIN_9] (rows=6/4 width=9) + Conds:RS_3.key, value=RS_4.value, key(Inner),RS_3.key, value=RS_5.key, value(Inner),Output:["_col0","_col1","_col5","_col6","_col10","_col11"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:key, value + TableScan [TS_0] (rows=3/6 width=8) + default@myinput1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:value, key + TableScan [TS_1] (rows=3/6 width=8) + default@myinput1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_5] + PartitionCols:key, value + TableScan [TS_2] (rows=3/6 width=8) + default@myinput1,c,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select * FROM myinput1 a LEFT OUTER JOIN myinput1 b ON a.key<=>b.value +PREHOOK: type: QUERY +PREHOOK: Input: default@myinput1 +#### A masked pattern was here #### +POSTHOOK: query: select * FROM myinput1 a LEFT OUTER JOIN myinput1 b ON a.key<=>b.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@myinput1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * FROM myinput1 a LEFT OUTER JOIN myinput1 b ON a.key<=>b.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * FROM myinput1 a LEFT OUTER JOIN myinput1 b ON a.key<=>b.value +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_5] (rows=3/12 width=9) + Output:["_col0","_col1","_col2","_col3"] + Merge Join Operator [MERGEJOIN_7] (rows=3/12 width=9) + Conds:RS_2.key=RS_3.value(Left Outer),Output:["_col0","_col1","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:key + TableScan [TS_0] (rows=3/6 width=8) + default@myinput1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:value + TableScan [TS_1] (rows=3/6 width=8) + default@myinput1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select * FROM myinput1 a RIGHT OUTER JOIN myinput1 b ON a.key<=>b.value +PREHOOK: type: QUERY +PREHOOK: Input: default@myinput1 +#### A masked pattern was here #### +POSTHOOK: query: select * FROM myinput1 a RIGHT OUTER JOIN myinput1 b ON a.key<=>b.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@myinput1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * FROM myinput1 a RIGHT OUTER JOIN myinput1 b ON a.key<=>b.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * FROM myinput1 a RIGHT OUTER JOIN myinput1 b ON a.key<=>b.value +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_5] (rows=3/12 width=9) + Output:["_col0","_col1","_col2","_col3"] + Merge Join Operator [MERGEJOIN_7] (rows=3/12 width=9) + Conds:RS_2.key=RS_3.value(Right Outer),Output:["_col0","_col1","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:key + TableScan [TS_0] (rows=3/6 width=8) + default@myinput1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:value + TableScan [TS_1] (rows=3/6 width=8) + default@myinput1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select * FROM myinput1 a FULL OUTER JOIN myinput1 b ON a.key<=>b.value +PREHOOK: type: QUERY +PREHOOK: Input: default@myinput1 +#### A masked pattern was here #### +POSTHOOK: query: select * FROM myinput1 a FULL OUTER JOIN myinput1 b ON a.key<=>b.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@myinput1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select * FROM myinput1 a FULL OUTER JOIN myinput1 b ON a.key<=>b.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select * FROM myinput1 a FULL OUTER JOIN myinput1 b ON a.key<=>b.value +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_5] (rows=3/13 width=9) + Output:["_col0","_col1","_col2","_col3"] + Merge Join Operator [MERGEJOIN_7] (rows=3/13 width=9) + Conds:RS_2.key=RS_3.value(Outer),Output:["_col0","_col1","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:key + TableScan [TS_0] (rows=3/6 width=8) + default@myinput1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:value + TableScan [TS_1] (rows=3/6 width=8) + default@myinput1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select /*+ MAPJOIN(b) */ * FROM myinput1 a JOIN myinput1 b ON a.key<=>b.value +PREHOOK: type: QUERY +PREHOOK: Input: default@myinput1 +#### A masked pattern was here #### +POSTHOOK: query: select /*+ MAPJOIN(b) */ * FROM myinput1 a JOIN myinput1 b ON a.key<=>b.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@myinput1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select /*+ MAPJOIN(b) */ * FROM myinput1 a JOIN myinput1 b ON a.key<=>b.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select /*+ MAPJOIN(b) */ * FROM myinput1 a JOIN myinput1 b ON a.key<=>b.value +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_5] (rows=3/11 width=9) + Output:["_col0","_col1","_col2","_col3"] + Merge Join Operator [MERGEJOIN_7] (rows=3/11 width=9) + Conds:RS_2.key=RS_3.value(Inner),Output:["_col0","_col1","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:key + TableScan [TS_0] (rows=3/6 width=8) + default@myinput1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:value + TableScan [TS_1] (rows=3/6 width=8) + default@myinput1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: CREATE TABLE smb_input(key int, value int) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@smb_input +POSTHOOK: query: CREATE TABLE smb_input(key int, value int) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@smb_input +PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/in4.txt' into table smb_input +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@smb_input +POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/in4.txt' into table smb_input +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@smb_input +PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/in5.txt' into table smb_input +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@smb_input +POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/in5.txt' into table smb_input +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@smb_input +PREHOOK: query: CREATE TABLE smb_input1(key int, value int) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@smb_input1 +POSTHOOK: query: CREATE TABLE smb_input1(key int, value int) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@smb_input1 +PREHOOK: query: CREATE TABLE smb_input2(key int, value int) CLUSTERED BY (value) SORTED BY (value) INTO 2 BUCKETS +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@smb_input2 +POSTHOOK: query: CREATE TABLE smb_input2(key int, value int) CLUSTERED BY (value) SORTED BY (value) INTO 2 BUCKETS +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@smb_input2 +PREHOOK: query: from smb_input +insert overwrite table smb_input1 select * +insert overwrite table smb_input2 select * +PREHOOK: type: QUERY +PREHOOK: Input: default@smb_input +PREHOOK: Output: default@smb_input1 +PREHOOK: Output: default@smb_input2 +POSTHOOK: query: from smb_input +insert overwrite table smb_input1 select * +insert overwrite table smb_input2 select * +POSTHOOK: type: QUERY +POSTHOOK: Input: default@smb_input +POSTHOOK: Output: default@smb_input1 +POSTHOOK: Output: default@smb_input2 +POSTHOOK: Lineage: smb_input1.key SIMPLE [(smb_input)smb_input.FieldSchema(name:key, type:int, comment:null), ] +POSTHOOK: Lineage: smb_input1.value SIMPLE [(smb_input)smb_input.FieldSchema(name:value, type:int, comment:null), ] +POSTHOOK: Lineage: smb_input2.key SIMPLE [(smb_input)smb_input.FieldSchema(name:key, type:int, comment:null), ] +POSTHOOK: Lineage: smb_input2.value SIMPLE [(smb_input)smb_input.FieldSchema(name:value, type:int, comment:null), ] +PREHOOK: query: analyze table smb_input1 compute statistics +PREHOOK: type: QUERY +PREHOOK: Input: default@smb_input1 +PREHOOK: Output: default@smb_input1 +POSTHOOK: query: analyze table smb_input1 compute statistics +POSTHOOK: type: QUERY +POSTHOOK: Input: default@smb_input1 +POSTHOOK: Output: default@smb_input1 +PREHOOK: query: select /*+ MAPJOIN(a) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key +PREHOOK: type: QUERY +PREHOOK: Input: default@smb_input1 +#### A masked pattern was here #### +POSTHOOK: query: select /*+ MAPJOIN(a) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@smb_input1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select /*+ MAPJOIN(a) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select /*+ MAPJOIN(a) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_5] (rows=28/54 width=7) + Output:["_col0","_col1","_col2","_col3"] + Merge Join Operator [MERGEJOIN_7] (rows=28/54 width=7) + Conds:RS_2.key=RS_3.key(Inner),Output:["_col0","_col1","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:key + TableScan [TS_0] (rows=26/26 width=7) + default@smb_input1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:key + TableScan [TS_1] (rows=26/26 width=7) + default@smb_input1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select /*+ MAPJOIN(a) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key AND a.value <=> b.value +PREHOOK: type: QUERY +PREHOOK: Input: default@smb_input1 +#### A masked pattern was here #### +POSTHOOK: query: select /*+ MAPJOIN(a) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key AND a.value <=> b.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@smb_input1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select /*+ MAPJOIN(a) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key AND a.value <=> b.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select /*+ MAPJOIN(a) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key AND a.value <=> b.value +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_5] (rows=28/42 width=7) + Output:["_col0","_col1","_col2","_col3"] + Merge Join Operator [MERGEJOIN_7] (rows=28/42 width=7) + Conds:RS_2.key, value=RS_3.key, value(Inner),Output:["_col0","_col1","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:key, value + TableScan [TS_0] (rows=26/26 width=7) + default@smb_input1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:key, value + TableScan [TS_1] (rows=26/26 width=7) + default@smb_input1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select /*+ MAPJOIN(a) */ * FROM smb_input1 a RIGHT OUTER JOIN smb_input1 b ON a.key <=> b.key +PREHOOK: type: QUERY +PREHOOK: Input: default@smb_input1 +#### A masked pattern was here #### +POSTHOOK: query: select /*+ MAPJOIN(a) */ * FROM smb_input1 a RIGHT OUTER JOIN smb_input1 b ON a.key <=> b.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@smb_input1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select /*+ MAPJOIN(a) */ * FROM smb_input1 a RIGHT OUTER JOIN smb_input1 b ON a.key <=> b.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select /*+ MAPJOIN(a) */ * FROM smb_input1 a RIGHT OUTER JOIN smb_input1 b ON a.key <=> b.key +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_5] (rows=28/54 width=7) + Output:["_col0","_col1","_col2","_col3"] + Merge Join Operator [MERGEJOIN_7] (rows=28/54 width=7) + Conds:RS_2.key=RS_3.key(Right Outer),Output:["_col0","_col1","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:key + TableScan [TS_0] (rows=26/26 width=7) + default@smb_input1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:key + TableScan [TS_1] (rows=26/26 width=7) + default@smb_input1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select /*+ MAPJOIN(b) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key +PREHOOK: type: QUERY +PREHOOK: Input: default@smb_input1 +#### A masked pattern was here #### +POSTHOOK: query: select /*+ MAPJOIN(b) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@smb_input1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select /*+ MAPJOIN(b) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select /*+ MAPJOIN(b) */ * FROM smb_input1 a JOIN smb_input1 b ON a.key <=> b.key +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_5] (rows=28/54 width=7) + Output:["_col0","_col1","_col2","_col3"] + Merge Join Operator [MERGEJOIN_7] (rows=28/54 width=7) + Conds:RS_2.key=RS_3.key(Inner),Output:["_col0","_col1","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:key + TableScan [TS_0] (rows=26/26 width=7) + default@smb_input1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:key + TableScan [TS_1] (rows=26/26 width=7) + default@smb_input1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select /*+ MAPJOIN(b) */ * FROM smb_input1 a LEFT OUTER JOIN smb_input1 b ON a.key <=> b.key +PREHOOK: type: QUERY +PREHOOK: Input: default@smb_input1 +#### A masked pattern was here #### +POSTHOOK: query: select /*+ MAPJOIN(b) */ * FROM smb_input1 a LEFT OUTER JOIN smb_input1 b ON a.key <=> b.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@smb_input1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select /*+ MAPJOIN(b) */ * FROM smb_input1 a LEFT OUTER JOIN smb_input1 b ON a.key <=> b.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select /*+ MAPJOIN(b) */ * FROM smb_input1 a LEFT OUTER JOIN smb_input1 b ON a.key <=> b.key +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Less_than_equal_greater_than]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_6] + Select Operator [SEL_5] (rows=28/54 width=7) + Output:["_col0","_col1","_col2","_col3"] + Merge Join Operator [MERGEJOIN_7] (rows=28/54 width=7) + Conds:RS_2.key=RS_3.key(Left Outer),Output:["_col0","_col1","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:key + TableScan [TS_0] (rows=26/26 width=7) + default@smb_input1,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:key + TableScan [TS_1] (rows=26/26 width=7) + default@smb_input1,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: drop table sales +PREHOOK: type: DROPTABLE +POSTHOOK: query: drop table sales +POSTHOOK: type: DROPTABLE +PREHOOK: query: drop table things +PREHOOK: type: DROPTABLE +POSTHOOK: query: drop table things +POSTHOOK: type: DROPTABLE +PREHOOK: query: CREATE TABLE sales (name STRING, id INT) +ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@sales +POSTHOOK: query: CREATE TABLE sales (name STRING, id INT) +ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@sales +PREHOOK: query: CREATE TABLE things (id INT, name STRING) partitioned by (ds string) +ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@things +POSTHOOK: query: CREATE TABLE things (id INT, name STRING) partitioned by (ds string) +ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@things +PREHOOK: query: load data local inpath '../../data/files/sales.txt' INTO TABLE sales +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@sales +POSTHOOK: query: load data local inpath '../../data/files/sales.txt' INTO TABLE sales +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@sales +PREHOOK: query: load data local inpath '../../data/files/things.txt' INTO TABLE things partition(ds='2011-10-23') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@things +POSTHOOK: query: load data local inpath '../../data/files/things.txt' INTO TABLE things partition(ds='2011-10-23') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@things +POSTHOOK: Output: default@things@ds=2011-10-23 +PREHOOK: query: load data local inpath '../../data/files/things2.txt' INTO TABLE things partition(ds='2011-10-24') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@things +POSTHOOK: query: load data local inpath '../../data/files/things2.txt' INTO TABLE things partition(ds='2011-10-24') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@things +POSTHOOK: Output: default@things@ds=2011-10-24 +PREHOOK: query: select name,id FROM sales LEFT SEMI JOIN things ON (sales.id = things.id) +PREHOOK: type: QUERY +PREHOOK: Input: default@sales +PREHOOK: Input: default@things +PREHOOK: Input: default@things@ds=2011-10-23 +PREHOOK: Input: default@things@ds=2011-10-24 +#### A masked pattern was here #### +POSTHOOK: query: select name,id FROM sales LEFT SEMI JOIN things ON (sales.id = things.id) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@sales +POSTHOOK: Input: default@things +POSTHOOK: Input: default@things@ds=2011-10-23 +POSTHOOK: Input: default@things@ds=2011-10-24 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select name,id FROM sales LEFT SEMI JOIN things ON (sales.id = things.id) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select name,id FROM sales LEFT SEMI JOIN things ON (sales.id = things.id) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_12] + Merge Join Operator [MERGEJOIN_17] (rows=2/2 width=15) + Conds:RS_8._col1=RS_9._col0(Left Semi),Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:_col1 + Select Operator [SEL_2] (rows=1/2 width=13) + Output:["_col0","_col1"] + Filter Operator [FIL_15] (rows=1/2 width=13) + predicate:id is not null + TableScan [TS_0] (rows=1/2 width=13) + default@sales,sales,Tbl:COMPLETE,Col:NONE,Output:["name","id"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0 + Group By Operator [GBY_7] (rows=2/1 width=14) + Output:["_col0"],keys:_col0 + Select Operator [SEL_5] (rows=2/2 width=14) + Output:["_col0"] + Filter Operator [FIL_16] (rows=2/2 width=14) + predicate:id is not null + TableScan [TS_3] (rows=2/2 width=14) + default@things,things,Tbl:COMPLETE,Col:NONE,Output:["id"] + +PREHOOK: query: drop table sales +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@sales +PREHOOK: Output: default@sales +POSTHOOK: query: drop table sales +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@sales +POSTHOOK: Output: default@sales +PREHOOK: query: drop table things +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@things +PREHOOK: Output: default@things +POSTHOOK: query: drop table things +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@things +POSTHOOK: Output: default@things +PREHOOK: query: select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) where srcpart.value > 'val_450' +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Input: default@srcpart +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 +PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 +#### A masked pattern was here #### +POSTHOOK: query: select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) where srcpart.value > 'val_450' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Input: default@srcpart +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 +POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) where srcpart.value > 'val_450' +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) where srcpart.value > 'val_450' +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Map 2 (BROADCAST_EDGE), Map 3 (BROADCAST_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Map 1 + File Output Operator [FS_16] + Map Join Operator [MAPJOIN_26] (rows=805/20 width=10) + Conds:MAPJOIN_25._col1=RS_13._col0(Inner),HybridGraceHashJoin:true,Output:["_col0"] + <-Map 3 [BROADCAST_EDGE] + BROADCAST [RS_13] + PartitionCols:_col0 + Select Operator [SEL_8] (rows=166/110 width=10) + Output:["_col0"] + Filter Operator [FIL_24] (rows=166/110 width=10) + predicate:(value > 'val_450') + TableScan [TS_6] (rows=500/500 width=10) + default@src,src,Tbl:COMPLETE,Col:NONE,Output:["value"] + <-Map Join Operator [MAPJOIN_25] (rows=732/12 width=10) + Conds:SEL_2._col0=RS_10._col0(Inner),HybridGraceHashJoin:true,Output:["_col0","_col1"] + <-Map 2 [BROADCAST_EDGE] + BROADCAST [RS_10] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=25/25 width=7) + Output:["_col0"] + Filter Operator [FIL_23] (rows=25/25 width=7) + predicate:key is not null + TableScan [TS_3] (rows=25/25 width=7) + default@src1,src1,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Select Operator [SEL_2] (rows=666/440 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_22] (rows=666/440 width=10) + predicate:((value > 'val_450') and key is not null) + TableScan [TS_0] (rows=2000/2000 width=10) + default@srcpart,srcpart,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) where srcpart.value > 'val_450' +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Input: default@srcpart +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 +PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 +#### A masked pattern was here #### +POSTHOOK: query: select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) where srcpart.value > 'val_450' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Input: default@srcpart +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 +POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) where srcpart.value > 'val_450' +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select srcpart.key from srcpart join src on (srcpart.value=src.value) join src1 on (srcpart.key=src1.key) where srcpart.value > 'val_450' +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Map 2 (BROADCAST_EDGE), Map 3 (BROADCAST_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Map 1 + File Output Operator [FS_16] + Map Join Operator [MAPJOIN_26] (rows=805/20 width=10) + Conds:MAPJOIN_25._col1=RS_13._col0(Inner),HybridGraceHashJoin:true,Output:["_col0"] + <-Map 3 [BROADCAST_EDGE] + BROADCAST [RS_13] + PartitionCols:_col0 + Select Operator [SEL_8] (rows=166/110 width=10) + Output:["_col0"] + Filter Operator [FIL_24] (rows=166/110 width=10) + predicate:(value > 'val_450') + TableScan [TS_6] (rows=500/500 width=10) + default@src,src,Tbl:COMPLETE,Col:NONE,Output:["value"] + <-Map Join Operator [MAPJOIN_25] (rows=732/12 width=10) + Conds:SEL_2._col0=RS_10._col0(Inner),HybridGraceHashJoin:true,Output:["_col0","_col1"] + <-Map 2 [BROADCAST_EDGE] + BROADCAST [RS_10] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=25/25 width=7) + Output:["_col0"] + Filter Operator [FIL_23] (rows=25/25 width=7) + predicate:key is not null + TableScan [TS_3] (rows=25/25 width=7) + default@src1,src1,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Select Operator [SEL_2] (rows=666/440 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_22] (rows=666/440 width=10) + predicate:((value > 'val_450') and key is not null) + TableScan [TS_0] (rows=2000/2000 width=10) + default@srcpart,srcpart,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part + partition by p_mfgr + order by p_name + ) +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part + partition by p_mfgr + order by p_name + ) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part + partition by p_mfgr + order by p_name + ) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part + partition by p_mfgr + order by p_name + ) +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_9] + Select Operator [SEL_7] (rows=26/26 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + PTF Operator [PTF_6] (rows=26/26 width=499) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_5] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col2 + PTF Operator [PTF_3] (rows=26/21 width=499) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_2] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:p_mfgr + TableScan [TS_0] (rows=26/26 width=231) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_retailprice","p_size"] + +PREHOOK: query: select p_mfgr, p_name, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop (on (select p1.* from part p1 join part p2 on p1.p_partkey = p2.p_partkey) j +distribute by j.p_mfgr +sort by j.p_name) +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop (on (select p1.* from part p1 join part p2 on p1.p_partkey = p2.p_partkey) j +distribute by j.p_mfgr +sort by j.p_name) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select p_mfgr, p_name, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop (on (select p1.* from part p1 join part p2 on p1.p_partkey = p2.p_partkey) j +distribute by j.p_mfgr +sort by j.p_name) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select p_mfgr, p_name, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop (on (select p1.* from part p1 join part p2 on p1.p_partkey = p2.p_partkey) j +distribute by j.p_mfgr +sort by j.p_name) +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Map 4 (BROADCAST_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_16] + Select Operator [SEL_14] (rows=29/28 width=227) + Output:["_col0","_col1","_col2","_col3"] + PTF Operator [PTF_13] (rows=29/28 width=223) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_12] (rows=29/28 width=223) + Output:["_col1","_col2","_col5"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_11] + PartitionCols:_col2 + PTF Operator [PTF_10] (rows=29/23 width=223) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_9] (rows=29/28 width=223) + Output:["_col1","_col2","_col5"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:_col2 + Map Join Operator [MAPJOIN_21] (rows=29/28 width=223) + Conds:FIL_19.p_partkey=RS_5.p_partkey(Inner),HybridGraceHashJoin:true,Output:["_col1","_col2","_col5"] + <-Map 4 [BROADCAST_EDGE] + BROADCAST [RS_5] + PartitionCols:p_partkey + Filter Operator [FIL_20] (rows=26/26 width=4) + predicate:p_partkey is not null + TableScan [TS_1] (rows=26/26 width=4) + default@part,p2,Tbl:COMPLETE,Col:COMPLETE,Output:["p_partkey"] + <-Filter Operator [FIL_19] (rows=26/26 width=227) + predicate:p_partkey is not null + TableScan [TS_0] (rows=26/26 width=227) + default@part,p1,Tbl:COMPLETE,Col:COMPLETE,Output:["p_partkey","p_name","p_mfgr","p_size"] + +PREHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part + partition by p_mfgr + order by p_name + ) abc +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part + partition by p_mfgr + order by p_name + ) abc +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part + partition by p_mfgr + order by p_name + ) abc +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part + partition by p_mfgr + order by p_name + ) abc +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_9] + Select Operator [SEL_7] (rows=26/26 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + PTF Operator [PTF_6] (rows=26/26 width=499) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_5] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col2 + PTF Operator [PTF_3] (rows=26/21 width=499) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_2] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:p_mfgr + TableScan [TS_0] (rows=26/26 width=231) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_retailprice","p_size"] + +PREHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop(on part + partition by p_mfgr + order by p_name + ) +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop(on part + partition by p_mfgr + order by p_name + ) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop(on part + partition by p_mfgr + order by p_name + ) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop(on part + partition by p_mfgr + order by p_name + ) +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_9] + Select Operator [SEL_7] (rows=26/26 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] + PTF Operator [PTF_6] (rows=26/26 width=491) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_5] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col2 + PTF Operator [PTF_3] (rows=26/21 width=491) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_2] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:p_mfgr + TableScan [TS_0] (rows=26/26 width=223) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_size"] + +PREHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop(on part + partition by p_mfgr + order by p_name + ) +group by p_mfgr, p_name, p_size +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop(on part + partition by p_mfgr + order by p_name + ) +group by p_mfgr, p_name, p_size +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop(on part + partition by p_mfgr + order by p_name + ) +group by p_mfgr, p_name, p_size +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, p_size - lag(p_size,1,p_size) over (partition by p_mfgr order by p_name) as deltaSz +from noop(on part + partition by p_mfgr + order by p_name + ) +group by p_mfgr, p_name, p_size +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_14] + Select Operator [SEL_12] (rows=26/25 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] + PTF Operator [PTF_11] (rows=26/25 width=223) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col0"}] + Group By Operator [GBY_8] (rows=26/25 width=223) + Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col0 + Group By Operator [GBY_6] (rows=26/25 width=223) + Output:["_col0","_col1","_col2"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_5] + PartitionCols:rand() + Select Operator [SEL_4] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + PTF Operator [PTF_3] (rows=26/21 width=491) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_2] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:p_mfgr + TableScan [TS_0] (rows=26/26 width=223) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_size"] + +PREHOOK: query: select abc.* +from noop(on part +partition by p_mfgr +order by p_name +) abc join part p1 on abc.p_partkey = p1.p_partkey +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select abc.* +from noop(on part +partition by p_mfgr +order by p_name +) abc join part p1 on abc.p_partkey = p1.p_partkey +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select abc.* +from noop(on part +partition by p_mfgr +order by p_name +) abc join part p1 on abc.p_partkey = p1.p_partkey +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select abc.* +from noop(on part +partition by p_mfgr +order by p_name +) abc join part p1 on abc.p_partkey = p1.p_partkey +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (BROADCAST_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_11] + Map Join Operator [MAPJOIN_16] (rows=29/28 width=619) + Conds:FIL_14._col0=RS_8.p_partkey(Inner),HybridGraceHashJoin:true,Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"] + <-Map 3 [BROADCAST_EDGE] + BROADCAST [RS_8] + PartitionCols:p_partkey + Filter Operator [FIL_15] (rows=26/26 width=4) + predicate:p_partkey is not null + TableScan [TS_1] (rows=26/26 width=4) + default@part,p1,Tbl:COMPLETE,Col:COMPLETE,Output:["p_partkey"] + <-Filter Operator [FIL_14] (rows=26/26 width=887) + predicate:_col0 is not null + PTF Operator [PTF_4] (rows=26/21 width=887) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_3] (rows=26/26 width=887) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:p_mfgr + TableScan [TS_0] (rows=26/26 width=619) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_brand","p_comment","p_container","p_mfgr","p_name","p_partkey","p_retailprice","p_size","p_type"] + +PREHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name, p_size desc) as r +from noopwithmap(on part +partition by p_mfgr +order by p_name, p_size desc) +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name, p_size desc) as r +from noopwithmap(on part +partition by p_mfgr +order by p_name, p_size desc) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name, p_size desc) as r +from noopwithmap(on part +partition by p_mfgr +order by p_name, p_size desc) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name, p_size desc) as r +from noopwithmap(on part +partition by p_mfgr +order by p_name, p_size desc) +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_10] + Select Operator [SEL_8] (rows=26/26 width=227) + Output:["_col0","_col1","_col2","_col3"] + PTF Operator [PTF_7] (rows=26/26 width=491) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST, _col5 DESC NULLS LAST","partition by:":"_col2"}] + Select Operator [SEL_6] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_5] + PartitionCols:_col2 + PTF Operator [PTF_4] (rows=26/21 width=491) + Function definitions:[{},{"Partition table definition":{"name:":"noopwithmap","order by:":"_col1 ASC NULLS FIRST, _col5 DESC NULLS LAST","partition by:":"_col2"}}] + Select Operator [SEL_3] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:p_mfgr + PTF Operator [PTF_1] (rows=26/0 width=223) + Function definitions:[{},{"Partition table definition":{"name:":"noopwithmap","order by:":"p_name ASC NULLS FIRST, p_size DESC NULLS LAST","partition by:":"p_mfgr"}}] + TableScan [TS_0] (rows=26/26 width=223) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_name","p_mfgr","p_size"] + +PREHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noopwithmap(on part + partition by p_mfgr + order by p_name) +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noopwithmap(on part + partition by p_mfgr + order by p_name) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noopwithmap(on part + partition by p_mfgr + order by p_name) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noopwithmap(on part + partition by p_mfgr + order by p_name) +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_10] + Select Operator [SEL_8] (rows=26/26 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + PTF Operator [PTF_7] (rows=26/26 width=499) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_6] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_5] + PartitionCols:_col2 + PTF Operator [PTF_4] (rows=26/21 width=499) + Function definitions:[{},{"Partition table definition":{"name:":"noopwithmap","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_3] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:p_mfgr + PTF Operator [PTF_1] (rows=26/0 width=231) + Function definitions:[{},{"Partition table definition":{"name:":"noopwithmap","order by:":"p_name ASC NULLS FIRST","partition by:":"p_mfgr"}}] + TableScan [TS_0] (rows=26/26 width=231) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_name","p_mfgr","p_size","p_retailprice"] + +PREHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part +partition by p_mfgr +order by p_name) +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part +partition by p_mfgr +order by p_name) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part +partition by p_mfgr +order by p_name) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on part +partition by p_mfgr +order by p_name) +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_9] + Select Operator [SEL_7] (rows=26/26 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + PTF Operator [PTF_6] (rows=26/26 width=499) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_5] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col2 + PTF Operator [PTF_3] (rows=26/21 width=499) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_2] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:p_mfgr + TableScan [TS_0] (rows=26/26 width=231) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_retailprice","p_size"] + +PREHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on noopwithmap(on noop(on part +partition by p_mfgr +order by p_mfgr DESC, p_name +))) +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on noopwithmap(on noop(on part +partition by p_mfgr +order by p_mfgr DESC, p_name +))) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on noopwithmap(on noop(on part +partition by p_mfgr +order by p_mfgr DESC, p_name +))) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select p_mfgr, p_name, p_size, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on noopwithmap(on noop(on part +partition by p_mfgr +order by p_mfgr DESC, p_name +))) +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_13] + Select Operator [SEL_11] (rows=26/26 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + PTF Operator [PTF_10] (rows=26/26 width=499) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_9] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:_col2 + PTF Operator [PTF_7] (rows=26/20 width=499) + Function definitions:[{},{"Partition table definition":{"name:":"noopwithmap","order by:":"_col2 DESC NULLS LAST, _col1 ASC NULLS FIRST","partition by:":"_col2"}},{"Partition table definition":{"name:":"noop","order by:":"_col2 DESC NULLS LAST, _col1 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_6] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_5] + PartitionCols:_col2 + PTF Operator [PTF_4] (rows=26/0 width=499) + Function definitions:[{},{"Partition table definition":{"name:":"noopwithmap","order by:":"_col2 DESC NULLS LAST, _col1 ASC NULLS FIRST","partition by:":"_col2"}},{"Partition table definition":{"name:":"noop","order by:":"_col2 DESC NULLS LAST, _col1 ASC NULLS FIRST","partition by:":"_col2"}}] + PTF Operator [PTF_3] (rows=26/20 width=499) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col2 DESC NULLS LAST, _col1 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_2] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:p_mfgr + TableScan [TS_0] (rows=26/26 width=231) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_retailprice","p_size"] + +PREHOOK: query: select p_mfgr, p_name, +sub1.cd, sub1.s1 +from (select p_mfgr, p_name, +count(p_size) over (partition by p_mfgr order by p_name) as cd, +p_retailprice, +sum(p_retailprice) over w1 as s1 +from noop(on part +partition by p_mfgr +order by p_name) +window w1 as (partition by p_mfgr order by p_name rows between 2 preceding and 2 following) +) sub1 +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, +sub1.cd, sub1.s1 +from (select p_mfgr, p_name, +count(p_size) over (partition by p_mfgr order by p_name) as cd, +p_retailprice, +sum(p_retailprice) over w1 as s1 +from noop(on part +partition by p_mfgr +order by p_name) +window w1 as (partition by p_mfgr order by p_name rows between 2 preceding and 2 following) +) sub1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select p_mfgr, p_name, +sub1.cd, sub1.s1 +from (select p_mfgr, p_name, +count(p_size) over (partition by p_mfgr order by p_name) as cd, +p_retailprice, +sum(p_retailprice) over w1 as s1 +from noop(on part +partition by p_mfgr +order by p_name) +window w1 as (partition by p_mfgr order by p_name rows between 2 preceding and 2 following) +) sub1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select p_mfgr, p_name, +sub1.cd, sub1.s1 +from (select p_mfgr, p_name, +count(p_size) over (partition by p_mfgr order by p_name) as cd, +p_retailprice, +sum(p_retailprice) over w1 as s1 +from noop(on part +partition by p_mfgr +order by p_name) +window w1 as (partition by p_mfgr order by p_name rows between 2 preceding and 2 following) +) sub1 +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_10] + Select Operator [SEL_7] (rows=26/26 width=235) + Output:["_col0","_col1","_col2","_col3"] + PTF Operator [PTF_6] (rows=26/21 width=499) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_5] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col2 + PTF Operator [PTF_3] (rows=26/21 width=499) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_2] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:p_mfgr + TableScan [TS_0] (rows=26/26 width=231) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_retailprice","p_size"] + +PREHOOK: query: select abc.p_mfgr, abc.p_name, +rank() over (distribute by abc.p_mfgr sort by abc.p_name) as r, +dense_rank() over (distribute by abc.p_mfgr sort by abc.p_name) as dr, +count(abc.p_name) over (distribute by abc.p_mfgr sort by abc.p_name) as cd, +abc.p_retailprice, sum(abc.p_retailprice) over (distribute by abc.p_mfgr sort by abc.p_name rows between unbounded preceding and current row) as s1, +abc.p_size, abc.p_size - lag(abc.p_size,1,abc.p_size) over (distribute by abc.p_mfgr sort by abc.p_name) as deltaSz +from noop(on part +partition by p_mfgr +order by p_name +) abc join part p1 on abc.p_partkey = p1.p_partkey +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select abc.p_mfgr, abc.p_name, +rank() over (distribute by abc.p_mfgr sort by abc.p_name) as r, +dense_rank() over (distribute by abc.p_mfgr sort by abc.p_name) as dr, +count(abc.p_name) over (distribute by abc.p_mfgr sort by abc.p_name) as cd, +abc.p_retailprice, sum(abc.p_retailprice) over (distribute by abc.p_mfgr sort by abc.p_name rows between unbounded preceding and current row) as s1, +abc.p_size, abc.p_size - lag(abc.p_size,1,abc.p_size) over (distribute by abc.p_mfgr sort by abc.p_name) as deltaSz +from noop(on part +partition by p_mfgr +order by p_name +) abc join part p1 on abc.p_partkey = p1.p_partkey +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select abc.p_mfgr, abc.p_name, +rank() over (distribute by abc.p_mfgr sort by abc.p_name) as r, +dense_rank() over (distribute by abc.p_mfgr sort by abc.p_name) as dr, +count(abc.p_name) over (distribute by abc.p_mfgr sort by abc.p_name) as cd, +abc.p_retailprice, sum(abc.p_retailprice) over (distribute by abc.p_mfgr sort by abc.p_name rows between unbounded preceding and current row) as s1, +abc.p_size, abc.p_size - lag(abc.p_size,1,abc.p_size) over (distribute by abc.p_mfgr sort by abc.p_name) as deltaSz +from noop(on part +partition by p_mfgr +order by p_name +) abc join part p1 on abc.p_partkey = p1.p_partkey +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select abc.p_mfgr, abc.p_name, +rank() over (distribute by abc.p_mfgr sort by abc.p_name) as r, +dense_rank() over (distribute by abc.p_mfgr sort by abc.p_name) as dr, +count(abc.p_name) over (distribute by abc.p_mfgr sort by abc.p_name) as cd, +abc.p_retailprice, sum(abc.p_retailprice) over (distribute by abc.p_mfgr sort by abc.p_name rows between unbounded preceding and current row) as s1, +abc.p_size, abc.p_size - lag(abc.p_size,1,abc.p_size) over (distribute by abc.p_mfgr sort by abc.p_name) as deltaSz +from noop(on part +partition by p_mfgr +order by p_name +) abc join part p1 on abc.p_partkey = p1.p_partkey +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (BROADCAST_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_15] + Select Operator [SEL_13] (rows=29/28 width=259) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"] + PTF Operator [PTF_12] (rows=29/23 width=767) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_11] (rows=29/28 width=767) + Output:["_col1","_col2","_col5","_col7"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_10] + PartitionCols:_col2 + Map Join Operator [MAPJOIN_20] (rows=29/28 width=231) + Conds:FIL_18._col0=RS_8.p_partkey(Inner),HybridGraceHashJoin:true,Output:["_col1","_col2","_col5","_col7"] + <-Map 4 [BROADCAST_EDGE] + BROADCAST [RS_8] + PartitionCols:p_partkey + Filter Operator [FIL_19] (rows=26/26 width=4) + predicate:p_partkey is not null + TableScan [TS_1] (rows=26/26 width=4) + default@part,p1,Tbl:COMPLETE,Col:COMPLETE,Output:["p_partkey"] + <-Filter Operator [FIL_18] (rows=26/26 width=503) + predicate:_col0 is not null + PTF Operator [PTF_4] (rows=26/21 width=503) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_3] (rows=26/26 width=503) + Output:["_col0","_col1","_col2","_col5","_col7"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:p_mfgr + TableScan [TS_0] (rows=26/26 width=235) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_partkey","p_retailprice","p_size"] + +PREHOOK: query: create view IF NOT EXISTS mfgr_price_view as +select p_mfgr, p_brand, +sum(p_retailprice) as s +from part +group by p_mfgr, p_brand +PREHOOK: type: CREATEVIEW +PREHOOK: Input: default@part +PREHOOK: Output: database:default +PREHOOK: Output: default@mfgr_price_view +POSTHOOK: query: create view IF NOT EXISTS mfgr_price_view as +select p_mfgr, p_brand, +sum(p_retailprice) as s +from part +group by p_mfgr, p_brand +POSTHOOK: type: CREATEVIEW +POSTHOOK: Input: default@part +POSTHOOK: Output: database:default +POSTHOOK: Output: default@mfgr_price_view +PREHOOK: query: explain analyze create view IF NOT EXISTS mfgr_price_view as +select p_mfgr, p_brand, +sum(p_retailprice) as s +from part +group by p_mfgr, p_brand +PREHOOK: type: CREATEVIEW +POSTHOOK: query: explain analyze create view IF NOT EXISTS mfgr_price_view as +select p_mfgr, p_brand, +sum(p_retailprice) as s +from part +group by p_mfgr, p_brand +POSTHOOK: type: CREATEVIEW +Plan not optimized by CBO. + +Stage-0 + Create View Operator: + name:default.mfgr_price_view,original text:select p_mfgr, p_brand, +sum(p_retailprice) as s +from part +group by p_mfgr, p_brand + +PREHOOK: query: CREATE TABLE part_4( +p_mfgr STRING, +p_name STRING, +p_size INT, +r INT, +dr INT, +s DOUBLE) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@part_4 +POSTHOOK: query: CREATE TABLE part_4( +p_mfgr STRING, +p_name STRING, +p_size INT, +r INT, +dr INT, +s DOUBLE) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@part_4 +PREHOOK: query: CREATE TABLE part_5( +p_mfgr STRING, +p_name STRING, +p_size INT, +s2 INT, +r INT, +dr INT, +cud DOUBLE, +fv1 INT) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@part_5 +POSTHOOK: query: CREATE TABLE part_5( +p_mfgr STRING, +p_name STRING, +p_size INT, +s2 INT, +r INT, +dr INT, +cud DOUBLE, +fv1 INT) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@part_5 +PREHOOK: query: from noop(on part +partition by p_mfgr +order by p_name) +INSERT OVERWRITE TABLE part_4 select p_mfgr, p_name, p_size, +rank() over (distribute by p_mfgr sort by p_name) as r, +dense_rank() over (distribute by p_mfgr sort by p_name) as dr, +sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row) as s +INSERT OVERWRITE TABLE part_5 select p_mfgr,p_name, p_size, +round(sum(p_size) over (distribute by p_mfgr sort by p_size range between 5 preceding and current row),1) as s2, +rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as r, +dense_rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as dr, +cume_dist() over (distribute by p_mfgr sort by p_mfgr, p_name) as cud, +first_value(p_size, true) over w1 as fv1 +window w1 as (distribute by p_mfgr sort by p_mfgr, p_name rows between 2 preceding and 2 following) +PREHOOK: type: QUERY +PREHOOK: Input: default@part +PREHOOK: Output: default@part_4 +PREHOOK: Output: default@part_5 +POSTHOOK: query: from noop(on part +partition by p_mfgr +order by p_name) +INSERT OVERWRITE TABLE part_4 select p_mfgr, p_name, p_size, +rank() over (distribute by p_mfgr sort by p_name) as r, +dense_rank() over (distribute by p_mfgr sort by p_name) as dr, +sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row) as s +INSERT OVERWRITE TABLE part_5 select p_mfgr,p_name, p_size, +round(sum(p_size) over (distribute by p_mfgr sort by p_size range between 5 preceding and current row),1) as s2, +rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as r, +dense_rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as dr, +cume_dist() over (distribute by p_mfgr sort by p_mfgr, p_name) as cud, +first_value(p_size, true) over w1 as fv1 +window w1 as (distribute by p_mfgr sort by p_mfgr, p_name rows between 2 preceding and 2 following) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +POSTHOOK: Output: default@part_4 +POSTHOOK: Output: default@part_5 +PREHOOK: query: explain analyze +from noop(on part +partition by p_mfgr +order by p_name) +INSERT OVERWRITE TABLE part_4 select p_mfgr, p_name, p_size, +rank() over (distribute by p_mfgr sort by p_name) as r, +dense_rank() over (distribute by p_mfgr sort by p_name) as dr, +sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row) as s +INSERT OVERWRITE TABLE part_5 select p_mfgr,p_name, p_size, +round(sum(p_size) over (distribute by p_mfgr sort by p_size range between 5 preceding and current row),1) as s2, +rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as r, +dense_rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as dr, +cume_dist() over (distribute by p_mfgr sort by p_mfgr, p_name) as cud, +first_value(p_size, true) over w1 as fv1 +window w1 as (distribute by p_mfgr sort by p_mfgr, p_name rows between 2 preceding and 2 following) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +from noop(on part +partition by p_mfgr +order by p_name) +INSERT OVERWRITE TABLE part_4 select p_mfgr, p_name, p_size, +rank() over (distribute by p_mfgr sort by p_name) as r, +dense_rank() over (distribute by p_mfgr sort by p_name) as dr, +sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row) as s +INSERT OVERWRITE TABLE part_5 select p_mfgr,p_name, p_size, +round(sum(p_size) over (distribute by p_mfgr sort by p_size range between 5 preceding and current row),1) as s2, +rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as r, +dense_rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as dr, +cume_dist() over (distribute by p_mfgr sort by p_mfgr, p_name) as cud, +first_value(p_size, true) over w1 as fv1 +window w1 as (distribute by p_mfgr sort by p_mfgr, p_name rows between 2 preceding and 2 following) +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 2 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) + +Stage-4 + Stats-Aggr Operator + Stage-0 + Move Operator + table:{"name:":"default.part_4"} + Stage-3 + Dependency Collection{} + Stage-2 + Reducer 3 + File Output Operator [FS_9] + table:{"name:":"default.part_4"} + Select Operator [SEL_7] (rows=26/26 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + PTF Operator [PTF_6] (rows=26/26 width=499) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_5] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col2 + PTF Operator [PTF_3] (rows=26/21 width=499) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_2] (rows=26/26 width=499) + Output:["_col1","_col2","_col5","_col7"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:p_mfgr + TableScan [TS_0] (rows=26/26 width=231) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_retailprice","p_size"] + Reducer 5 + File Output Operator [FS_20] + table:{"name:":"default.part_5"} + Select Operator [SEL_17] (rows=26/26 width=247) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] + PTF Operator [PTF_16] (rows=26/21 width=499) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col3 ASC NULLS FIRST, _col2 ASC NULLS FIRST","partition by:":"_col3"}] + Select Operator [SEL_15] (rows=26/26 width=499) + Output:["_col0","_col2","_col3","_col6"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_14] + PartitionCols:_col2 + Select Operator [SEL_13] (rows=26/26 width=491) + Output:["_col1","_col2","_col5","sum_window_0"] + PTF Operator [PTF_12] (rows=26/21 width=491) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col5 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_11] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_10] + PartitionCols:_col2 + Please refer to the previous PTF Operator [PTF_3] +Stage-5 + Stats-Aggr Operator + Stage-1 + Move Operator + table:{"name:":"default.part_5"} + Please refer to the previous Stage-3 + +PREHOOK: query: select p_mfgr, p_name, +rank() over (partition by p_mfgr,p_name) as r, +dense_rank() over (partition by p_mfgr,p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr,p_name rows between unbounded preceding and current row) as s1 +from noop(on + noopwithmap(on + noop(on + noop(on part + partition by p_mfgr + order by p_mfgr) + ) + partition by p_mfgr,p_name + order by p_mfgr,p_name) + partition by p_mfgr,p_name + order by p_mfgr,p_name) +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, +rank() over (partition by p_mfgr,p_name) as r, +dense_rank() over (partition by p_mfgr,p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr,p_name rows between unbounded preceding and current row) as s1 +from noop(on + noopwithmap(on + noop(on + noop(on part + partition by p_mfgr + order by p_mfgr) + ) + partition by p_mfgr,p_name + order by p_mfgr,p_name) + partition by p_mfgr,p_name + order by p_mfgr,p_name) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select p_mfgr, p_name, +rank() over (partition by p_mfgr,p_name) as r, +dense_rank() over (partition by p_mfgr,p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr,p_name rows between unbounded preceding and current row) as s1 +from noop(on + noopwithmap(on + noop(on + noop(on part + partition by p_mfgr + order by p_mfgr) + ) + partition by p_mfgr,p_name + order by p_mfgr,p_name) + partition by p_mfgr,p_name + order by p_mfgr,p_name) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select p_mfgr, p_name, +rank() over (partition by p_mfgr,p_name) as r, +dense_rank() over (partition by p_mfgr,p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr,p_name rows between unbounded preceding and current row) as s1 +from noop(on + noopwithmap(on + noop(on + noop(on part + partition by p_mfgr + order by p_mfgr) + ) + partition by p_mfgr,p_name + order by p_mfgr,p_name) + partition by p_mfgr,p_name + order by p_mfgr,p_name) +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_13] + Select Operator [SEL_11] (rows=26/26 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + PTF Operator [PTF_10] (rows=26/26 width=491) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 ASC NULLS FIRST, _col1 ASC NULLS FIRST","partition by:":"_col2, _col1"}] + Select Operator [SEL_9] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:_col2, _col1 + PTF Operator [PTF_7] (rows=26/25 width=491) + Function definitions:[{},{"Partition table definition":{"name:":"noopwithmap","order by:":"_col2 ASC NULLS FIRST, _col1 ASC NULLS FIRST","partition by:":"_col2, _col1"}},{"Partition table definition":{"name:":"noop","order by:":"_col2 ASC NULLS FIRST, _col1 ASC NULLS FIRST","partition by:":"_col2, _col1"}}] + Select Operator [SEL_6] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_5] + PartitionCols:_col2, _col1 + PTF Operator [PTF_4] (rows=26/0 width=491) + Function definitions:[{},{"Partition table definition":{"name:":"noopwithmap","order by:":"_col2 ASC NULLS FIRST, _col1 ASC NULLS FIRST","partition by:":"_col2, _col1"}},{"Partition table definition":{"name:":"noop","order by:":"_col2 ASC NULLS FIRST, _col1 ASC NULLS FIRST","partition by:":"_col2, _col1"}}] + PTF Operator [PTF_3] (rows=26/21 width=491) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col2 ASC NULLS FIRST","partition by:":"_col2"}},{"Partition table definition":{"name:":"noop","order by:":"_col2 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_2] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:p_mfgr + TableScan [TS_0] (rows=26/26 width=223) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_size"] + +PREHOOK: query: select p_mfgr, p_name, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on + noop(on + noop(on + noop(on part + partition by p_mfgr + order by p_mfgr) + ) + partition by p_mfgr,p_name + order by p_mfgr,p_name) + partition by p_mfgr + order by p_mfgr ) +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on + noop(on + noop(on + noop(on part + partition by p_mfgr + order by p_mfgr) + ) + partition by p_mfgr,p_name + order by p_mfgr,p_name) + partition by p_mfgr + order by p_mfgr ) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select p_mfgr, p_name, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on + noop(on + noop(on + noop(on part + partition by p_mfgr + order by p_mfgr) + ) + partition by p_mfgr,p_name + order by p_mfgr,p_name) + partition by p_mfgr + order by p_mfgr ) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select p_mfgr, p_name, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row) as s1 +from noop(on + noop(on + noop(on + noop(on part + partition by p_mfgr + order by p_mfgr) + ) + partition by p_mfgr,p_name + order by p_mfgr,p_name) + partition by p_mfgr + order by p_mfgr ) +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 5 + File Output Operator [FS_15] + Select Operator [SEL_13] (rows=26/26 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + PTF Operator [PTF_12] (rows=26/26 width=491) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_11] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_10] + PartitionCols:_col2 + PTF Operator [PTF_9] (rows=26/21 width=491) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col2 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_8] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col2 + PTF Operator [PTF_6] (rows=26/25 width=491) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col2 ASC NULLS FIRST, _col1 ASC NULLS FIRST","partition by:":"_col2, _col1"}}] + Select Operator [SEL_5] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col2, _col1 + PTF Operator [PTF_3] (rows=26/21 width=491) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col2 ASC NULLS FIRST","partition by:":"_col2"}},{"Partition table definition":{"name:":"noop","order by:":"_col2 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_2] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:p_mfgr + TableScan [TS_0] (rows=26/26 width=223) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_size"] + +PREHOOK: query: select p_mfgr, p_name, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr order by p_name) as s1 +from noop(on + noop(on + noop(on + noop(on part + partition by p_mfgr,p_name + order by p_mfgr,p_name) + ) + partition by p_mfgr + order by p_mfgr)) +PREHOOK: type: QUERY +PREHOOK: Input: default@part +#### A masked pattern was here #### +POSTHOOK: query: select p_mfgr, p_name, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr order by p_name) as s1 +from noop(on + noop(on + noop(on + noop(on part + partition by p_mfgr,p_name + order by p_mfgr,p_name) + ) + partition by p_mfgr + order by p_mfgr)) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@part +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select p_mfgr, p_name, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr order by p_name) as s1 +from noop(on + noop(on + noop(on + noop(on part + partition by p_mfgr,p_name + order by p_mfgr,p_name) + ) + partition by p_mfgr + order by p_mfgr)) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select p_mfgr, p_name, +rank() over (partition by p_mfgr order by p_name) as r, +dense_rank() over (partition by p_mfgr order by p_name) as dr, +p_size, sum(p_size) over (partition by p_mfgr order by p_name) as s1 +from noop(on + noop(on + noop(on + noop(on part + partition by p_mfgr,p_name + order by p_mfgr,p_name) + ) + partition by p_mfgr + order by p_mfgr)) +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_12] + Select Operator [SEL_10] (rows=26/26 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + PTF Operator [PTF_9] (rows=26/21 width=491) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"_col2"}] + Select Operator [SEL_8] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col2 + PTF Operator [PTF_6] (rows=26/21 width=491) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col2 ASC NULLS FIRST","partition by:":"_col2"}},{"Partition table definition":{"name:":"noop","order by:":"_col2 ASC NULLS FIRST","partition by:":"_col2"}}] + Select Operator [SEL_5] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col2 + PTF Operator [PTF_3] (rows=26/25 width=491) + Function definitions:[{},{"Partition table definition":{"name:":"noop","order by:":"_col2 ASC NULLS FIRST, _col1 ASC NULLS FIRST","partition by:":"_col2, _col1"}},{"Partition table definition":{"name:":"noop","order by:":"_col2 ASC NULLS FIRST, _col1 ASC NULLS FIRST","partition by:":"_col2, _col1"}}] + Select Operator [SEL_2] (rows=26/26 width=491) + Output:["_col1","_col2","_col5"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_1] + PartitionCols:p_mfgr, p_name + TableScan [TS_0] (rows=26/26 width=223) + default@part,part,Tbl:COMPLETE,Col:COMPLETE,Output:["p_mfgr","p_name","p_size"] + +PREHOOK: query: select distinct src.* from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select distinct src.* from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze select distinct src.* from src +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select distinct src.* from src +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_7] + Group By Operator [GBY_5] (rows=500/309 width=178) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:_col0, _col1 + Group By Operator [GBY_3] (rows=500/309 width=178) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:rand() + Select Operator [SEL_1] (rows=500/500 width=178) + Output:["key","value"] + TableScan [TS_0] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: select explode(array('a', 'b')) +PREHOOK: type: QUERY +PREHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +POSTHOOK: query: select explode(array('a', 'b')) +POSTHOOK: type: QUERY +POSTHOOK: Input: _dummy_database@_dummy_table +#### A masked pattern was here #### +PREHOOK: query: explain analyze select explode(array('a', 'b')) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select explode(array('a', 'b')) +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Stage-0 + Fetch Operator + limit:-1 + UDTF Operator [UDTF_2] + function name:explode + Select Operator [SEL_1] + Output:["_col0"] + TableScan [TS_0] + +PREHOOK: query: CREATE TABLE T1(key STRING, val STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@T1 +POSTHOOK: query: CREATE TABLE T1(key STRING, val STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@T1 +PREHOOK: query: CREATE TABLE T2(key STRING, val STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@T2 +POSTHOOK: query: CREATE TABLE T2(key STRING, val STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@T2 +PREHOOK: query: CREATE TABLE T3(key STRING, val STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@T3 +POSTHOOK: query: CREATE TABLE T3(key STRING, val STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@T3 +PREHOOK: query: CREATE TABLE T4(key STRING, val STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@T4 +POSTHOOK: query: CREATE TABLE T4(key STRING, val STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@T4 +PREHOOK: query: CREATE TABLE dest_j1(key INT, value STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@dest_j1 +POSTHOOK: query: CREATE TABLE dest_j1(key INT, value STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@dest_j1 +PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T1 +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@t1 +POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T1 +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@t1 +PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T2.txt' INTO TABLE T2 +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@t2 +POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T2.txt' INTO TABLE T2 +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@t2 +PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T3.txt' INTO TABLE T3 +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@t3 +POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T3.txt' INTO TABLE T3 +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@t3 +PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T4 +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@t4 +POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T4 +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@t4 +PREHOOK: query: FROM src src1 JOIN src src2 ON (src1.key = src2.key) +INSERT OVERWRITE TABLE dest_j1 select src1.key, src2.value +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@dest_j1 +POSTHOOK: query: FROM src src1 JOIN src src2 ON (src1.key = src2.key) +INSERT OVERWRITE TABLE dest_j1 select src1.key, src2.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@dest_j1 +PREHOOK: query: explain analyze +FROM src src1 JOIN src src2 ON (src1.key = src2.key) +INSERT OVERWRITE TABLE dest_j1 select src1.key, src2.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +FROM src src1 JOIN src src2 ON (src1.key = src2.key) +INSERT OVERWRITE TABLE dest_j1 select src1.key, src2.value +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-3 + Stats-Aggr Operator + Stage-0 + Move Operator + table:{"name:":"default.dest_j1"} + Stage-2 + Dependency Collection{} + Stage-1 + Reducer 2 + File Output Operator [FS_11] + table:{"name:":"default.dest_j1"} + Select Operator [SEL_9] (rows=1219/1028 width=95) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_16] (rows=1219/1028 width=178) + Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col0","_col2"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=500/500 width=87) + Output:["_col0"] + Filter Operator [FIL_14] (rows=500/500 width=87) + predicate:key is not null + TableScan [TS_0] (rows=500/500 width=87) + default@src,src1,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_15] (rows=500/500 width=178) + predicate:key is not null + TableScan [TS_3] (rows=500/500 width=178) + default@src,src2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: FROM src src1 JOIN src src2 ON (src1.key = src2.key) +INSERT OVERWRITE TABLE dest_j1 select src1.key, src2.value +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@dest_j1 +POSTHOOK: query: FROM src src1 JOIN src src2 ON (src1.key = src2.key) +INSERT OVERWRITE TABLE dest_j1 select src1.key, src2.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@dest_j1 +POSTHOOK: Lineage: dest_j1.key EXPRESSION [(src)src1.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: dest_j1.value SIMPLE [(src)src2.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: select /*+ STREAMTABLE(a) */ * +FROM T1 a JOIN T2 b ON a.key = b.key + JOIN T3 c ON b.key = c.key + JOIN T4 d ON c.key = d.key +PREHOOK: type: QUERY +PREHOOK: Input: default@t1 +PREHOOK: Input: default@t2 +PREHOOK: Input: default@t3 +PREHOOK: Input: default@t4 +#### A masked pattern was here #### +POSTHOOK: query: select /*+ STREAMTABLE(a) */ * +FROM T1 a JOIN T2 b ON a.key = b.key + JOIN T3 c ON b.key = c.key + JOIN T4 d ON c.key = d.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@t1 +POSTHOOK: Input: default@t2 +POSTHOOK: Input: default@t3 +POSTHOOK: Input: default@t4 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select /*+ STREAMTABLE(a) */ * +FROM T1 a JOIN T2 b ON a.key = b.key + JOIN T3 c ON b.key = c.key + JOIN T4 d ON c.key = d.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select /*+ STREAMTABLE(a) */ * +FROM T1 a JOIN T2 b ON a.key = b.key + JOIN T3 c ON b.key = c.key + JOIN T4 d ON c.key = d.key +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Hint]. + +Vertex dependency in root stage +Map 1 <- Map 2 (BROADCAST_EDGE), Map 3 (BROADCAST_EDGE), Map 4 (BROADCAST_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Map 1 + File Output Operator [FS_14] + Select Operator [SEL_13] (rows=3/1 width=33) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] + Map Join Operator [MAPJOIN_31] (rows=3/1 width=33) + Conds:FIL_27.key=RS_7.key(Inner),RS_7.key=RS_9.key(Inner),RS_9.key=RS_11.key(Inner),HybridGraceHashJoin:true,Output:["_col0","_col1","_col5","_col6","_col10","_col11","_col15","_col16"] + <-Map 2 [BROADCAST_EDGE] + BROADCAST [RS_7] + PartitionCols:key + Filter Operator [FIL_28] (rows=1/6 width=30) + predicate:key is not null + TableScan [TS_1] (rows=1/6 width=30) + default@t2,b,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + <-Map 3 [BROADCAST_EDGE] + BROADCAST [RS_9] + PartitionCols:key + Filter Operator [FIL_29] (rows=1/4 width=20) + predicate:key is not null + TableScan [TS_2] (rows=1/4 width=20) + default@t3,c,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + <-Map 4 [BROADCAST_EDGE] + BROADCAST [RS_11] + PartitionCols:key + Filter Operator [FIL_30] (rows=1/6 width=30) + predicate:key is not null + TableScan [TS_3] (rows=1/6 width=30) + default@t4,d,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + <-Filter Operator [FIL_27] (rows=1/6 width=30) + predicate:key is not null + TableScan [TS_0] (rows=1/6 width=30) + default@t1,a,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + +PREHOOK: query: select /*+ STREAMTABLE(a,c) */ * +FROM T1 a JOIN T2 b ON a.key = b.key + JOIN T3 c ON b.key = c.key + JOIN T4 d ON c.key = d.key +PREHOOK: type: QUERY +PREHOOK: Input: default@t1 +PREHOOK: Input: default@t2 +PREHOOK: Input: default@t3 +PREHOOK: Input: default@t4 +#### A masked pattern was here #### +POSTHOOK: query: select /*+ STREAMTABLE(a,c) */ * +FROM T1 a JOIN T2 b ON a.key = b.key + JOIN T3 c ON b.key = c.key + JOIN T4 d ON c.key = d.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@t1 +POSTHOOK: Input: default@t2 +POSTHOOK: Input: default@t3 +POSTHOOK: Input: default@t4 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select /*+ STREAMTABLE(a,c) */ * +FROM T1 a JOIN T2 b ON a.key = b.key + JOIN T3 c ON b.key = c.key + JOIN T4 d ON c.key = d.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select /*+ STREAMTABLE(a,c) */ * +FROM T1 a JOIN T2 b ON a.key = b.key + JOIN T3 c ON b.key = c.key + JOIN T4 d ON c.key = d.key +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Hint]. + +Vertex dependency in root stage +Map 1 <- Map 2 (BROADCAST_EDGE), Map 3 (BROADCAST_EDGE), Map 4 (BROADCAST_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Map 1 + File Output Operator [FS_14] + Select Operator [SEL_13] (rows=3/1 width=33) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] + Map Join Operator [MAPJOIN_31] (rows=3/1 width=33) + Conds:FIL_27.key=RS_7.key(Inner),RS_7.key=RS_9.key(Inner),RS_9.key=RS_11.key(Inner),HybridGraceHashJoin:true,Output:["_col0","_col1","_col5","_col6","_col10","_col11","_col15","_col16"] + <-Map 2 [BROADCAST_EDGE] + BROADCAST [RS_7] + PartitionCols:key + Filter Operator [FIL_28] (rows=1/6 width=30) + predicate:key is not null + TableScan [TS_1] (rows=1/6 width=30) + default@t2,b,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + <-Map 3 [BROADCAST_EDGE] + BROADCAST [RS_9] + PartitionCols:key + Filter Operator [FIL_29] (rows=1/4 width=20) + predicate:key is not null + TableScan [TS_2] (rows=1/4 width=20) + default@t3,c,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + <-Map 4 [BROADCAST_EDGE] + BROADCAST [RS_11] + PartitionCols:key + Filter Operator [FIL_30] (rows=1/6 width=30) + predicate:key is not null + TableScan [TS_3] (rows=1/6 width=30) + default@t4,d,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + <-Filter Operator [FIL_27] (rows=1/6 width=30) + predicate:key is not null + TableScan [TS_0] (rows=1/6 width=30) + default@t1,a,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + +PREHOOK: query: FROM T1 a JOIN src c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@t1 +#### A masked pattern was here #### +POSTHOOK: query: FROM T1 a JOIN src c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@t1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze FROM T1 a JOIN src c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze FROM T1 a JOIN src c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Hint]. + +Vertex dependency in root stage +Map 2 <- Map 1 (BROADCAST_EDGE) +Reducer 3 <- Map 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_13] + Group By Operator [GBY_11] (rows=1/1 width=24) + Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_10] + Group By Operator [GBY_9] (rows=1/1 width=24) + Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"] + <-Map 2 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:rand() + Map Join Operator [MAPJOIN_18] (rows=550/4 width=87) + Conds:RS_3.UDFToDouble(key)=FIL_17.(key + 1)(Inner),HybridGraceHashJoin:true,Output:["_col0","_col1","_col5"] + <-Map 1 [BROADCAST_EDGE] + BROADCAST [RS_3] + PartitionCols:UDFToDouble(key) + Filter Operator [FIL_16] (rows=1/6 width=30) + predicate:UDFToDouble(key) is not null + TableScan [TS_0] (rows=1/6 width=30) + default@t1,a,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + <-Filter Operator [FIL_17] (rows=500/500 width=87) + predicate:(key + 1) is not null + TableScan [TS_1] (rows=500/500 width=87) + default@src,c,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + +PREHOOK: query: FROM T1 a JOIN src c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@t1 +#### A masked pattern was here #### +POSTHOOK: query: FROM T1 a JOIN src c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@t1 +#### A masked pattern was here #### +198 6274 194 +PREHOOK: query: select * FROM +(select src.* FROM src) x +JOIN +(select src.* FROM src) Y +ON (x.key = Y.key) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: select * FROM +(select src.* FROM src) x +JOIN +(select src.* FROM src) Y +ON (x.key = Y.key) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select * FROM +(select src.* FROM src) x +JOIN +(select src.* FROM src) Y +ON (x.key = Y.key) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select * FROM +(select src.* FROM src) x +JOIN +(select src.* FROM src) Y +ON (x.key = Y.key) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_10] + Merge Join Operator [MERGEJOIN_15] (rows=1219/1028 width=356) + Conds:RS_6._col0=RS_7._col0(Inner),Output:["_col0","_col1","_col2","_col3"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_13] (rows=500/500 width=178) + predicate:key is not null + TableScan [TS_0] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_14] (rows=500/500 width=178) + predicate:key is not null + TableScan [TS_3] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: select /*+ mapjoin(k)*/ sum(hash(k.key)), sum(hash(v.val)) from T1 k join T1 v on k.key=v.val +PREHOOK: type: QUERY +PREHOOK: Input: default@t1 +#### A masked pattern was here #### +POSTHOOK: query: select /*+ mapjoin(k)*/ sum(hash(k.key)), sum(hash(v.val)) from T1 k join T1 v on k.key=v.val +POSTHOOK: type: QUERY +POSTHOOK: Input: default@t1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select /*+ mapjoin(k)*/ sum(hash(k.key)), sum(hash(v.val)) from T1 k join T1 v on k.key=v.val +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select /*+ mapjoin(k)*/ sum(hash(k.key)), sum(hash(v.val)) from T1 k join T1 v on k.key=v.val +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Hint]. + +Vertex dependency in root stage +Map 1 <- Map 4 (BROADCAST_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_13] + Group By Operator [GBY_11] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_10] + Group By Operator [GBY_9] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_8] + PartitionCols:rand() + Map Join Operator [MAPJOIN_18] (rows=1/0 width=33) + Conds:FIL_16.key=RS_5.val(Inner),HybridGraceHashJoin:true,Output:["_col0","_col6"] + <-Map 4 [BROADCAST_EDGE] + BROADCAST [RS_5] + PartitionCols:val + Filter Operator [FIL_17] (rows=1/6 width=30) + predicate:val is not null + TableScan [TS_1] (rows=1/6 width=30) + default@t1,v,Tbl:COMPLETE,Col:NONE,Output:["val"] + <-Filter Operator [FIL_16] (rows=1/6 width=30) + predicate:key is not null + TableScan [TS_0] (rows=1/6 width=30) + default@t1,k,Tbl:COMPLETE,Col:NONE,Output:["key"] + +PREHOOK: query: select sum(hash(k.key)), sum(hash(v.val)) from T1 k join T1 v on k.key=v.key +PREHOOK: type: QUERY +PREHOOK: Input: default@t1 +#### A masked pattern was here #### +POSTHOOK: query: select sum(hash(k.key)), sum(hash(v.val)) from T1 k join T1 v on k.key=v.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@t1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select sum(hash(k.key)), sum(hash(v.val)) from T1 k join T1 v on k.key=v.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select sum(hash(k.key)), sum(hash(v.val)) from T1 k join T1 v on k.key=v.key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Map 4 (BROADCAST_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_16] + Group By Operator [GBY_14] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_13] + Group By Operator [GBY_12] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_11] + PartitionCols:rand() + Select Operator [SEL_9] (rows=1/8 width=33) + Output:["_col0","_col1"] + Map Join Operator [MAPJOIN_21] (rows=1/8 width=33) + Conds:SEL_2._col0=RS_7._col0(Inner),HybridGraceHashJoin:true,Output:["_col0","_col2"] + <-Map 4 [BROADCAST_EDGE] + BROADCAST [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=1/6 width=30) + Output:["_col0","_col1"] + Filter Operator [FIL_20] (rows=1/6 width=30) + predicate:key is not null + TableScan [TS_3] (rows=1/6 width=30) + default@t1,v,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + <-Select Operator [SEL_2] (rows=1/6 width=30) + Output:["_col0"] + Filter Operator [FIL_19] (rows=1/6 width=30) + predicate:key is not null + TableScan [TS_0] (rows=1/6 width=30) + default@t1,k,Tbl:COMPLETE,Col:NONE,Output:["key"] + +PREHOOK: query: select count(1) from T1 a join T1 b on a.key = b.key +PREHOOK: type: QUERY +PREHOOK: Input: default@t1 +#### A masked pattern was here #### +POSTHOOK: query: select count(1) from T1 a join T1 b on a.key = b.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@t1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select count(1) from T1 a join T1 b on a.key = b.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select count(1) from T1 a join T1 b on a.key = b.key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Map 4 (BROADCAST_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_16] + Group By Operator [GBY_14] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_13] + Group By Operator [GBY_12] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(1)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_11] + PartitionCols:rand() + Map Join Operator [MAPJOIN_21] (rows=1/8 width=33) + Conds:SEL_2._col0=RS_7._col0(Inner),HybridGraceHashJoin:true + <-Map 4 [BROADCAST_EDGE] + BROADCAST [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=1/6 width=30) + Output:["_col0"] + Filter Operator [FIL_20] (rows=1/6 width=30) + predicate:key is not null + TableScan [TS_3] (rows=1/6 width=30) + default@t1,b,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Select Operator [SEL_2] (rows=1/6 width=30) + Output:["_col0"] + Filter Operator [FIL_19] (rows=1/6 width=30) + predicate:key is not null + TableScan [TS_0] (rows=1/6 width=30) + default@t1,a,Tbl:COMPLETE,Col:NONE,Output:["key"] + +PREHOOK: query: FROM T1 a LEFT OUTER JOIN T2 c ON c.key+1=a.key select sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +PREHOOK: type: QUERY +PREHOOK: Input: default@t1 +PREHOOK: Input: default@t2 +#### A masked pattern was here #### +POSTHOOK: query: FROM T1 a LEFT OUTER JOIN T2 c ON c.key+1=a.key select sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@t1 +POSTHOOK: Input: default@t2 +#### A masked pattern was here #### +PREHOOK: query: explain analyze FROM T1 a LEFT OUTER JOIN T2 c ON c.key+1=a.key select sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze FROM T1 a LEFT OUTER JOIN T2 c ON c.key+1=a.key select sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Map 4 (BROADCAST_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_14] + Group By Operator [GBY_12] (rows=1/1 width=24) + Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_11] + Group By Operator [GBY_10] (rows=1/1 width=24) + Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:rand() + Select Operator [SEL_7] (rows=1/6 width=33) + Output:["_col0","_col1","_col2"] + Map Join Operator [MAPJOIN_17] (rows=1/6 width=33) + Conds:SEL_1.UDFToDouble(_col0)=RS_5.(UDFToDouble(_col0) + 1.0)(Left Outer),HybridGraceHashJoin:true,Output:["_col0","_col1","_col2"] + <-Map 4 [BROADCAST_EDGE] + BROADCAST [RS_5] + PartitionCols:(UDFToDouble(_col0) + 1.0) + Select Operator [SEL_3] (rows=1/6 width=30) + Output:["_col0"] + TableScan [TS_2] (rows=1/6 width=30) + default@t2,c,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Select Operator [SEL_1] (rows=1/6 width=30) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=1/6 width=30) + default@t1,a,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + +PREHOOK: query: FROM T1 a RIGHT OUTER JOIN T2 c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +PREHOOK: type: QUERY +PREHOOK: Input: default@t1 +PREHOOK: Input: default@t2 +#### A masked pattern was here #### +POSTHOOK: query: FROM T1 a RIGHT OUTER JOIN T2 c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@t1 +POSTHOOK: Input: default@t2 +#### A masked pattern was here #### +PREHOOK: query: explain analyze FROM T1 a RIGHT OUTER JOIN T2 c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze FROM T1 a RIGHT OUTER JOIN T2 c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Hint]. + +Vertex dependency in root stage +Map 2 <- Map 1 (BROADCAST_EDGE) +Reducer 3 <- Map 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_11] + Group By Operator [GBY_9] (rows=1/1 width=24) + Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_8] + Group By Operator [GBY_7] (rows=1/1 width=24) + Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"] + <-Map 2 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:rand() + Map Join Operator [MAPJOIN_14] (rows=1/6 width=33) + Conds:RS_2.UDFToDouble(key)=TS_1.(key + 1)(Right Outer),HybridGraceHashJoin:true,Output:["_col0","_col1","_col5"] + <-Map 1 [BROADCAST_EDGE] + BROADCAST [RS_2] + PartitionCols:UDFToDouble(key) + TableScan [TS_0] (rows=1/6 width=30) + default@t1,a,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + <-TableScan [TS_1] (rows=1/6 width=30) + default@t2,c,Tbl:COMPLETE,Col:NONE,Output:["key"] + +PREHOOK: query: FROM T1 a FULL OUTER JOIN T2 c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +PREHOOK: type: QUERY +PREHOOK: Input: default@t1 +PREHOOK: Input: default@t2 +#### A masked pattern was here #### +POSTHOOK: query: FROM T1 a FULL OUTER JOIN T2 c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@t1 +POSTHOOK: Input: default@t2 +#### A masked pattern was here #### +PREHOOK: query: explain analyze FROM T1 a FULL OUTER JOIN T2 c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze FROM T1 a FULL OUTER JOIN T2 c ON c.key+1=a.key select /*+ STREAMTABLE(a) */ sum(hash(a.key)), sum(hash(a.val)), sum(hash(c.key)) +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Hint]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_11] + Group By Operator [GBY_9] (rows=1/1 width=24) + Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_8] + Group By Operator [GBY_7] (rows=1/1 width=24) + Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:rand() + Merge Join Operator [MERGEJOIN_12] (rows=1/11 width=33) + Conds:RS_2.UDFToDouble(key)=RS_3.(key + 1)(Outer),Output:["_col0","_col1","_col5"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + PartitionCols:UDFToDouble(key) + TableScan [TS_0] (rows=1/6 width=30) + default@t1,a,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + <-Map 5 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:(key + 1) + TableScan [TS_1] (rows=1/6 width=30) + default@t2,c,Tbl:COMPLETE,Col:NONE,Output:["key"] + +PREHOOK: query: select /*+ mapjoin(v)*/ sum(hash(k.key)), sum(hash(v.val)) from T1 k left outer join T1 v on k.key+1=v.key +PREHOOK: type: QUERY +PREHOOK: Input: default@t1 +#### A masked pattern was here #### +POSTHOOK: query: select /*+ mapjoin(v)*/ sum(hash(k.key)), sum(hash(v.val)) from T1 k left outer join T1 v on k.key+1=v.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@t1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select /*+ mapjoin(v)*/ sum(hash(k.key)), sum(hash(v.val)) from T1 k left outer join T1 v on k.key+1=v.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select /*+ mapjoin(v)*/ sum(hash(k.key)), sum(hash(v.val)) from T1 k left outer join T1 v on k.key+1=v.key +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Hint]. + +Vertex dependency in root stage +Map 1 <- Map 4 (BROADCAST_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_11] + Group By Operator [GBY_9] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_8] + Group By Operator [GBY_7] (rows=1/1 width=16) + Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:rand() + Map Join Operator [MAPJOIN_14] (rows=1/7 width=33) + Conds:TS_0.(key + 1)=RS_3.UDFToDouble(key)(Left Outer),HybridGraceHashJoin:true,Output:["_col0","_col6"] + <-Map 4 [BROADCAST_EDGE] + BROADCAST [RS_3] + PartitionCols:UDFToDouble(key) + TableScan [TS_1] (rows=1/6 width=30) + default@t1,v,Tbl:COMPLETE,Col:NONE,Output:["key","val"] + <-TableScan [TS_0] (rows=1/6 width=30) + default@t1,k,Tbl:COMPLETE,Col:NONE,Output:["key"] + diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_2.q.out b/ql/src/test/results/clientpositive/tez/explainanalyze_2.q.out new file mode 100644 index 0000000..37fc7d3 --- /dev/null +++ b/ql/src/test/results/clientpositive/tez/explainanalyze_2.q.out @@ -0,0 +1,4827 @@ +PREHOOK: query: -- SORT_QUERY_RESULTS + +CREATE TABLE dest_j1(key STRING, value STRING, val2 STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@dest_j1 +POSTHOOK: query: -- SORT_QUERY_RESULTS + +CREATE TABLE dest_j1(key STRING, value STRING, val2 STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@dest_j1 +PREHOOK: query: CREATE TABLE ss(k1 STRING,v1 STRING,k2 STRING,v2 STRING,k3 STRING,v3 STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@ss +POSTHOOK: query: CREATE TABLE ss(k1 STRING,v1 STRING,k2 STRING,v2 STRING,k3 STRING,v3 STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@ss +PREHOOK: query: CREATE TABLE sr(k1 STRING,v1 STRING,k2 STRING,v2 STRING,k3 STRING,v3 STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@sr +POSTHOOK: query: CREATE TABLE sr(k1 STRING,v1 STRING,k2 STRING,v2 STRING,k3 STRING,v3 STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@sr +PREHOOK: query: CREATE TABLE cs(k1 STRING,v1 STRING,k2 STRING,v2 STRING,k3 STRING,v3 STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@cs +POSTHOOK: query: CREATE TABLE cs(k1 STRING,v1 STRING,k2 STRING,v2 STRING,k3 STRING,v3 STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@cs +PREHOOK: query: INSERT OVERWRITE TABLE ss +SELECT x.key,x.value,y.key,y.value,z.key,z.value +FROM src1 x +JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Input: default@srcpart +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +PREHOOK: Output: default@ss +POSTHOOK: query: INSERT OVERWRITE TABLE ss +SELECT x.key,x.value,y.key,y.value,z.key,z.value +FROM src1 x +JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Input: default@srcpart +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +POSTHOOK: Output: default@ss +POSTHOOK: Lineage: ss.k1 SIMPLE [(src1)x.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: ss.k2 SIMPLE [(src)y.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: ss.k3 SIMPLE [(srcpart)z.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: ss.v1 SIMPLE [(src1)x.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: ss.v2 SIMPLE [(src)y.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: ss.v3 SIMPLE [(srcpart)z.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: INSERT OVERWRITE TABLE sr +SELECT x.key,x.value,y.key,y.value,z.key,z.value +FROM src1 x +JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=12) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Input: default@srcpart +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +PREHOOK: Output: default@sr +POSTHOOK: query: INSERT OVERWRITE TABLE sr +SELECT x.key,x.value,y.key,y.value,z.key,z.value +FROM src1 x +JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=12) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Input: default@srcpart +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +POSTHOOK: Output: default@sr +POSTHOOK: Lineage: sr.k1 SIMPLE [(src1)x.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: sr.k2 SIMPLE [(src)y.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: sr.k3 SIMPLE [(srcpart)z.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: sr.v1 SIMPLE [(src1)x.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: sr.v2 SIMPLE [(src)y.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: sr.v3 SIMPLE [(srcpart)z.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: INSERT OVERWRITE TABLE cs +SELECT x.key,x.value,y.key,y.value,z.key,z.value +FROM src1 x +JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08') +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Input: default@srcpart +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +PREHOOK: Output: default@cs +POSTHOOK: query: INSERT OVERWRITE TABLE cs +SELECT x.key,x.value,y.key,y.value,z.key,z.value +FROM src1 x +JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08') +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Input: default@srcpart +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +POSTHOOK: Output: default@cs +POSTHOOK: Lineage: cs.k1 SIMPLE [(src1)x.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: cs.k2 SIMPLE [(src)y.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: cs.k3 SIMPLE [(srcpart)z.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: cs.v1 SIMPLE [(src1)x.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: cs.v2 SIMPLE [(src)y.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: cs.v3 SIMPLE [(srcpart)z.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: ANALYZE TABLE ss COMPUTE STATISTICS +PREHOOK: type: QUERY +PREHOOK: Input: default@ss +PREHOOK: Output: default@ss +POSTHOOK: query: ANALYZE TABLE ss COMPUTE STATISTICS +POSTHOOK: type: QUERY +POSTHOOK: Input: default@ss +POSTHOOK: Output: default@ss +PREHOOK: query: ANALYZE TABLE ss COMPUTE STATISTICS FOR COLUMNS k1,v1,k2,v2,k3,v3 +PREHOOK: type: QUERY +PREHOOK: Input: default@ss +#### A masked pattern was here #### +POSTHOOK: query: ANALYZE TABLE ss COMPUTE STATISTICS FOR COLUMNS k1,v1,k2,v2,k3,v3 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@ss +#### A masked pattern was here #### +PREHOOK: query: ANALYZE TABLE sr COMPUTE STATISTICS +PREHOOK: type: QUERY +PREHOOK: Input: default@sr +PREHOOK: Output: default@sr +POSTHOOK: query: ANALYZE TABLE sr COMPUTE STATISTICS +POSTHOOK: type: QUERY +POSTHOOK: Input: default@sr +POSTHOOK: Output: default@sr +PREHOOK: query: ANALYZE TABLE sr COMPUTE STATISTICS FOR COLUMNS k1,v1,k2,v2,k3,v3 +PREHOOK: type: QUERY +PREHOOK: Input: default@sr +#### A masked pattern was here #### +POSTHOOK: query: ANALYZE TABLE sr COMPUTE STATISTICS FOR COLUMNS k1,v1,k2,v2,k3,v3 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@sr +#### A masked pattern was here #### +PREHOOK: query: ANALYZE TABLE cs COMPUTE STATISTICS +PREHOOK: type: QUERY +PREHOOK: Input: default@cs +PREHOOK: Output: default@cs +POSTHOOK: query: ANALYZE TABLE cs COMPUTE STATISTICS +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cs +POSTHOOK: Output: default@cs +PREHOOK: query: ANALYZE TABLE cs COMPUTE STATISTICS FOR COLUMNS k1,v1,k2,v2,k3,v3 +PREHOOK: type: QUERY +PREHOOK: Input: default@cs +#### A masked pattern was here #### +POSTHOOK: query: ANALYZE TABLE cs COMPUTE STATISTICS FOR COLUMNS k1,v1,k2,v2,k3,v3 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cs +#### A masked pattern was here #### +PREHOOK: query: SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Input: default@srcpart +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +#### A masked pattern was here #### +POSTHOOK: query: SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Input: default@srcpart +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) +Reducer 3 <- Map 5 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_16] + Select Operator [SEL_15] (rows=141/85 width=268) + Output:["_col0","_col1","_col2"] + Merge Join Operator [MERGEJOIN_26] (rows=141/85 width=268) + Conds:RS_12._col3=RS_13._col0(Inner),Output:["_col0","_col3","_col6"] + <-Map 5 [SIMPLE_EDGE] + SHUFFLE [RS_13] + PartitionCols:_col0 + Select Operator [SEL_8] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_24] (rows=500/500 width=178) + predicate:key is not null + TableScan [TS_6] (rows=500/500 width=178) + default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_12] + PartitionCols:_col3 + Merge Join Operator [MERGEJOIN_25] (rows=58/41 width=177) + Conds:RS_9._col0=RS_10._col1(Inner),Output:["_col0","_col3"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_9] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=500/500 width=369) + Output:["_col0"] + Filter Operator [FIL_22] (rows=500/500 width=91) + predicate:value is not null + TableScan [TS_0] (rows=500/500 width=91) + default@srcpart,z,Tbl:COMPLETE,Col:COMPLETE,Output:["value"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_10] + PartitionCols:_col1 + Select Operator [SEL_5] (rows=25/25 width=175) + Output:["_col0","_col1"] + Filter Operator [FIL_23] (rows=25/25 width=175) + predicate:(key is not null and value is not null) + TableScan [TS_3] (rows=25/25 width=175) + default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: select +ss.k1,sr.k2,cs.k3,count(ss.v1),count(sr.v2),count(cs.v3) +FROM +ss,sr,cs,src d1,src d2,src d3,src1,srcpart +where + ss.k1 = d1.key +and sr.k1 = d2.key +and cs.k1 = d3.key +and ss.k2 = sr.k2 +and ss.k3 = sr.k3 +and ss.v1 = src1.value +and ss.v2 = srcpart.value +and sr.v2 = cs.v2 +and sr.v3 = cs.v3 +and ss.v3='ssv3' +and sr.v1='srv1' +and src1.key = 'src1key' +and srcpart.key = 'srcpartkey' +and d1.value = 'd1value' +and d2.value in ('2000Q1','2000Q2','2000Q3') +and d3.value in ('2000Q1','2000Q2','2000Q3') +group by +ss.k1,sr.k2,cs.k3 +order by +ss.k1,sr.k2,cs.k3 +limit 100 +PREHOOK: type: QUERY +PREHOOK: Input: default@cs +PREHOOK: Input: default@sr +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Input: default@srcpart +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 +PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 +PREHOOK: Input: default@ss +#### A masked pattern was here #### +POSTHOOK: query: select +ss.k1,sr.k2,cs.k3,count(ss.v1),count(sr.v2),count(cs.v3) +FROM +ss,sr,cs,src d1,src d2,src d3,src1,srcpart +where + ss.k1 = d1.key +and sr.k1 = d2.key +and cs.k1 = d3.key +and ss.k2 = sr.k2 +and ss.k3 = sr.k3 +and ss.v1 = src1.value +and ss.v2 = srcpart.value +and sr.v2 = cs.v2 +and sr.v3 = cs.v3 +and ss.v3='ssv3' +and sr.v1='srv1' +and src1.key = 'src1key' +and srcpart.key = 'srcpartkey' +and d1.value = 'd1value' +and d2.value in ('2000Q1','2000Q2','2000Q3') +and d3.value in ('2000Q1','2000Q2','2000Q3') +group by +ss.k1,sr.k2,cs.k3 +order by +ss.k1,sr.k2,cs.k3 +limit 100 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cs +POSTHOOK: Input: default@sr +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Input: default@srcpart +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 +POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 +POSTHOOK: Input: default@ss +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select +ss.k1,sr.k2,cs.k3,count(ss.v1),count(sr.v2),count(cs.v3) +FROM +ss,sr,cs,src d1,src d2,src d3,src1,srcpart +where + ss.k1 = d1.key +and sr.k1 = d2.key +and cs.k1 = d3.key +and ss.k2 = sr.k2 +and ss.k3 = sr.k3 +and ss.v1 = src1.value +and ss.v2 = srcpart.value +and sr.v2 = cs.v2 +and sr.v3 = cs.v3 +and ss.v3='ssv3' +and sr.v1='srv1' +and src1.key = 'src1key' +and srcpart.key = 'srcpartkey' +and d1.value = 'd1value' +and d2.value in ('2000Q1','2000Q2','2000Q3') +and d3.value in ('2000Q1','2000Q2','2000Q3') +group by +ss.k1,sr.k2,cs.k3 +order by +ss.k1,sr.k2,cs.k3 +limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select +ss.k1,sr.k2,cs.k3,count(ss.v1),count(sr.v2),count(cs.v3) +FROM +ss,sr,cs,src d1,src d2,src d3,src1,srcpart +where + ss.k1 = d1.key +and sr.k1 = d2.key +and cs.k1 = d3.key +and ss.k2 = sr.k2 +and ss.k3 = sr.k3 +and ss.v1 = src1.value +and ss.v2 = srcpart.value +and sr.v2 = cs.v2 +and sr.v3 = cs.v3 +and ss.v3='ssv3' +and sr.v1='srv1' +and src1.key = 'src1key' +and srcpart.key = 'srcpartkey' +and d1.value = 'd1value' +and d2.value in ('2000Q1','2000Q2','2000Q3') +and d3.value in ('2000Q1','2000Q2','2000Q3') +group by +ss.k1,sr.k2,cs.k3 +order by +ss.k1,sr.k2,cs.k3 +limit 100 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 10 <- Map 14 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) +Reducer 11 <- Reducer 10 (SIMPLE_EDGE), Reducer 16 (SIMPLE_EDGE) +Reducer 16 <- Map 15 (SIMPLE_EDGE), Map 17 (SIMPLE_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE) +Reducer 3 <- Reducer 11 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) +Reducer 8 <- Map 12 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE) +Reducer 9 <- Map 13 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:100 + Stage-1 + Reducer 5 + File Output Operator [FS_55] + Limit [LIM_54] (rows=24/0 width=285) + Number of rows:100 + Select Operator [SEL_53] (rows=24/0 width=285) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_52] + Group By Operator [GBY_50] (rows=24/0 width=285) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(VALUE._col0)","count(VALUE._col1)","count(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_49] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_48] (rows=24/0 width=285) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(_col13)","count(_col21)","count(_col3)"],keys:_col12, _col20, _col2 + Select Operator [SEL_47] (rows=650/0 width=534) + Output:["_col12","_col20","_col2","_col13","_col21","_col3"] + Merge Join Operator [MERGEJOIN_97] (rows=650/0 width=534) + Conds:RS_44._col1, _col3=RS_45._col15, _col17(Inner),Output:["_col2","_col3","_col12","_col13","_col20","_col21"] + <-Reducer 11 [SIMPLE_EDGE] + SHUFFLE [RS_45] + PartitionCols:_col15, _col17 + Select Operator [SEL_40] (rows=190/0 width=447) + Output:["_col14","_col15","_col17","_col6","_col7"] + Merge Join Operator [MERGEJOIN_96] (rows=190/0 width=447) + Conds:RS_37._col6, _col4=RS_38._col4, _col2(Inner),Output:["_col2","_col3","_col14","_col15","_col17"] + <-Reducer 10 [SIMPLE_EDGE] + SHUFFLE [RS_37] + PartitionCols:_col6, _col4 + Merge Join Operator [MERGEJOIN_94] (rows=40/0 width=352) + Conds:RS_34._col3=RS_35._col1(Inner),Output:["_col2","_col3","_col4","_col6"] + <-Map 14 [SIMPLE_EDGE] + SHUFFLE [RS_35] + PartitionCols:_col1 + Select Operator [SEL_17] (rows=2/0 width=180) + Output:["_col1"] + Filter Operator [FIL_88] (rows=2/0 width=175) + predicate:((key = 'src1key') and value is not null) + TableScan [TS_15] (rows=25/25 width=175) + default@src1,src1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 9 [SIMPLE_EDGE] + SHUFFLE [RS_34] + PartitionCols:_col3 + Merge Join Operator [MERGEJOIN_93] (rows=40/0 width=352) + Conds:RS_31._col2=RS_32._col0(Inner),Output:["_col2","_col3","_col4","_col6"] + <-Map 13 [SIMPLE_EDGE] + SHUFFLE [RS_32] + PartitionCols:_col0 + Select Operator [SEL_14] (rows=2/0 width=178) + Output:["_col0"] + Filter Operator [FIL_87] (rows=2/0 width=178) + predicate:((value = 'd1value') and key is not null) + TableScan [TS_12] (rows=500/500 width=178) + default@src,d1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 8 [SIMPLE_EDGE] + SHUFFLE [RS_31] + PartitionCols:_col2 + Merge Join Operator [MERGEJOIN_92] (rows=40/0 width=352) + Conds:RS_28._col1=RS_29._col3(Inner),Output:["_col2","_col3","_col4","_col6"] + <-Map 12 [SIMPLE_EDGE] + SHUFFLE [RS_29] + PartitionCols:_col3 + Select Operator [SEL_11] (rows=8/0 width=531) + Output:["_col0","_col1","_col2","_col3","_col4"] + Filter Operator [FIL_86] (rows=8/0 width=534) + predicate:((v3 = 'ssv3') and k2 is not null and k3 is not null and k1 is not null and v1 is not null and v2 is not null) + TableScan [TS_9] (rows=85/85 width=534) + default@ss,ss,Tbl:COMPLETE,Col:COMPLETE,Output:["k1","v1","k2","v2","k3","v3"] + <-Map 7 [SIMPLE_EDGE] + SHUFFLE [RS_28] + PartitionCols:_col1 + Select Operator [SEL_8] (rows=10/0 width=185) + Output:["_col1"] + Filter Operator [FIL_85] (rows=10/0 width=178) + predicate:((key = 'srcpartkey') and value is not null) + TableScan [TS_6] (rows=2000/2000 width=178) + default@srcpart,srcpart,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 16 [SIMPLE_EDGE] + SHUFFLE [RS_38] + PartitionCols:_col4, _col2 + Merge Join Operator [MERGEJOIN_95] (rows=19/0 width=356) + Conds:RS_24._col0=RS_25._col0(Inner),Output:["_col2","_col3","_col4","_col5"] + <-Map 15 [SIMPLE_EDGE] + SHUFFLE [RS_24] + PartitionCols:_col0 + Select Operator [SEL_20] (rows=8/0 width=531) + Output:["_col0","_col2","_col3","_col4","_col5"] + Filter Operator [FIL_89] (rows=8/0 width=534) + predicate:((v1 = 'srv1') and k2 is not null and k3 is not null and v2 is not null and v3 is not null and k1 is not null) + TableScan [TS_18] (rows=85/85 width=534) + default@sr,sr,Tbl:COMPLETE,Col:COMPLETE,Output:["k1","v1","k2","v2","k3","v3"] + <-Map 17 [SIMPLE_EDGE] + SHUFFLE [RS_25] + PartitionCols:_col0 + Select Operator [SEL_23] (rows=500/0 width=178) + Output:["_col0"] + Filter Operator [FIL_90] (rows=500/0 width=178) + predicate:((value) IN ('2000Q1', '2000Q2', '2000Q3') and key is not null) + TableScan [TS_21] (rows=500/500 width=178) + default@src,d2,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_44] + PartitionCols:_col1, _col3 + Merge Join Operator [MERGEJOIN_91] (rows=414/0 width=269) + Conds:RS_41._col0=RS_42._col0(Inner),Output:["_col1","_col2","_col3"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_41] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=170/170 width=356) + Output:["_col0","_col1","_col2","_col3"] + Filter Operator [FIL_83] (rows=170/170 width=356) + predicate:(v2 is not null and v3 is not null and k1 is not null) + TableScan [TS_0] (rows=170/170 width=356) + default@cs,cs,Tbl:COMPLETE,Col:COMPLETE,Output:["k1","v2","k3","v3"] + <-Map 6 [SIMPLE_EDGE] + SHUFFLE [RS_42] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=500/0 width=178) + Output:["_col0"] + Filter Operator [FIL_84] (rows=500/0 width=178) + predicate:((value) IN ('2000Q1', '2000Q2', '2000Q3') and key is not null) + TableScan [TS_3] (rows=500/500 width=178) + default@src,d3,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +#### A masked pattern was here #### +POSTHOOK: query: SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Union 2 (CONTAINS) +Map 11 <- Union 12 (CONTAINS) +Map 16 <- Union 12 (CONTAINS) +Map 8 <- Union 2 (CONTAINS) +Reducer 13 <- Union 12 (SIMPLE_EDGE) +Reducer 14 <- Map 17 (SIMPLE_EDGE), Reducer 13 (SIMPLE_EDGE) +Reducer 15 <- Map 18 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE), Union 6 (CONTAINS) +Reducer 3 <- Union 2 (SIMPLE_EDGE) +Reducer 4 <- Map 9 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE) +Reducer 5 <- Map 10 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE), Union 6 (CONTAINS) +Reducer 7 <- Union 6 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 7 + File Output Operator [FS_59] + Group By Operator [GBY_57] (rows=28/15 width=177) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 6 [SIMPLE_EDGE] + <-Reducer 15 [CONTAINS] + Reduce Output Operator [RS_56] + PartitionCols:_col0, _col1 + Group By Operator [GBY_55] (rows=28/30 width=177) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_51] (rows=73/61 width=177) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_85] (rows=73/61 width=177) + Conds:RS_48._col2=RS_49._col0(Inner),Output:["_col1","_col2"] + <-Map 18 [SIMPLE_EDGE] + SHUFFLE [RS_49] + PartitionCols:_col0 + Select Operator [SEL_44] (rows=500/500 width=87) + Output:["_col0"] + Filter Operator [FIL_81] (rows=500/500 width=87) + predicate:key is not null + TableScan [TS_42] (rows=500/500 width=87) + default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Reducer 14 [SIMPLE_EDGE] + SHUFFLE [RS_48] + PartitionCols:_col2 + Merge Join Operator [MERGEJOIN_84] (rows=30/52 width=177) + Conds:RS_45._col1=RS_46._col1(Inner),Output:["_col1","_col2"] + <-Map 17 [SIMPLE_EDGE] + SHUFFLE [RS_46] + PartitionCols:_col1 + Select Operator [SEL_41] (rows=25/25 width=175) + Output:["_col0","_col1"] + Filter Operator [FIL_80] (rows=25/25 width=175) + predicate:(key is not null and value is not null) + TableScan [TS_39] (rows=25/25 width=175) + default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 13 [SIMPLE_EDGE] + SHUFFLE [RS_45] + PartitionCols:_col1 + Select Operator [SEL_38] (rows=262/319 width=178) + Output:["_col1"] + Group By Operator [GBY_37] (rows=262/319 width=178) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 12 [SIMPLE_EDGE] + <-Map 11 [CONTAINS] + Reduce Output Operator [RS_36] + PartitionCols:_col0, _col1 + Group By Operator [GBY_35] (rows=262/331 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_28] (rows=25/25 width=175) + Output:["_col0","_col1"] + Filter Operator [FIL_78] (rows=25/25 width=175) + predicate:value is not null + TableScan [TS_26] (rows=25/25 width=175) + Output:["key","value"] + <-Map 16 [CONTAINS] + Reduce Output Operator [RS_36] + PartitionCols:_col0, _col1 + Group By Operator [GBY_35] (rows=262/331 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_31] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_79] (rows=500/500 width=178) + predicate:value is not null + TableScan [TS_29] (rows=500/500 width=178) + Output:["key","value"] + <-Reducer 5 [CONTAINS] + Reduce Output Operator [RS_56] + PartitionCols:_col0, _col1 + Group By Operator [GBY_55] (rows=28/30 width=177) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_25] (rows=73/61 width=177) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_83] (rows=73/61 width=177) + Conds:RS_22._col2=RS_23._col0(Inner),Output:["_col1","_col2"] + <-Map 10 [SIMPLE_EDGE] + SHUFFLE [RS_23] + PartitionCols:_col0 + Select Operator [SEL_18] (rows=500/500 width=87) + Output:["_col0"] + Filter Operator [FIL_77] (rows=500/500 width=87) + predicate:key is not null + TableScan [TS_16] (rows=500/500 width=87) + default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_22] + PartitionCols:_col2 + Merge Join Operator [MERGEJOIN_82] (rows=30/52 width=177) + Conds:RS_19._col1=RS_20._col1(Inner),Output:["_col1","_col2"] + <-Map 9 [SIMPLE_EDGE] + SHUFFLE [RS_20] + PartitionCols:_col1 + Select Operator [SEL_15] (rows=25/25 width=175) + Output:["_col0","_col1"] + Filter Operator [FIL_76] (rows=25/25 width=175) + predicate:(key is not null and value is not null) + TableScan [TS_13] (rows=25/25 width=175) + default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_19] + PartitionCols:_col1 + Select Operator [SEL_12] (rows=262/319 width=178) + Output:["_col1"] + Group By Operator [GBY_11] (rows=262/319 width=178) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 2 [SIMPLE_EDGE] + <-Map 1 [CONTAINS] + Reduce Output Operator [RS_10] + PartitionCols:_col0, _col1 + Group By Operator [GBY_9] (rows=262/331 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_2] (rows=25/25 width=175) + Output:["_col0","_col1"] + Filter Operator [FIL_74] (rows=25/25 width=175) + predicate:value is not null + TableScan [TS_0] (rows=25/25 width=175) + Output:["key","value"] + <-Map 8 [CONTAINS] + Reduce Output Operator [RS_10] + PartitionCols:_col0, _col1 + Group By Operator [GBY_9] (rows=262/331 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_5] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_75] (rows=500/500 width=178) + predicate:value is not null + TableScan [TS_3] (rows=500/500 width=178) + Output:["key","value"] + +PREHOOK: query: SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +#### A masked pattern was here #### +POSTHOOK: query: SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Union 2 (CONTAINS) +Map 10 <- Union 2 (CONTAINS) +Map 13 <- Union 14 (CONTAINS) +Map 20 <- Union 14 (CONTAINS) +Map 21 <- Union 16 (CONTAINS) +Map 24 <- Union 25 (CONTAINS) +Map 33 <- Union 25 (CONTAINS) +Map 34 <- Union 27 (CONTAINS) +Map 35 <- Union 29 (CONTAINS) +Reducer 15 <- Union 14 (SIMPLE_EDGE), Union 16 (CONTAINS) +Reducer 17 <- Union 16 (SIMPLE_EDGE) +Reducer 18 <- Map 22 (SIMPLE_EDGE), Reducer 17 (SIMPLE_EDGE) +Reducer 19 <- Map 23 (SIMPLE_EDGE), Reducer 18 (SIMPLE_EDGE), Union 6 (CONTAINS) +Reducer 26 <- Union 25 (SIMPLE_EDGE), Union 27 (CONTAINS) +Reducer 28 <- Union 27 (SIMPLE_EDGE), Union 29 (CONTAINS) +Reducer 3 <- Union 2 (SIMPLE_EDGE) +Reducer 30 <- Union 29 (SIMPLE_EDGE) +Reducer 31 <- Map 36 (SIMPLE_EDGE), Reducer 30 (SIMPLE_EDGE) +Reducer 32 <- Map 37 (SIMPLE_EDGE), Reducer 31 (SIMPLE_EDGE), Union 8 (CONTAINS) +Reducer 4 <- Map 11 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE) +Reducer 5 <- Map 12 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE), Union 6 (CONTAINS) +Reducer 7 <- Union 6 (SIMPLE_EDGE), Union 8 (CONTAINS) +Reducer 9 <- Union 8 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 9 + File Output Operator [FS_122] + Group By Operator [GBY_120] (rows=107/15 width=177) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 8 [SIMPLE_EDGE] + <-Reducer 32 [CONTAINS] + Reduce Output Operator [RS_119] + PartitionCols:_col0, _col1 + Group By Operator [GBY_118] (rows=107/30 width=177) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_114] (rows=124/61 width=177) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_170] (rows=124/61 width=177) + Conds:RS_111._col2=RS_112._col0(Inner),Output:["_col2","_col5"] + <-Map 37 [SIMPLE_EDGE] + SHUFFLE [RS_112] + PartitionCols:_col0 + Select Operator [SEL_107] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_164] (rows=500/500 width=178) + predicate:key is not null + TableScan [TS_105] (rows=500/500 width=178) + default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 31 [SIMPLE_EDGE] + SHUFFLE [RS_111] + PartitionCols:_col2 + Merge Join Operator [MERGEJOIN_169] (rows=51/52 width=86) + Conds:RS_108._col1=RS_109._col1(Inner),Output:["_col2"] + <-Map 36 [SIMPLE_EDGE] + SHUFFLE [RS_109] + PartitionCols:_col1 + Select Operator [SEL_104] (rows=25/25 width=175) + Output:["_col0","_col1"] + Filter Operator [FIL_163] (rows=25/25 width=175) + predicate:(key is not null and value is not null) + TableScan [TS_102] (rows=25/25 width=175) + default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 30 [SIMPLE_EDGE] + SHUFFLE [RS_108] + PartitionCols:_col1 + Select Operator [SEL_101] (rows=440/319 width=178) + Output:["_col1"] + Group By Operator [GBY_100] (rows=440/319 width=178) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 29 [SIMPLE_EDGE] + <-Map 35 [CONTAINS] + Reduce Output Operator [RS_99] + PartitionCols:_col0, _col1 + Group By Operator [GBY_98] (rows=440/628 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_94] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_162] (rows=500/500 width=178) + predicate:value is not null + TableScan [TS_92] (rows=500/500 width=178) + Output:["key","value"] + <-Reducer 28 [CONTAINS] + Reduce Output Operator [RS_99] + PartitionCols:_col0, _col1 + Group By Operator [GBY_98] (rows=440/628 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_91] (rows=381/319 width=178) + Output:["_col0","_col1"] + Group By Operator [GBY_90] (rows=381/319 width=178) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 27 [SIMPLE_EDGE] + <-Map 34 [CONTAINS] + Reduce Output Operator [RS_89] + PartitionCols:_col0, _col1 + Group By Operator [GBY_88] (rows=381/628 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_84] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_161] (rows=500/500 width=178) + predicate:value is not null + TableScan [TS_82] (rows=500/500 width=178) + Output:["key","value"] + <-Reducer 26 [CONTAINS] + Reduce Output Operator [RS_89] + PartitionCols:_col0, _col1 + Group By Operator [GBY_88] (rows=381/628 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_81] (rows=262/319 width=178) + Output:["_col0","_col1"] + Group By Operator [GBY_80] (rows=262/319 width=178) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 25 [SIMPLE_EDGE] + <-Map 24 [CONTAINS] + Reduce Output Operator [RS_79] + PartitionCols:_col0, _col1 + Group By Operator [GBY_78] (rows=262/331 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_71] (rows=25/25 width=175) + Output:["_col0","_col1"] + Filter Operator [FIL_159] (rows=25/25 width=175) + predicate:value is not null + TableScan [TS_69] (rows=25/25 width=175) + Output:["key","value"] + <-Map 33 [CONTAINS] + Reduce Output Operator [RS_79] + PartitionCols:_col0, _col1 + Group By Operator [GBY_78] (rows=262/331 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_74] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_160] (rows=500/500 width=178) + predicate:value is not null + TableScan [TS_72] (rows=500/500 width=178) + Output:["key","value"] + <-Reducer 7 [CONTAINS] + Reduce Output Operator [RS_119] + PartitionCols:_col0, _col1 + Group By Operator [GBY_118] (rows=107/30 width=177) + Output:["_col0","_col1"],keys:_col0, _col1 + Group By Operator [GBY_67] (rows=90/15 width=177) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 6 [SIMPLE_EDGE] + <-Reducer 19 [CONTAINS] + Reduce Output Operator [RS_66] + PartitionCols:_col0, _col1 + Group By Operator [GBY_65] (rows=90/30 width=177) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_61] (rows=107/61 width=177) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_168] (rows=107/61 width=177) + Conds:RS_58._col2=RS_59._col0(Inner),Output:["_col2","_col5"] + <-Map 23 [SIMPLE_EDGE] + SHUFFLE [RS_59] + PartitionCols:_col0 + Select Operator [SEL_54] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_158] (rows=500/500 width=178) + predicate:key is not null + TableScan [TS_52] (rows=500/500 width=178) + default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 18 [SIMPLE_EDGE] + SHUFFLE [RS_58] + PartitionCols:_col2 + Merge Join Operator [MERGEJOIN_167] (rows=44/52 width=86) + Conds:RS_55._col1=RS_56._col1(Inner),Output:["_col2"] + <-Map 22 [SIMPLE_EDGE] + SHUFFLE [RS_56] + PartitionCols:_col1 + Select Operator [SEL_51] (rows=25/25 width=175) + Output:["_col0","_col1"] + Filter Operator [FIL_157] (rows=25/25 width=175) + predicate:(key is not null and value is not null) + TableScan [TS_49] (rows=25/25 width=175) + default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 17 [SIMPLE_EDGE] + SHUFFLE [RS_55] + PartitionCols:_col1 + Select Operator [SEL_48] (rows=381/319 width=178) + Output:["_col1"] + Group By Operator [GBY_47] (rows=381/319 width=178) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 16 [SIMPLE_EDGE] + <-Map 21 [CONTAINS] + Reduce Output Operator [RS_46] + PartitionCols:_col0, _col1 + Group By Operator [GBY_45] (rows=381/628 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_41] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_156] (rows=500/500 width=178) + predicate:value is not null + TableScan [TS_39] (rows=500/500 width=178) + Output:["key","value"] + <-Reducer 15 [CONTAINS] + Reduce Output Operator [RS_46] + PartitionCols:_col0, _col1 + Group By Operator [GBY_45] (rows=381/628 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_38] (rows=262/319 width=178) + Output:["_col0","_col1"] + Group By Operator [GBY_37] (rows=262/319 width=178) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 14 [SIMPLE_EDGE] + <-Map 13 [CONTAINS] + Reduce Output Operator [RS_36] + PartitionCols:_col0, _col1 + Group By Operator [GBY_35] (rows=262/331 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_28] (rows=25/25 width=175) + Output:["_col0","_col1"] + Filter Operator [FIL_154] (rows=25/25 width=175) + predicate:value is not null + TableScan [TS_26] (rows=25/25 width=175) + Output:["key","value"] + <-Map 20 [CONTAINS] + Reduce Output Operator [RS_36] + PartitionCols:_col0, _col1 + Group By Operator [GBY_35] (rows=262/331 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_31] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_155] (rows=500/500 width=178) + predicate:value is not null + TableScan [TS_29] (rows=500/500 width=178) + Output:["key","value"] + <-Reducer 5 [CONTAINS] + Reduce Output Operator [RS_66] + PartitionCols:_col0, _col1 + Group By Operator [GBY_65] (rows=90/30 width=177) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_25] (rows=73/61 width=177) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_166] (rows=73/61 width=177) + Conds:RS_22._col2=RS_23._col0(Inner),Output:["_col2","_col5"] + <-Map 12 [SIMPLE_EDGE] + SHUFFLE [RS_23] + PartitionCols:_col0 + Select Operator [SEL_18] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_153] (rows=500/500 width=178) + predicate:key is not null + TableScan [TS_16] (rows=500/500 width=178) + default@src,y,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_22] + PartitionCols:_col2 + Merge Join Operator [MERGEJOIN_165] (rows=30/52 width=86) + Conds:RS_19._col1=RS_20._col1(Inner),Output:["_col2"] + <-Map 11 [SIMPLE_EDGE] + SHUFFLE [RS_20] + PartitionCols:_col1 + Select Operator [SEL_15] (rows=25/25 width=175) + Output:["_col0","_col1"] + Filter Operator [FIL_152] (rows=25/25 width=175) + predicate:(key is not null and value is not null) + TableScan [TS_13] (rows=25/25 width=175) + default@src1,x,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_19] + PartitionCols:_col1 + Select Operator [SEL_12] (rows=262/319 width=178) + Output:["_col1"] + Group By Operator [GBY_11] (rows=262/319 width=178) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 2 [SIMPLE_EDGE] + <-Map 1 [CONTAINS] + Reduce Output Operator [RS_10] + PartitionCols:_col0, _col1 + Group By Operator [GBY_9] (rows=262/331 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_2] (rows=25/25 width=175) + Output:["_col0","_col1"] + Filter Operator [FIL_150] (rows=25/25 width=175) + predicate:value is not null + TableScan [TS_0] (rows=25/25 width=175) + Output:["key","value"] + <-Map 10 [CONTAINS] + Reduce Output Operator [RS_10] + PartitionCols:_col0, _col1 + Group By Operator [GBY_9] (rows=262/331 width=178) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_5] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_151] (rows=500/500 width=178) + predicate:value is not null + TableScan [TS_3] (rows=500/500 width=178) + Output:["key","value"] + +PREHOOK: query: SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Input: default@srcpart +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +#### A masked pattern was here #### +POSTHOOK: query: SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Input: default@srcpart +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Map 2 (BROADCAST_EDGE), Map 3 (BROADCAST_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Map 1 + File Output Operator [FS_16] + Select Operator [SEL_15] (rows=605/85 width=10) + Output:["_col0","_col1","_col2"] + Map Join Operator [MAPJOIN_26] (rows=605/85 width=10) + Conds:MAPJOIN_25._col3=RS_13._col0(Inner),HybridGraceHashJoin:true,Output:["_col0","_col3","_col6"] + <-Map 3 [BROADCAST_EDGE] + BROADCAST [RS_13] + PartitionCols:_col0 + Select Operator [SEL_8] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_24] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_6] (rows=500/500 width=10) + default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map Join Operator [MAPJOIN_25] (rows=550/41 width=10) + Conds:SEL_2._col0=RS_10._col1(Inner),HybridGraceHashJoin:true,Output:["_col0","_col3"] + <-Map 2 [BROADCAST_EDGE] + BROADCAST [RS_10] + PartitionCols:_col1 + Select Operator [SEL_5] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_23] (rows=25/25 width=7) + predicate:(key is not null and value is not null) + TableScan [TS_3] (rows=25/25 width=7) + default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Select Operator [SEL_2] (rows=500/500 width=10) + Output:["_col0"] + Filter Operator [FIL_22] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_0] (rows=500/500 width=10) + default@srcpart,z,Tbl:COMPLETE,Col:NONE,Output:["value"] + +PREHOOK: query: select +ss.k1,sr.k2,cs.k3,count(ss.v1),count(sr.v2),count(cs.v3) +FROM +ss,sr,cs,src d1,src d2,src d3,src1,srcpart +where + ss.k1 = d1.key +and sr.k1 = d2.key +and cs.k1 = d3.key +and ss.k2 = sr.k2 +and ss.k3 = sr.k3 +and ss.v1 = src1.value +and ss.v2 = srcpart.value +and sr.v2 = cs.v2 +and sr.v3 = cs.v3 +and ss.v3='ssv3' +and sr.v1='srv1' +and src1.key = 'src1key' +and srcpart.key = 'srcpartkey' +and d1.value = 'd1value' +and d2.value in ('2000Q1','2000Q2','2000Q3') +and d3.value in ('2000Q1','2000Q2','2000Q3') +group by +ss.k1,sr.k2,cs.k3 +order by +ss.k1,sr.k2,cs.k3 +limit 100 +PREHOOK: type: QUERY +PREHOOK: Input: default@cs +PREHOOK: Input: default@sr +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Input: default@srcpart +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 +PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 +PREHOOK: Input: default@ss +#### A masked pattern was here #### +POSTHOOK: query: select +ss.k1,sr.k2,cs.k3,count(ss.v1),count(sr.v2),count(cs.v3) +FROM +ss,sr,cs,src d1,src d2,src d3,src1,srcpart +where + ss.k1 = d1.key +and sr.k1 = d2.key +and cs.k1 = d3.key +and ss.k2 = sr.k2 +and ss.k3 = sr.k3 +and ss.v1 = src1.value +and ss.v2 = srcpart.value +and sr.v2 = cs.v2 +and sr.v3 = cs.v3 +and ss.v3='ssv3' +and sr.v1='srv1' +and src1.key = 'src1key' +and srcpart.key = 'srcpartkey' +and d1.value = 'd1value' +and d2.value in ('2000Q1','2000Q2','2000Q3') +and d3.value in ('2000Q1','2000Q2','2000Q3') +group by +ss.k1,sr.k2,cs.k3 +order by +ss.k1,sr.k2,cs.k3 +limit 100 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cs +POSTHOOK: Input: default@sr +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Input: default@srcpart +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 +POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 +POSTHOOK: Input: default@ss +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select +ss.k1,sr.k2,cs.k3,count(ss.v1),count(sr.v2),count(cs.v3) +FROM +ss,sr,cs,src d1,src d2,src d3,src1,srcpart +where + ss.k1 = d1.key +and sr.k1 = d2.key +and cs.k1 = d3.key +and ss.k2 = sr.k2 +and ss.k3 = sr.k3 +and ss.v1 = src1.value +and ss.v2 = srcpart.value +and sr.v2 = cs.v2 +and sr.v3 = cs.v3 +and ss.v3='ssv3' +and sr.v1='srv1' +and src1.key = 'src1key' +and srcpart.key = 'srcpartkey' +and d1.value = 'd1value' +and d2.value in ('2000Q1','2000Q2','2000Q3') +and d3.value in ('2000Q1','2000Q2','2000Q3') +group by +ss.k1,sr.k2,cs.k3 +order by +ss.k1,sr.k2,cs.k3 +limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select +ss.k1,sr.k2,cs.k3,count(ss.v1),count(sr.v2),count(cs.v3) +FROM +ss,sr,cs,src d1,src d2,src d3,src1,srcpart +where + ss.k1 = d1.key +and sr.k1 = d2.key +and cs.k1 = d3.key +and ss.k2 = sr.k2 +and ss.k3 = sr.k3 +and ss.v1 = src1.value +and ss.v2 = srcpart.value +and sr.v2 = cs.v2 +and sr.v3 = cs.v3 +and ss.v3='ssv3' +and sr.v1='srv1' +and src1.key = 'src1key' +and srcpart.key = 'srcpartkey' +and d1.value = 'd1value' +and d2.value in ('2000Q1','2000Q2','2000Q3') +and d3.value in ('2000Q1','2000Q2','2000Q3') +group by +ss.k1,sr.k2,cs.k3 +order by +ss.k1,sr.k2,cs.k3 +limit 100 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 10 <- Map 9 (BROADCAST_EDGE) +Map 2 <- Map 1 (BROADCAST_EDGE) +Map 3 <- Map 10 (BROADCAST_EDGE), Map 2 (BROADCAST_EDGE), Map 6 (BROADCAST_EDGE), Map 7 (BROADCAST_EDGE), Map 8 (BROADCAST_EDGE) +Reducer 4 <- Map 3 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:100 + Stage-1 + Reducer 5 + File Output Operator [FS_55] + Limit [LIM_54] (rows=100/0 width=10) + Number of rows:100 + Select Operator [SEL_53] (rows=805/0 width=10) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_52] + Group By Operator [GBY_50] (rows=805/0 width=10) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(VALUE._col0)","count(VALUE._col1)","count(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2 + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_49] + PartitionCols:_col0, _col1, _col2 + Group By Operator [GBY_48] (rows=1610/0 width=10) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(_col13)","count(_col21)","count(_col3)"],keys:_col12, _col20, _col2 + Select Operator [SEL_47] (rows=1610/0 width=10) + Output:["_col12","_col20","_col2","_col13","_col21","_col3"] + Map Join Operator [MAPJOIN_97] (rows=1610/0 width=10) + Conds:RS_44._col1, _col3=SEL_40._col15, _col17(Inner),HybridGraceHashJoin:true,Output:["_col2","_col3","_col12","_col13","_col20","_col21"] + <-Map 2 [BROADCAST_EDGE] + BROADCAST [RS_44] + PartitionCols:_col1, _col3 + Map Join Operator [MAPJOIN_91] (rows=275/0 width=10) + Conds:RS_41._col0=SEL_5._col0(Inner),HybridGraceHashJoin:true,Output:["_col1","_col2","_col3"] + <-Map 1 [BROADCAST_EDGE] + BROADCAST [RS_41] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=170/170 width=34) + Output:["_col0","_col1","_col2","_col3"] + Filter Operator [FIL_83] (rows=170/170 width=34) + predicate:(v2 is not null and v3 is not null and k1 is not null) + TableScan [TS_0] (rows=170/170 width=34) + default@cs,cs,Tbl:COMPLETE,Col:NONE,Output:["k1","v2","k3","v3"] + <-Select Operator [SEL_5] (rows=250/0 width=10) + Output:["_col0"] + Filter Operator [FIL_84] (rows=250/0 width=10) + predicate:((value) IN ('2000Q1', '2000Q2', '2000Q3') and key is not null) + TableScan [TS_3] (rows=500/500 width=10) + default@src,d3,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Select Operator [SEL_40] (rows=1464/0 width=10) + Output:["_col14","_col15","_col17","_col6","_col7"] + Map Join Operator [MAPJOIN_96] (rows=1464/0 width=10) + Conds:MAPJOIN_94._col6, _col4=RS_38._col4, _col2(Inner),HybridGraceHashJoin:true,Output:["_col2","_col3","_col14","_col15","_col17"] + <-Map 10 [BROADCAST_EDGE] + BROADCAST [RS_38] + PartitionCols:_col4, _col2 + Map Join Operator [MAPJOIN_95] (rows=275/0 width=10) + Conds:RS_24._col0=SEL_23._col0(Inner),HybridGraceHashJoin:true,Output:["_col2","_col3","_col4","_col5"] + <-Map 9 [BROADCAST_EDGE] + BROADCAST [RS_24] + PartitionCols:_col0 + Select Operator [SEL_20] (rows=42/0 width=34) + Output:["_col0","_col2","_col3","_col4","_col5"] + Filter Operator [FIL_89] (rows=42/0 width=34) + predicate:((v1 = 'srv1') and k2 is not null and k3 is not null and v2 is not null and v3 is not null and k1 is not null) + TableScan [TS_18] (rows=85/85 width=34) + default@sr,sr,Tbl:COMPLETE,Col:NONE,Output:["k1","v1","k2","v2","k3","v3"] + <-Select Operator [SEL_23] (rows=250/0 width=10) + Output:["_col0"] + Filter Operator [FIL_90] (rows=250/0 width=10) + predicate:((value) IN ('2000Q1', '2000Q2', '2000Q3') and key is not null) + TableScan [TS_21] (rows=500/500 width=10) + default@src,d2,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map Join Operator [MAPJOIN_94] (rows=1331/0 width=10) + Conds:MAPJOIN_93._col3=RS_35._col1(Inner),HybridGraceHashJoin:true,Output:["_col2","_col3","_col4","_col6"] + <-Map 8 [BROADCAST_EDGE] + BROADCAST [RS_35] + PartitionCols:_col1 + Select Operator [SEL_17] (rows=12/0 width=7) + Output:["_col1"] + Filter Operator [FIL_88] (rows=12/0 width=7) + predicate:((key = 'src1key') and value is not null) + TableScan [TS_15] (rows=25/25 width=7) + default@src1,src1,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map Join Operator [MAPJOIN_93] (rows=1210/0 width=10) + Conds:MAPJOIN_92._col2=RS_32._col0(Inner),HybridGraceHashJoin:true,Output:["_col2","_col3","_col4","_col6"] + <-Map 7 [BROADCAST_EDGE] + BROADCAST [RS_32] + PartitionCols:_col0 + Select Operator [SEL_14] (rows=250/0 width=10) + Output:["_col0"] + Filter Operator [FIL_87] (rows=250/0 width=10) + predicate:((value = 'd1value') and key is not null) + TableScan [TS_12] (rows=500/500 width=10) + default@src,d1,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map Join Operator [MAPJOIN_92] (rows=1100/0 width=10) + Conds:SEL_8._col1=RS_29._col3(Inner),HybridGraceHashJoin:true,Output:["_col2","_col3","_col4","_col6"] + <-Map 6 [BROADCAST_EDGE] + BROADCAST [RS_29] + PartitionCols:_col3 + Select Operator [SEL_11] (rows=42/0 width=34) + Output:["_col0","_col1","_col2","_col3","_col4"] + Filter Operator [FIL_86] (rows=42/0 width=34) + predicate:((v3 = 'ssv3') and k2 is not null and k3 is not null and k1 is not null and v1 is not null and v2 is not null) + TableScan [TS_9] (rows=85/85 width=34) + default@ss,ss,Tbl:COMPLETE,Col:NONE,Output:["k1","v1","k2","v2","k3","v3"] + <-Select Operator [SEL_8] (rows=1000/0 width=10) + Output:["_col1"] + Filter Operator [FIL_85] (rows=1000/0 width=10) + predicate:((key = 'srcpartkey') and value is not null) + TableScan [TS_6] (rows=2000/2000 width=10) + default@srcpart,srcpart,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +#### A masked pattern was here #### +POSTHOOK: query: SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, z.value, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Union 2 (CONTAINS) +Map 12 <- Union 10 (CONTAINS) +Map 6 <- Union 2 (CONTAINS) +Map 9 <- Union 10 (CONTAINS) +Reducer 11 <- Map 13 (BROADCAST_EDGE), Map 14 (BROADCAST_EDGE), Union 10 (SIMPLE_EDGE), Union 4 (CONTAINS) +Reducer 3 <- Map 7 (BROADCAST_EDGE), Map 8 (BROADCAST_EDGE), Union 2 (SIMPLE_EDGE), Union 4 (CONTAINS) +Reducer 5 <- Union 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 5 + File Output Operator [FS_59] + Group By Operator [GBY_57] (rows=550/15 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 4 [SIMPLE_EDGE] + <-Reducer 11 [CONTAINS] + Reduce Output Operator [RS_56] + PartitionCols:_col0, _col1 + Group By Operator [GBY_55] (rows=1100/30 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_51] (rows=550/61 width=10) + Output:["_col0","_col1"] + Map Join Operator [MAPJOIN_85] (rows=550/61 width=10) + Conds:MAPJOIN_84._col2=RS_49._col0(Inner),HybridGraceHashJoin:true,Output:["_col1","_col2"] + <-Map 14 [BROADCAST_EDGE] + BROADCAST [RS_49] + PartitionCols:_col0 + Select Operator [SEL_44] (rows=500/500 width=10) + Output:["_col0"] + Filter Operator [FIL_81] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_42] (rows=500/500 width=10) + default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Map Join Operator [MAPJOIN_84] (rows=288/52 width=10) + Conds:SEL_38._col1=RS_46._col1(Inner),HybridGraceHashJoin:true,Output:["_col1","_col2"] + <-Map 13 [BROADCAST_EDGE] + BROADCAST [RS_46] + PartitionCols:_col1 + Select Operator [SEL_41] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_80] (rows=25/25 width=7) + predicate:(key is not null and value is not null) + TableScan [TS_39] (rows=25/25 width=7) + default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Select Operator [SEL_38] (rows=262/319 width=10) + Output:["_col1"] + Group By Operator [GBY_37] (rows=262/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 10 [SIMPLE_EDGE] + <-Map 12 [CONTAINS] + Reduce Output Operator [RS_36] + PartitionCols:_col0, _col1 + Group By Operator [GBY_35] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_31] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_79] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_29] (rows=500/500 width=10) + Output:["key","value"] + <-Map 9 [CONTAINS] + Reduce Output Operator [RS_36] + PartitionCols:_col0, _col1 + Group By Operator [GBY_35] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_28] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_78] (rows=25/25 width=7) + predicate:value is not null + TableScan [TS_26] (rows=25/25 width=7) + Output:["key","value"] + <-Reducer 3 [CONTAINS] + Reduce Output Operator [RS_56] + PartitionCols:_col0, _col1 + Group By Operator [GBY_55] (rows=1100/30 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_25] (rows=550/61 width=10) + Output:["_col0","_col1"] + Map Join Operator [MAPJOIN_83] (rows=550/61 width=10) + Conds:MAPJOIN_82._col2=RS_23._col0(Inner),HybridGraceHashJoin:true,Output:["_col1","_col2"] + <-Map 8 [BROADCAST_EDGE] + BROADCAST [RS_23] + PartitionCols:_col0 + Select Operator [SEL_18] (rows=500/500 width=10) + Output:["_col0"] + Filter Operator [FIL_77] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_16] (rows=500/500 width=10) + default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Map Join Operator [MAPJOIN_82] (rows=288/52 width=10) + Conds:SEL_12._col1=RS_20._col1(Inner),HybridGraceHashJoin:true,Output:["_col1","_col2"] + <-Map 7 [BROADCAST_EDGE] + BROADCAST [RS_20] + PartitionCols:_col1 + Select Operator [SEL_15] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_76] (rows=25/25 width=7) + predicate:(key is not null and value is not null) + TableScan [TS_13] (rows=25/25 width=7) + default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Select Operator [SEL_12] (rows=262/319 width=10) + Output:["_col1"] + Group By Operator [GBY_11] (rows=262/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 2 [SIMPLE_EDGE] + <-Map 1 [CONTAINS] + Reduce Output Operator [RS_10] + PartitionCols:_col0, _col1 + Group By Operator [GBY_9] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_2] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_74] (rows=25/25 width=7) + predicate:value is not null + TableScan [TS_0] (rows=25/25 width=7) + Output:["key","value"] + <-Map 6 [CONTAINS] + Reduce Output Operator [RS_10] + PartitionCols:_col0, _col1 + Group By Operator [GBY_9] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_5] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_75] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_3] (rows=500/500 width=10) + Output:["key","value"] + +PREHOOK: query: SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +#### A masked pattern was here #### +POSTHOOK: query: SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Union 2 (CONTAINS) +Map 11 <- Union 12 (CONTAINS) +Map 16 <- Union 12 (CONTAINS) +Map 17 <- Union 14 (CONTAINS) +Map 20 <- Union 21 (CONTAINS) +Map 27 <- Union 21 (CONTAINS) +Map 28 <- Union 23 (CONTAINS) +Map 29 <- Union 25 (CONTAINS) +Map 8 <- Union 2 (CONTAINS) +Reducer 13 <- Union 12 (SIMPLE_EDGE), Union 14 (CONTAINS) +Reducer 15 <- Map 18 (BROADCAST_EDGE), Map 19 (BROADCAST_EDGE), Union 14 (SIMPLE_EDGE), Union 4 (CONTAINS) +Reducer 22 <- Union 21 (SIMPLE_EDGE), Union 23 (CONTAINS) +Reducer 24 <- Union 23 (SIMPLE_EDGE), Union 25 (CONTAINS) +Reducer 26 <- Map 30 (BROADCAST_EDGE), Map 31 (BROADCAST_EDGE), Union 25 (SIMPLE_EDGE), Union 6 (CONTAINS) +Reducer 3 <- Map 10 (BROADCAST_EDGE), Map 9 (BROADCAST_EDGE), Union 2 (SIMPLE_EDGE), Union 4 (CONTAINS) +Reducer 5 <- Union 4 (SIMPLE_EDGE), Union 6 (CONTAINS) +Reducer 7 <- Union 6 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 7 + File Output Operator [FS_122] + Group By Operator [GBY_120] (rows=550/15 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 6 [SIMPLE_EDGE] + <-Reducer 26 [CONTAINS] + Reduce Output Operator [RS_119] + PartitionCols:_col0, _col1 + Group By Operator [GBY_118] (rows=1100/30 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_114] (rows=550/61 width=10) + Output:["_col0","_col1"] + Map Join Operator [MAPJOIN_170] (rows=550/61 width=10) + Conds:MAPJOIN_169._col2=RS_112._col0(Inner),HybridGraceHashJoin:true,Output:["_col2","_col5"] + <-Map 31 [BROADCAST_EDGE] + BROADCAST [RS_112] + PartitionCols:_col0 + Select Operator [SEL_107] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_164] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_105] (rows=500/500 width=10) + default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map Join Operator [MAPJOIN_169] (rows=484/52 width=10) + Conds:SEL_101._col1=RS_109._col1(Inner),HybridGraceHashJoin:true,Output:["_col2"] + <-Map 30 [BROADCAST_EDGE] + BROADCAST [RS_109] + PartitionCols:_col1 + Select Operator [SEL_104] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_163] (rows=25/25 width=7) + predicate:(key is not null and value is not null) + TableScan [TS_102] (rows=25/25 width=7) + default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Select Operator [SEL_101] (rows=440/319 width=10) + Output:["_col1"] + Group By Operator [GBY_100] (rows=440/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 25 [SIMPLE_EDGE] + <-Map 29 [CONTAINS] + Reduce Output Operator [RS_99] + PartitionCols:_col0, _col1 + Group By Operator [GBY_98] (rows=881/628 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_94] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_162] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_92] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 24 [CONTAINS] + Reduce Output Operator [RS_99] + PartitionCols:_col0, _col1 + Group By Operator [GBY_98] (rows=881/628 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_91] (rows=381/319 width=10) + Output:["_col0","_col1"] + Group By Operator [GBY_90] (rows=381/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 23 [SIMPLE_EDGE] + <-Map 28 [CONTAINS] + Reduce Output Operator [RS_89] + PartitionCols:_col0, _col1 + Group By Operator [GBY_88] (rows=762/628 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_84] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_161] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_82] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 22 [CONTAINS] + Reduce Output Operator [RS_89] + PartitionCols:_col0, _col1 + Group By Operator [GBY_88] (rows=762/628 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_81] (rows=262/319 width=10) + Output:["_col0","_col1"] + Group By Operator [GBY_80] (rows=262/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 21 [SIMPLE_EDGE] + <-Map 20 [CONTAINS] + Reduce Output Operator [RS_79] + PartitionCols:_col0, _col1 + Group By Operator [GBY_78] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_71] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_159] (rows=25/25 width=7) + predicate:value is not null + TableScan [TS_69] (rows=25/25 width=7) + Output:["key","value"] + <-Map 27 [CONTAINS] + Reduce Output Operator [RS_79] + PartitionCols:_col0, _col1 + Group By Operator [GBY_78] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_74] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_160] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_72] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 5 [CONTAINS] + Reduce Output Operator [RS_119] + PartitionCols:_col0, _col1 + Group By Operator [GBY_118] (rows=1100/30 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Group By Operator [GBY_67] (rows=550/15 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 4 [SIMPLE_EDGE] + <-Reducer 15 [CONTAINS] + Reduce Output Operator [RS_66] + PartitionCols:_col0, _col1 + Group By Operator [GBY_65] (rows=1100/30 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_61] (rows=550/61 width=10) + Output:["_col0","_col1"] + Map Join Operator [MAPJOIN_168] (rows=550/61 width=10) + Conds:MAPJOIN_167._col2=RS_59._col0(Inner),HybridGraceHashJoin:true,Output:["_col2","_col5"] + <-Map 19 [BROADCAST_EDGE] + BROADCAST [RS_59] + PartitionCols:_col0 + Select Operator [SEL_54] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_158] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_52] (rows=500/500 width=10) + default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map Join Operator [MAPJOIN_167] (rows=419/52 width=10) + Conds:SEL_48._col1=RS_56._col1(Inner),HybridGraceHashJoin:true,Output:["_col2"] + <-Map 18 [BROADCAST_EDGE] + BROADCAST [RS_56] + PartitionCols:_col1 + Select Operator [SEL_51] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_157] (rows=25/25 width=7) + predicate:(key is not null and value is not null) + TableScan [TS_49] (rows=25/25 width=7) + default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Select Operator [SEL_48] (rows=381/319 width=10) + Output:["_col1"] + Group By Operator [GBY_47] (rows=381/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 14 [SIMPLE_EDGE] + <-Map 17 [CONTAINS] + Reduce Output Operator [RS_46] + PartitionCols:_col0, _col1 + Group By Operator [GBY_45] (rows=762/628 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_41] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_156] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_39] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 13 [CONTAINS] + Reduce Output Operator [RS_46] + PartitionCols:_col0, _col1 + Group By Operator [GBY_45] (rows=762/628 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_38] (rows=262/319 width=10) + Output:["_col0","_col1"] + Group By Operator [GBY_37] (rows=262/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 12 [SIMPLE_EDGE] + <-Map 11 [CONTAINS] + Reduce Output Operator [RS_36] + PartitionCols:_col0, _col1 + Group By Operator [GBY_35] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_28] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_154] (rows=25/25 width=7) + predicate:value is not null + TableScan [TS_26] (rows=25/25 width=7) + Output:["key","value"] + <-Map 16 [CONTAINS] + Reduce Output Operator [RS_36] + PartitionCols:_col0, _col1 + Group By Operator [GBY_35] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_31] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_155] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_29] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 3 [CONTAINS] + Reduce Output Operator [RS_66] + PartitionCols:_col0, _col1 + Group By Operator [GBY_65] (rows=1100/30 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_25] (rows=550/61 width=10) + Output:["_col0","_col1"] + Map Join Operator [MAPJOIN_166] (rows=550/61 width=10) + Conds:MAPJOIN_165._col2=RS_23._col0(Inner),HybridGraceHashJoin:true,Output:["_col2","_col5"] + <-Map 10 [BROADCAST_EDGE] + BROADCAST [RS_23] + PartitionCols:_col0 + Select Operator [SEL_18] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_153] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_16] (rows=500/500 width=10) + default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map Join Operator [MAPJOIN_165] (rows=288/52 width=10) + Conds:SEL_12._col1=RS_20._col1(Inner),HybridGraceHashJoin:true,Output:["_col2"] + <-Map 9 [BROADCAST_EDGE] + BROADCAST [RS_20] + PartitionCols:_col1 + Select Operator [SEL_15] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_152] (rows=25/25 width=7) + predicate:(key is not null and value is not null) + TableScan [TS_13] (rows=25/25 width=7) + default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Select Operator [SEL_12] (rows=262/319 width=10) + Output:["_col1"] + Group By Operator [GBY_11] (rows=262/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 2 [SIMPLE_EDGE] + <-Map 1 [CONTAINS] + Reduce Output Operator [RS_10] + PartitionCols:_col0, _col1 + Group By Operator [GBY_9] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_2] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_150] (rows=25/25 width=7) + predicate:value is not null + TableScan [TS_0] (rows=25/25 width=7) + Output:["key","value"] + <-Map 8 [CONTAINS] + Reduce Output Operator [RS_10] + PartitionCols:_col0, _col1 + Group By Operator [GBY_9] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_5] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_151] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_3] (rows=500/500 width=10) + Output:["key","value"] + +PREHOOK: query: CREATE TABLE srcbucket_mapjoin(key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@srcbucket_mapjoin +POSTHOOK: query: CREATE TABLE srcbucket_mapjoin(key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@srcbucket_mapjoin +PREHOOK: query: CREATE TABLE tab_part (key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@tab_part +POSTHOOK: query: CREATE TABLE tab_part (key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@tab_part +PREHOOK: query: CREATE TABLE srcbucket_mapjoin_part (key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@srcbucket_mapjoin_part +POSTHOOK: query: CREATE TABLE srcbucket_mapjoin_part (key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@srcbucket_mapjoin_part +PREHOOK: query: load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin partition(ds='2008-04-08') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@srcbucket_mapjoin +POSTHOOK: query: load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin partition(ds='2008-04-08') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@srcbucket_mapjoin +POSTHOOK: Output: default@srcbucket_mapjoin@ds=2008-04-08 +PREHOOK: query: load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin partition(ds='2008-04-08') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@srcbucket_mapjoin@ds=2008-04-08 +POSTHOOK: query: load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin partition(ds='2008-04-08') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@srcbucket_mapjoin@ds=2008-04-08 +PREHOOK: query: load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@srcbucket_mapjoin_part +POSTHOOK: query: load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@srcbucket_mapjoin_part +POSTHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +PREHOOK: query: load data local inpath '../../data/files/srcbucket21.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +POSTHOOK: query: load data local inpath '../../data/files/srcbucket21.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +PREHOOK: query: load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +POSTHOOK: query: load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +PREHOOK: query: load data local inpath '../../data/files/srcbucket23.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +POSTHOOK: query: load data local inpath '../../data/files/srcbucket23.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +PREHOOK: query: insert overwrite table tab_part partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin_part +PREHOOK: type: QUERY +PREHOOK: Input: default@srcbucket_mapjoin_part +PREHOOK: Input: default@srcbucket_mapjoin_part@ds=2008-04-08 +PREHOOK: Output: default@tab_part@ds=2008-04-08 +POSTHOOK: query: insert overwrite table tab_part partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin_part +POSTHOOK: type: QUERY +POSTHOOK: Input: default@srcbucket_mapjoin_part +POSTHOOK: Input: default@srcbucket_mapjoin_part@ds=2008-04-08 +POSTHOOK: Output: default@tab_part@ds=2008-04-08 +POSTHOOK: Lineage: tab_part PARTITION(ds=2008-04-08).key SIMPLE [(srcbucket_mapjoin_part)srcbucket_mapjoin_part.FieldSchema(name:key, type:int, comment:null), ] +POSTHOOK: Lineage: tab_part PARTITION(ds=2008-04-08).value SIMPLE [(srcbucket_mapjoin_part)srcbucket_mapjoin_part.FieldSchema(name:value, type:string, comment:null), ] +PREHOOK: query: CREATE TABLE tab(key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@tab +POSTHOOK: query: CREATE TABLE tab(key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@tab +PREHOOK: query: insert overwrite table tab partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin +PREHOOK: type: QUERY +PREHOOK: Input: default@srcbucket_mapjoin +PREHOOK: Input: default@srcbucket_mapjoin@ds=2008-04-08 +PREHOOK: Output: default@tab@ds=2008-04-08 +POSTHOOK: query: insert overwrite table tab partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin +POSTHOOK: type: QUERY +POSTHOOK: Input: default@srcbucket_mapjoin +POSTHOOK: Input: default@srcbucket_mapjoin@ds=2008-04-08 +POSTHOOK: Output: default@tab@ds=2008-04-08 +POSTHOOK: Lineage: tab PARTITION(ds=2008-04-08).key SIMPLE [(srcbucket_mapjoin)srcbucket_mapjoin.FieldSchema(name:key, type:int, comment:null), ] +POSTHOOK: Lineage: tab PARTITION(ds=2008-04-08).value SIMPLE [(srcbucket_mapjoin)srcbucket_mapjoin.FieldSchema(name:value, type:string, comment:null), ] +PREHOOK: query: CREATE TABLE tab2(key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@tab2 +POSTHOOK: query: CREATE TABLE tab2(key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@tab2 +PREHOOK: query: insert overwrite table tab2 partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin +PREHOOK: type: QUERY +PREHOOK: Input: default@srcbucket_mapjoin +PREHOOK: Input: default@srcbucket_mapjoin@ds=2008-04-08 +PREHOOK: Output: default@tab2@ds=2008-04-08 +POSTHOOK: query: insert overwrite table tab2 partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin +POSTHOOK: type: QUERY +POSTHOOK: Input: default@srcbucket_mapjoin +POSTHOOK: Input: default@srcbucket_mapjoin@ds=2008-04-08 +POSTHOOK: Output: default@tab2@ds=2008-04-08 +POSTHOOK: Lineage: tab2 PARTITION(ds=2008-04-08).key SIMPLE [(srcbucket_mapjoin)srcbucket_mapjoin.FieldSchema(name:key, type:int, comment:null), ] +POSTHOOK: Lineage: tab2 PARTITION(ds=2008-04-08).value SIMPLE [(srcbucket_mapjoin)srcbucket_mapjoin.FieldSchema(name:value, type:string, comment:null), ] +PREHOOK: query: select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key +PREHOOK: type: QUERY +PREHOOK: Input: default@tab +PREHOOK: Input: default@tab@ds=2008-04-08 +#### A masked pattern was here #### +POSTHOOK: query: select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab +POSTHOOK: Input: default@tab@ds=2008-04-08 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Map 1 + File Output Operator [FS_10] + Merge Join Operator [MERGEJOIN_15] (rows=266/480 width=10) + Conds:SEL_2._col0=SEL_5._col0(Inner),Output:["_col0","_col1"] + <-Select Operator [SEL_5] (rows=242/242 width=10) + Output:["_col0"] + Filter Operator [FIL_14] (rows=242/242 width=10) + predicate:key is not null + TableScan [TS_3] (rows=242/242 width=10) + default@tab,s3,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Select Operator [SEL_2] (rows=242/242 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_13] (rows=242/242 width=10) + predicate:key is not null + TableScan [TS_0] (rows=242/242 width=10) + default@tab,s1,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key join tab s2 on s1.value=s2.value +PREHOOK: type: QUERY +PREHOOK: Input: default@tab +PREHOOK: Input: default@tab@ds=2008-04-08 +#### A masked pattern was here #### +POSTHOOK: query: select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key join tab s2 on s1.value=s2.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab +POSTHOOK: Input: default@tab@ds=2008-04-08 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key join tab s2 on s1.value=s2.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key join tab s2 on s1.value=s2.value +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_16] + Merge Join Operator [MERGEJOIN_27] (rows=292/1166 width=10) + Conds:RS_12._col1=RS_13._col1(Inner),Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_12] + PartitionCols:_col1 + Merge Join Operator [MERGEJOIN_25] (rows=266/480 width=10) + Conds:SEL_2._col0=SEL_5._col0(Inner),Output:["_col0","_col1"] + <-Select Operator [SEL_5] (rows=242/242 width=10) + Output:["_col0"] + Filter Operator [FIL_23] (rows=242/242 width=10) + predicate:key is not null + TableScan [TS_3] (rows=242/242 width=10) + default@tab,s3,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Select Operator [SEL_2] (rows=242/242 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_22] (rows=242/242 width=10) + predicate:(key is not null and value is not null) + TableScan [TS_0] (rows=242/242 width=10) + default@tab,s1,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_13] + PartitionCols:_col1 + Select Operator [SEL_8] (rows=242/242 width=10) + Output:["_col1"] + Filter Operator [FIL_24] (rows=242/242 width=10) + predicate:value is not null + TableScan [TS_6] (rows=242/242 width=10) + default@tab,s2,Tbl:COMPLETE,Col:NONE,Output:["value"] + +PREHOOK: query: select s1.key as key, s1.value as value from tab s1 join tab2 s3 on s1.key=s3.key +PREHOOK: type: QUERY +PREHOOK: Input: default@tab +PREHOOK: Input: default@tab2 +PREHOOK: Input: default@tab2@ds=2008-04-08 +PREHOOK: Input: default@tab@ds=2008-04-08 +#### A masked pattern was here #### +POSTHOOK: query: select s1.key as key, s1.value as value from tab s1 join tab2 s3 on s1.key=s3.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab +POSTHOOK: Input: default@tab2 +POSTHOOK: Input: default@tab2@ds=2008-04-08 +POSTHOOK: Input: default@tab@ds=2008-04-08 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select s1.key as key, s1.value as value from tab s1 join tab2 s3 on s1.key=s3.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select s1.key as key, s1.value as value from tab s1 join tab2 s3 on s1.key=s3.key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Map 1 + File Output Operator [FS_10] + Merge Join Operator [MERGEJOIN_15] (rows=266/480 width=10) + Conds:SEL_2._col0=SEL_5._col0(Inner),Output:["_col0","_col1"] + <-Select Operator [SEL_5] (rows=242/242 width=10) + Output:["_col0"] + Filter Operator [FIL_14] (rows=242/242 width=10) + predicate:key is not null + TableScan [TS_3] (rows=242/242 width=10) + default@tab2,s3,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Select Operator [SEL_2] (rows=242/242 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_13] (rows=242/242 width=10) + predicate:key is not null + TableScan [TS_0] (rows=242/242 width=10) + default@tab,s1,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + +PREHOOK: query: select s1.key as key, s1.value as value from tab s1 join tab2 s3 on s1.key=s3.key join tab2 s2 on s1.value=s2.value +PREHOOK: type: QUERY +PREHOOK: Input: default@tab +PREHOOK: Input: default@tab2 +PREHOOK: Input: default@tab2@ds=2008-04-08 +PREHOOK: Input: default@tab@ds=2008-04-08 +#### A masked pattern was here #### +POSTHOOK: query: select s1.key as key, s1.value as value from tab s1 join tab2 s3 on s1.key=s3.key join tab2 s2 on s1.value=s2.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab +POSTHOOK: Input: default@tab2 +POSTHOOK: Input: default@tab2@ds=2008-04-08 +POSTHOOK: Input: default@tab@ds=2008-04-08 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select s1.key as key, s1.value as value from tab s1 join tab2 s3 on s1.key=s3.key join tab2 s2 on s1.value=s2.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select s1.key as key, s1.value as value from tab s1 join tab2 s3 on s1.key=s3.key join tab2 s2 on s1.value=s2.value +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_16] + Merge Join Operator [MERGEJOIN_27] (rows=292/1166 width=10) + Conds:RS_12._col1=RS_13._col1(Inner),Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_12] + PartitionCols:_col1 + Merge Join Operator [MERGEJOIN_25] (rows=266/480 width=10) + Conds:SEL_2._col0=SEL_5._col0(Inner),Output:["_col0","_col1"] + <-Select Operator [SEL_5] (rows=242/242 width=10) + Output:["_col0"] + Filter Operator [FIL_23] (rows=242/242 width=10) + predicate:key is not null + TableScan [TS_3] (rows=242/242 width=10) + default@tab2,s3,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Select Operator [SEL_2] (rows=242/242 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_22] (rows=242/242 width=10) + predicate:(key is not null and value is not null) + TableScan [TS_0] (rows=242/242 width=10) + default@tab,s1,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_13] + PartitionCols:_col1 + Select Operator [SEL_8] (rows=242/242 width=10) + Output:["_col1"] + Filter Operator [FIL_24] (rows=242/242 width=10) + predicate:value is not null + TableScan [TS_6] (rows=242/242 width=10) + default@tab2,s2,Tbl:COMPLETE,Col:NONE,Output:["value"] + +PREHOOK: query: select count(*) from (select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key +UNION ALL +select s2.key as key, s2.value as value from tab s2 +) a join tab_part b on (a.key = b.key) +PREHOOK: type: QUERY +PREHOOK: Input: default@tab +PREHOOK: Input: default@tab@ds=2008-04-08 +PREHOOK: Input: default@tab_part +PREHOOK: Input: default@tab_part@ds=2008-04-08 +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from (select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key +UNION ALL +select s2.key as key, s2.value as value from tab s2 +) a join tab_part b on (a.key = b.key) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab +POSTHOOK: Input: default@tab@ds=2008-04-08 +POSTHOOK: Input: default@tab_part +POSTHOOK: Input: default@tab_part@ds=2008-04-08 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select count(*) from (select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key +UNION ALL +select s2.key as key, s2.value as value from tab s2 +) a join tab_part b on (a.key = b.key) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select count(*) from (select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key +UNION ALL +select s2.key as key, s2.value as value from tab s2 +) a join tab_part b on (a.key = b.key) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Union 2 (CONTAINS) +Map 6 <- Union 2 (CONTAINS) +Reducer 3 <- Map 7 (SIMPLE_EDGE), Union 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_26] + Group By Operator [GBY_24] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_23] + Group By Operator [GBY_22] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count()"] + Merge Join Operator [MERGEJOIN_39] (rows=558/1646 width=10) + Conds:Union 2._col0=RS_19._col0(Inner) + <-Map 7 [SIMPLE_EDGE] + SHUFFLE [RS_19] + PartitionCols:_col0 + Select Operator [SEL_17] (rows=500/500 width=10) + Output:["_col0"] + Filter Operator [FIL_36] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_15] (rows=500/500 width=10) + default@tab_part,b,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Union 2 [SIMPLE_EDGE] + <-Map 1 [CONTAINS] + Reduce Output Operator [RS_18] + PartitionCols:_col0 + Merge Join Operator [MERGEJOIN_37] (rows=266/480 width=10) + Conds:SEL_2._col0=SEL_5._col0(Inner),Output:["_col0"] + <-Select Operator [SEL_5] (rows=242/242 width=10) + Output:["_col0"] + Filter Operator [FIL_34] (rows=242/242 width=10) + predicate:key is not null + TableScan [TS_3] (rows=242/242 width=10) + default@tab,s3,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Select Operator [SEL_2] (rows=242/242 width=10) + Output:["_col0"] + Filter Operator [FIL_33] (rows=242/242 width=10) + predicate:key is not null + TableScan [TS_0] (rows=242/242 width=10) + Output:["key"] + <-Map 6 [CONTAINS] + Reduce Output Operator [RS_18] + PartitionCols:_col0 + Select Operator [SEL_12] (rows=242/242 width=10) + Output:["_col0"] + Filter Operator [FIL_35] (rows=242/242 width=10) + predicate:key is not null + TableScan [TS_10] (rows=242/242 width=10) + Output:["key"] + +PREHOOK: query: select count(*) from (select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key join tab s2 on s1.value=s2.value +UNION ALL +select s2.key as key, s2.value as value from tab s2 +) a join tab_part b on (a.key = b.key) +PREHOOK: type: QUERY +PREHOOK: Input: default@tab +PREHOOK: Input: default@tab@ds=2008-04-08 +PREHOOK: Input: default@tab_part +PREHOOK: Input: default@tab_part@ds=2008-04-08 +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from (select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key join tab s2 on s1.value=s2.value +UNION ALL +select s2.key as key, s2.value as value from tab s2 +) a join tab_part b on (a.key = b.key) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab +POSTHOOK: Input: default@tab@ds=2008-04-08 +POSTHOOK: Input: default@tab_part +POSTHOOK: Input: default@tab_part@ds=2008-04-08 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select count(*) from (select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key join tab s2 on s1.value=s2.value +UNION ALL +select s2.key as key, s2.value as value from tab s2 +) a join tab_part b on (a.key = b.key) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select count(*) from (select s1.key as key, s1.value as value from tab s1 join tab s3 on s1.key=s3.key join tab s2 on s1.value=s2.value +UNION ALL +select s2.key as key, s2.value as value from tab s2 +) a join tab_part b on (a.key = b.key) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 8 <- Union 3 (CONTAINS) +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE), Union 3 (CONTAINS) +Reducer 4 <- Map 9 (SIMPLE_EDGE), Union 3 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 5 + File Output Operator [FS_32] + Group By Operator [GBY_30] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_29] + Group By Operator [GBY_28] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count()"] + Merge Join Operator [MERGEJOIN_51] (rows=587/3768 width=10) + Conds:Union 3._col0=RS_25._col0(Inner) + <-Map 9 [SIMPLE_EDGE] + SHUFFLE [RS_25] + PartitionCols:_col0 + Select Operator [SEL_23] (rows=500/500 width=10) + Output:["_col0"] + Filter Operator [FIL_47] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_21] (rows=500/500 width=10) + default@tab_part,b,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Union 3 [SIMPLE_EDGE] + <-Map 8 [CONTAINS] + Reduce Output Operator [RS_24] + PartitionCols:_col0 + Select Operator [SEL_18] (rows=242/242 width=10) + Output:["_col0"] + Filter Operator [FIL_46] (rows=242/242 width=10) + predicate:key is not null + TableScan [TS_16] (rows=242/242 width=10) + Output:["key"] + <-Reducer 2 [CONTAINS] + Reduce Output Operator [RS_24] + PartitionCols:_col0 + Merge Join Operator [MERGEJOIN_50] (rows=292/1166 width=10) + Conds:RS_12._col1=RS_13._col1(Inner),Output:["_col0"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_12] + PartitionCols:_col1 + Merge Join Operator [MERGEJOIN_48] (rows=266/480 width=10) + Conds:SEL_2._col0=SEL_5._col0(Inner),Output:["_col0","_col1"] + <-Select Operator [SEL_5] (rows=242/242 width=10) + Output:["_col0"] + Filter Operator [FIL_44] (rows=242/242 width=10) + predicate:key is not null + TableScan [TS_3] (rows=242/242 width=10) + default@tab,s3,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Select Operator [SEL_2] (rows=242/242 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_43] (rows=242/242 width=10) + predicate:(key is not null and value is not null) + TableScan [TS_0] (rows=242/242 width=10) + default@tab,s1,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 7 [SIMPLE_EDGE] + SHUFFLE [RS_13] + PartitionCols:_col1 + Select Operator [SEL_8] (rows=242/242 width=10) + Output:["_col1"] + Filter Operator [FIL_45] (rows=242/242 width=10) + predicate:value is not null + TableScan [TS_6] (rows=242/242 width=10) + default@tab,s2,Tbl:COMPLETE,Col:NONE,Output:["value"] + +PREHOOK: query: SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union all select * from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +#### A masked pattern was here #### +POSTHOOK: query: SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union all select * from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union all select * from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union all select * from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Tez +#### A masked pattern was here #### + Edges: + Map 1 <- Map 6 (BROADCAST_EDGE), Union 2 (CONTAINS) + Map 12 <- Union 9 (CONTAINS) + Map 13 <- Union 9 (CONTAINS) + Map 16 <- Map 17 (BROADCAST_EDGE) + Map 18 <- Map 16 (BROADCAST_EDGE), Union 4 (CONTAINS) + Map 19 <- Map 16 (BROADCAST_EDGE), Union 4 (CONTAINS) + Map 20 <- Map 16 (BROADCAST_EDGE), Union 4 (CONTAINS) + Map 21 <- Map 16 (BROADCAST_EDGE), Union 4 (CONTAINS) + Map 5 <- Map 6 (BROADCAST_EDGE), Union 2 (CONTAINS) + Map 8 <- Union 9 (CONTAINS) + Reducer 10 <- Map 14 (SIMPLE_EDGE), Union 9 (SIMPLE_EDGE) + Reducer 11 <- Map 15 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE), Union 4 (CONTAINS) + Reducer 3 <- Map 7 (SIMPLE_EDGE), Union 2 (SIMPLE_EDGE), Union 4 (CONTAINS) +#### A masked pattern was here #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: src1 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: string) + 1 _col1 (type: string) + outputColumnNames: _col1 + input vertices: + 1 Map 6 + Statistics: Num rows: 577/108 Data size: 6053 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 577/108 Data size: 6053 Basic stats: COMPLETE Column stats: NONE + Map 12 + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1025/1025 Data size: 10815 Basic stats: COMPLETE Column stats: NONE + Map 13 + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1025/1025 Data size: 10815 Basic stats: COMPLETE Column stats: NONE + Map 14 + Map Operator Tree: + TableScan + alias: x + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (key is not null and value is not null) (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: key (type: string), value (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string) + Map 15 + Map Operator Tree: + TableScan + alias: y + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: key is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: key (type: string), value (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string) + Map 16 + Map Operator Tree: + TableScan + alias: x + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (key is not null and value is not null) (type: boolean) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: key (type: string), value (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col1, _col3 + input vertices: + 1 Map 17 + Statistics: Num rows: 27/115 Data size: 210 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 27/115 Data size: 210 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col3 (type: string) + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 27/115 Data size: 210 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col3 (type: string) + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 27/115 Data size: 210 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col3 (type: string) + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 27/115 Data size: 210 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col3 (type: string) + Map 17 + Map Operator Tree: + TableScan + alias: y + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: key is not null (type: boolean) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: key (type: string), value (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string) + Map 18 + Map Operator Tree: + TableScan + alias: src1 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col3 + input vertices: + 0 Map 16 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Select Operator + expressions: _col0 (type: string), _col3 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 3550/6411 Data size: 37482 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + Map 19 + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col3 + input vertices: + 0 Map 16 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Select Operator + expressions: _col0 (type: string), _col3 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 3550/6411 Data size: 37482 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + Map 20 + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col3 + input vertices: + 0 Map 16 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Select Operator + expressions: _col0 (type: string), _col3 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 3550/6411 Data size: 37482 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + Map 21 + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col3 + input vertices: + 0 Map 16 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Select Operator + expressions: _col0 (type: string), _col3 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 3550/6411 Data size: 37482 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + Map 5 + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: string) + 1 _col1 (type: string) + outputColumnNames: _col1 + input vertices: + 1 Map 6 + Statistics: Num rows: 577/108 Data size: 6053 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 577/108 Data size: 6053 Basic stats: COMPLETE Column stats: NONE + Map 6 + Map Operator Tree: + TableScan + alias: x + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (key is not null and value is not null) (type: boolean) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: key (type: string), value (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string) + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string) + Map 7 + Map Operator Tree: + TableScan + alias: y + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: key is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: key (type: string), value (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string) + Map 8 + Map Operator Tree: + TableScan + alias: src1 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1025/1025 Data size: 10815 Basic stats: COMPLETE Column stats: NONE + Reducer 10 + Reduce Operator Tree: + Merge Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: string) + 1 _col1 (type: string) + outputColumnNames: _col1 + Statistics: Num rows: 1127/2097 Data size: 11896 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 1127/2097 Data size: 11896 Basic stats: COMPLETE Column stats: NONE + Reducer 11 + Reduce Operator Tree: + Merge Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col1, _col4 + Statistics: Num rows: 1239/5421 Data size: 13085 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: string), _col4 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1239/5421 Data size: 13085 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 3550/6411 Data size: 37482 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + Reducer 3 + Reduce Operator Tree: + Merge Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col1, _col4 + Statistics: Num rows: 634/170 Data size: 6658 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: string), _col4 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 634/170 Data size: 6658 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 3550/6411 Data size: 37482 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + Union 2 + Vertex: Union 2 + Union 4 + Vertex: Union 4 + Union 9 + Vertex: Union 9 + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +#### A masked pattern was here #### +POSTHOOK: query: SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Union 2 (CONTAINS) +Map 12 <- Union 13 (CONTAINS) +Map 19 <- Union 13 (CONTAINS) +Map 20 <- Union 15 (CONTAINS) +Map 23 <- Map 24 (BROADCAST_EDGE) +Map 25 <- Union 26 (CONTAINS) +Map 32 <- Union 26 (CONTAINS) +Map 33 <- Union 28 (CONTAINS) +Map 34 <- Union 30 (CONTAINS) +Map 9 <- Union 2 (CONTAINS) +Reducer 14 <- Union 13 (SIMPLE_EDGE), Union 15 (CONTAINS) +Reducer 16 <- Union 15 (SIMPLE_EDGE) +Reducer 17 <- Map 21 (SIMPLE_EDGE), Reducer 16 (SIMPLE_EDGE) +Reducer 18 <- Map 22 (SIMPLE_EDGE), Reducer 17 (SIMPLE_EDGE), Union 5 (CONTAINS) +Reducer 27 <- Union 26 (SIMPLE_EDGE), Union 28 (CONTAINS) +Reducer 29 <- Union 28 (SIMPLE_EDGE), Union 30 (CONTAINS) +Reducer 3 <- Map 10 (BROADCAST_EDGE), Union 2 (SIMPLE_EDGE) +Reducer 31 <- Map 23 (BROADCAST_EDGE), Union 30 (SIMPLE_EDGE), Union 7 (CONTAINS) +Reducer 4 <- Map 11 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE), Union 5 (CONTAINS) +Reducer 6 <- Union 5 (SIMPLE_EDGE), Union 7 (CONTAINS) +Reducer 8 <- Union 7 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 8 + File Output Operator [FS_122] + Group By Operator [GBY_120] (rows=530/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 7 [SIMPLE_EDGE] + <-Reducer 31 [CONTAINS] + Reduce Output Operator [RS_119] + PartitionCols:_col0, _col1 + Group By Operator [GBY_118] (rows=1061/331 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_114] (rows=484/304 width=10) + Output:["_col0","_col1"] + Map Join Operator [MAPJOIN_167] (rows=484/304 width=10) + Conds:RS_111._col1=SEL_107._col1(Inner),HybridGraceHashJoin:true,Output:["_col0","_col3"] + <-Map 23 [BROADCAST_EDGE] + BROADCAST [RS_111] + PartitionCols:_col1 + Map Join Operator [MAPJOIN_166] (rows=27/115 width=7) + Conds:SEL_71._col0=RS_109._col0(Inner),HybridGraceHashJoin:true,Output:["_col0","_col1","_col3"] + <-Map 24 [BROADCAST_EDGE] + BROADCAST [RS_109] + PartitionCols:_col0 + Select Operator [SEL_74] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_157] (rows=25/25 width=7) + predicate:key is not null + TableScan [TS_72] (rows=25/25 width=7) + default@src1,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Select Operator [SEL_71] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_156] (rows=25/25 width=7) + predicate:(key is not null and value is not null) + TableScan [TS_69] (rows=25/25 width=7) + default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Select Operator [SEL_107] (rows=440/319 width=10) + Output:["_col1"] + Group By Operator [GBY_106] (rows=440/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 30 [SIMPLE_EDGE] + <-Map 34 [CONTAINS] + Reduce Output Operator [RS_105] + PartitionCols:_col0, _col1 + Group By Operator [GBY_104] (rows=881/628 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_100] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_161] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_98] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 29 [CONTAINS] + Reduce Output Operator [RS_105] + PartitionCols:_col0, _col1 + Group By Operator [GBY_104] (rows=881/628 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_97] (rows=381/319 width=10) + Output:["_col0","_col1"] + Group By Operator [GBY_96] (rows=381/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 28 [SIMPLE_EDGE] + <-Map 33 [CONTAINS] + Reduce Output Operator [RS_95] + PartitionCols:_col0, _col1 + Group By Operator [GBY_94] (rows=762/628 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_90] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_160] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_88] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 27 [CONTAINS] + Reduce Output Operator [RS_95] + PartitionCols:_col0, _col1 + Group By Operator [GBY_94] (rows=762/628 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_87] (rows=262/319 width=10) + Output:["_col0","_col1"] + Group By Operator [GBY_86] (rows=262/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 26 [SIMPLE_EDGE] + <-Map 25 [CONTAINS] + Reduce Output Operator [RS_85] + PartitionCols:_col0, _col1 + Group By Operator [GBY_84] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_77] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_158] (rows=25/25 width=7) + predicate:value is not null + TableScan [TS_75] (rows=25/25 width=7) + Output:["key","value"] + <-Map 32 [CONTAINS] + Reduce Output Operator [RS_85] + PartitionCols:_col0, _col1 + Group By Operator [GBY_84] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_80] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_159] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_78] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 6 [CONTAINS] + Reduce Output Operator [RS_119] + PartitionCols:_col0, _col1 + Group By Operator [GBY_118] (rows=1061/331 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Group By Operator [GBY_67] (rows=577/309 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 5 [SIMPLE_EDGE] + <-Reducer 18 [CONTAINS] + Reduce Output Operator [RS_66] + PartitionCols:_col0, _col1 + Group By Operator [GBY_65] (rows=1155/324 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_61] (rows=605/1056 width=10) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_165] (rows=605/1056 width=10) + Conds:RS_58._col2=RS_59._col0(Inner),Output:["_col2","_col5"] + <-Map 22 [SIMPLE_EDGE] + SHUFFLE [RS_59] + PartitionCols:_col0 + Select Operator [SEL_54] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_155] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_52] (rows=500/500 width=10) + default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Reducer 17 [SIMPLE_EDGE] + SHUFFLE [RS_58] + PartitionCols:_col2 + Merge Join Operator [MERGEJOIN_164] (rows=550/512 width=10) + Conds:RS_55._col1=RS_56._col1(Inner),Output:["_col2"] + <-Map 21 [SIMPLE_EDGE] + SHUFFLE [RS_56] + PartitionCols:_col1 + Select Operator [SEL_51] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_154] (rows=500/500 width=10) + predicate:(key is not null and value is not null) + TableScan [TS_49] (rows=500/500 width=10) + default@src,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Reducer 16 [SIMPLE_EDGE] + SHUFFLE [RS_55] + PartitionCols:_col1 + Select Operator [SEL_48] (rows=381/319 width=10) + Output:["_col1"] + Group By Operator [GBY_47] (rows=381/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 15 [SIMPLE_EDGE] + <-Map 20 [CONTAINS] + Reduce Output Operator [RS_46] + PartitionCols:_col0, _col1 + Group By Operator [GBY_45] (rows=762/628 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_41] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_153] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_39] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 14 [CONTAINS] + Reduce Output Operator [RS_46] + PartitionCols:_col0, _col1 + Group By Operator [GBY_45] (rows=762/628 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_38] (rows=262/319 width=10) + Output:["_col0","_col1"] + Group By Operator [GBY_37] (rows=262/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 13 [SIMPLE_EDGE] + <-Map 12 [CONTAINS] + Reduce Output Operator [RS_36] + PartitionCols:_col0, _col1 + Group By Operator [GBY_35] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_28] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_151] (rows=25/25 width=7) + predicate:value is not null + TableScan [TS_26] (rows=25/25 width=7) + Output:["key","value"] + <-Map 19 [CONTAINS] + Reduce Output Operator [RS_36] + PartitionCols:_col0, _col1 + Group By Operator [GBY_35] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_31] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_152] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_29] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 4 [CONTAINS] + Reduce Output Operator [RS_66] + PartitionCols:_col0, _col1 + Group By Operator [GBY_65] (rows=1155/324 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_25] (rows=550/61 width=10) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_163] (rows=550/61 width=10) + Conds:RS_22._col2=RS_23._col0(Inner),Output:["_col2","_col5"] + <-Map 11 [SIMPLE_EDGE] + SHUFFLE [RS_23] + PartitionCols:_col0 + Select Operator [SEL_18] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_150] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_16] (rows=500/500 width=10) + default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_22] + PartitionCols:_col2 + Map Join Operator [MAPJOIN_162] (rows=288/52 width=10) + Conds:SEL_12._col1=RS_20._col1(Inner),HybridGraceHashJoin:true,Output:["_col2"] + <-Map 10 [BROADCAST_EDGE] + BROADCAST [RS_20] + PartitionCols:_col1 + Select Operator [SEL_15] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_149] (rows=25/25 width=7) + predicate:(key is not null and value is not null) + TableScan [TS_13] (rows=25/25 width=7) + default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Select Operator [SEL_12] (rows=262/319 width=10) + Output:["_col1"] + Group By Operator [GBY_11] (rows=262/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 2 [SIMPLE_EDGE] + <-Map 1 [CONTAINS] + Reduce Output Operator [RS_10] + PartitionCols:_col0, _col1 + Group By Operator [GBY_9] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_2] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_147] (rows=25/25 width=7) + predicate:value is not null + TableScan [TS_0] (rows=25/25 width=7) + Output:["key","value"] + <-Map 9 [CONTAINS] + Reduce Output Operator [RS_10] + PartitionCols:_col0, _col1 + Group By Operator [GBY_9] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col1, _col0 + Select Operator [SEL_5] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_148] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_3] (rows=500/500 width=10) + Output:["key","value"] + +PREHOOK: query: CREATE TABLE a(key STRING, value STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@a +POSTHOOK: query: CREATE TABLE a(key STRING, value STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@a +PREHOOK: query: CREATE TABLE b(key STRING, value STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@b +POSTHOOK: query: CREATE TABLE b(key STRING, value STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@b +PREHOOK: query: CREATE TABLE c(key STRING, value STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@c +POSTHOOK: query: CREATE TABLE c(key STRING, value STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@c +PREHOOK: query: from +( +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union all select * from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +) tmp +INSERT OVERWRITE TABLE a SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE b SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE c SELECT tmp.key, tmp.value +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Output: default@a +PREHOOK: Output: default@b +PREHOOK: Output: default@c +POSTHOOK: query: from +( +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union all select * from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +) tmp +INSERT OVERWRITE TABLE a SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE b SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE c SELECT tmp.key, tmp.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Output: default@a +POSTHOOK: Output: default@b +POSTHOOK: Output: default@c +PREHOOK: query: explain analyze +from +( +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union all select * from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +) tmp +INSERT OVERWRITE TABLE a SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE b SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE c SELECT tmp.key, tmp.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +from +( +SELECT x.key, y.value +FROM src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union all select * from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +union all +SELECT x.key, y.value +FROM src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union all select key, value from src union all select key, value from src union all select key, value from src)z ON (x.value = z.value) +) tmp +INSERT OVERWRITE TABLE a SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE b SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE c SELECT tmp.key, tmp.value +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-3 is a root stage + Stage-4 depends on stages: Stage-3 + Stage-0 depends on stages: Stage-4 + Stage-5 depends on stages: Stage-0 + Stage-1 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-1 + Stage-2 depends on stages: Stage-4 + Stage-7 depends on stages: Stage-2 + +STAGE PLANS: + Stage: Stage-3 + Tez +#### A masked pattern was here #### + Edges: + Map 1 <- Union 2 (CONTAINS) + Map 11 <- Union 9 (CONTAINS) + Map 12 <- Union 9 (CONTAINS) + Map 16 <- Map 20 (BROADCAST_EDGE), Union 4 (CONTAINS) + Map 17 <- Map 20 (BROADCAST_EDGE), Union 4 (CONTAINS) + Map 18 <- Map 20 (BROADCAST_EDGE), Union 4 (CONTAINS) + Map 19 <- Map 20 (BROADCAST_EDGE), Union 4 (CONTAINS) + Map 20 <- Map 21 (BROADCAST_EDGE) + Map 5 <- Union 2 (CONTAINS) + Map 7 <- Map 6 (BROADCAST_EDGE) + Map 8 <- Union 9 (CONTAINS) + Reducer 10 <- Reducer 14 (SIMPLE_EDGE), Union 4 (CONTAINS), Union 9 (SIMPLE_EDGE) + Reducer 14 <- Map 13 (SIMPLE_EDGE), Map 15 (SIMPLE_EDGE) + Reducer 3 <- Map 7 (SIMPLE_EDGE), Union 2 (SIMPLE_EDGE), Union 4 (CONTAINS) +#### A masked pattern was here #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: src1 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col1 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 525/525 Data size: 5503 Basic stats: COMPLETE Column stats: NONE + Map 11 + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col1 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 1025/1025 Data size: 10815 Basic stats: COMPLETE Column stats: NONE + Map 12 + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col1 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 1025/1025 Data size: 10815 Basic stats: COMPLETE Column stats: NONE + Map 13 + Map Operator Tree: + TableScan + alias: x + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (key is not null and value is not null) (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: key (type: string) + sort order: + + Map-reduce partition columns: key (type: string) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + value expressions: value (type: string) + Map 15 + Map Operator Tree: + TableScan + alias: y + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: key is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: key (type: string) + sort order: + + Map-reduce partition columns: key (type: string) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + value expressions: value (type: string) + Map 16 + Map Operator Tree: + TableScan + alias: src1 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col1 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col1 (type: string) + outputColumnNames: _col0, _col6 + input vertices: + 0 Map 20 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Select Operator + expressions: _col0 (type: string), _col6 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.a + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.b + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.c + Map 17 + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col1 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col1 (type: string) + outputColumnNames: _col0, _col6 + input vertices: + 0 Map 20 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Select Operator + expressions: _col0 (type: string), _col6 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.a + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.b + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.c + Map 18 + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col1 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col1 (type: string) + outputColumnNames: _col0, _col6 + input vertices: + 0 Map 20 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Select Operator + expressions: _col0 (type: string), _col6 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.a + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.b + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.c + Map 19 + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col1 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col1 (type: string) + outputColumnNames: _col0, _col6 + input vertices: + 0 Map 20 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Select Operator + expressions: _col0 (type: string), _col6 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1677/820 Data size: 17739 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.a + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.b + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.c + Map 20 + Map Operator Tree: + TableScan + alias: x + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (key is not null and value is not null) (type: boolean) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 key (type: string) + 1 key (type: string) + outputColumnNames: _col0, _col1, _col6 + input vertices: + 1 Map 21 + Statistics: Num rows: 27/115 Data size: 210 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 27/115 Data size: 210 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col6 (type: string) + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 27/115 Data size: 210 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col6 (type: string) + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 27/115 Data size: 210 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col6 (type: string) + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 27/115 Data size: 210 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col6 (type: string) + Map 21 + Map Operator Tree: + TableScan + alias: y + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: key is not null (type: boolean) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: key (type: string) + sort order: + + Map-reduce partition columns: key (type: string) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + value expressions: value (type: string) + Map 5 + Map Operator Tree: + TableScan + alias: src + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col1 + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 525/525 Data size: 5503 Basic stats: COMPLETE Column stats: NONE + Map 6 + Map Operator Tree: + TableScan + alias: x + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (key is not null and value is not null) (type: boolean) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: key (type: string) + sort order: + + Map-reduce partition columns: key (type: string) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + value expressions: value (type: string) + Map 7 + Map Operator Tree: + TableScan + alias: y + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: key is not null (type: boolean) + Statistics: Num rows: 500/500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 key (type: string) + 1 key (type: string) + outputColumnNames: _col0, _col1, _col6 + input vertices: + 0 Map 6 + Statistics: Num rows: 550/37 Data size: 5843 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 550/37 Data size: 5843 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col6 (type: string) + Map 8 + Map Operator Tree: + TableScan + alias: src1 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: value is not null (type: boolean) + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: value (type: string) + outputColumnNames: _col1 + Statistics: Num rows: 25/25 Data size: 191 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 1025/1025 Data size: 10815 Basic stats: COMPLETE Column stats: NONE + Reducer 10 + Reduce Operator Tree: + Merge Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col1 (type: string) + outputColumnNames: _col0, _col6 + Statistics: Num rows: 1127/5421 Data size: 11896 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: string), _col6 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1127/5421 Data size: 11896 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.a + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.b + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.c + Reducer 14 + Reduce Operator Tree: + Merge Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 key (type: string) + 1 key (type: string) + outputColumnNames: _col0, _col1, _col6 + Statistics: Num rows: 550/1028 Data size: 5843 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 550/1028 Data size: 5843 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col6 (type: string) + Reducer 3 + Reduce Operator Tree: + Merge Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col1 (type: string) + outputColumnNames: _col0, _col6 + Statistics: Num rows: 605/170 Data size: 6427 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: string), _col6 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 605/170 Data size: 6427 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.a + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.b + File Output Operator + compressed: false + Statistics: Num rows: 3409/6411 Data size: 36062 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.c + Union 2 + Vertex: Union 2 + Union 4 + Vertex: Union 4 + Union 9 + Vertex: Union 9 + + Stage: Stage-4 + Dependency Collection + + Stage: Stage-0 + Move Operator + tables: + replace: true + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.a + + Stage: Stage-5 + Stats-Aggr Operator + + Stage: Stage-1 + Move Operator + tables: + replace: true + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.b + + Stage: Stage-6 + Stats-Aggr Operator + + Stage: Stage-2 + Move Operator + tables: + replace: true + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.c + + Stage: Stage-7 + Stats-Aggr Operator + +PREHOOK: query: FROM +( +SELECT x.key as key, y.value as value from src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key as key, y.value as value from src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key as key, y.value as value from src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +) tmp +INSERT OVERWRITE TABLE a SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE b SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE c SELECT tmp.key, tmp.value +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Output: default@a +PREHOOK: Output: default@b +PREHOOK: Output: default@c +POSTHOOK: query: FROM +( +SELECT x.key as key, y.value as value from src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key as key, y.value as value from src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key as key, y.value as value from src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +) tmp +INSERT OVERWRITE TABLE a SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE b SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE c SELECT tmp.key, tmp.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Output: default@a +POSTHOOK: Output: default@b +POSTHOOK: Output: default@c +PREHOOK: query: explain analyze +FROM +( +SELECT x.key as key, y.value as value from src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key as key, y.value as value from src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key as key, y.value as value from src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +) tmp +INSERT OVERWRITE TABLE a SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE b SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE c SELECT tmp.key, tmp.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +FROM +( +SELECT x.key as key, y.value as value from src1 x JOIN src y ON (x.key = y.key) +JOIN (select * from src1 union select * from src)z ON (x.value = z.value) +union +SELECT x.key as key, y.value as value from src x JOIN src y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src)z ON (x.value = z.value) +union +SELECT x.key as key, y.value as value from src1 x JOIN src1 y ON (x.key = y.key) +JOIN (select key, value from src1 union select key, value from src union select key, value from src union select key, value from src)z ON (x.value = z.value) +) tmp +INSERT OVERWRITE TABLE a SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE b SELECT tmp.key, tmp.value +INSERT OVERWRITE TABLE c SELECT tmp.key, tmp.value +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Union 2 (CONTAINS) +Map 11 <- Map 10 (BROADCAST_EDGE) +Map 12 <- Union 13 (CONTAINS) +Map 18 <- Union 13 (CONTAINS) +Map 19 <- Union 15 (CONTAINS) +Map 23 <- Union 24 (CONTAINS) +Map 30 <- Union 24 (CONTAINS) +Map 31 <- Union 26 (CONTAINS) +Map 32 <- Union 28 (CONTAINS) +Map 33 <- Map 34 (BROADCAST_EDGE) +Map 9 <- Union 2 (CONTAINS) +Reducer 14 <- Union 13 (SIMPLE_EDGE), Union 15 (CONTAINS) +Reducer 16 <- Union 15 (SIMPLE_EDGE) +Reducer 17 <- Reducer 16 (SIMPLE_EDGE), Reducer 21 (SIMPLE_EDGE), Union 5 (CONTAINS) +Reducer 21 <- Map 20 (SIMPLE_EDGE), Map 22 (SIMPLE_EDGE) +Reducer 25 <- Union 24 (SIMPLE_EDGE), Union 26 (CONTAINS) +Reducer 27 <- Union 26 (SIMPLE_EDGE), Union 28 (CONTAINS) +Reducer 29 <- Map 33 (BROADCAST_EDGE), Union 28 (SIMPLE_EDGE), Union 7 (CONTAINS) +Reducer 3 <- Union 2 (SIMPLE_EDGE) +Reducer 4 <- Map 11 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE), Union 5 (CONTAINS) +Reducer 6 <- Union 5 (SIMPLE_EDGE), Union 7 (CONTAINS) +Reducer 8 <- Union 7 (SIMPLE_EDGE) + +Stage-5 + Stats-Aggr Operator + Stage-0 + Move Operator + table:{"name:":"default.a"} + Stage-4 + Dependency Collection{} + Stage-3 + Reducer 8 + File Output Operator [FS_114] + table:{"name:":"default.a"} + Group By Operator [GBY_111] (rows=544/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 7 [SIMPLE_EDGE] + <-Reducer 29 [CONTAINS] + Reduce Output Operator [RS_110] + PartitionCols:_col0, _col1 + Group By Operator [GBY_109] (rows=1089/331 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_105] (rows=484/304 width=10) + Output:["_col0","_col1"] + Map Join Operator [MAPJOIN_160] (rows=484/304 width=10) + Conds:RS_101._col1=SEL_92._col1(Inner),HybridGraceHashJoin:true,Output:["_col0","_col6"] + <-Map 33 [BROADCAST_EDGE] + BROADCAST [RS_101] + PartitionCols:_col1 + Map Join Operator [MAPJOIN_157] (rows=27/115 width=7) + Conds:FIL_153.key=RS_98.key(Inner),HybridGraceHashJoin:true,Output:["_col0","_col1","_col6"] + <-Map 34 [BROADCAST_EDGE] + BROADCAST [RS_98] + PartitionCols:key + Filter Operator [FIL_154] (rows=25/25 width=7) + predicate:key is not null + TableScan [TS_94] (rows=25/25 width=7) + default@src1,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Filter Operator [FIL_153] (rows=25/25 width=7) + predicate:(key is not null and value is not null) + TableScan [TS_93] (rows=25/25 width=7) + default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Select Operator [SEL_92] (rows=440/319 width=10) + Output:["_col1"] + Group By Operator [GBY_91] (rows=440/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 28 [SIMPLE_EDGE] + <-Map 32 [CONTAINS] + Reduce Output Operator [RS_90] + PartitionCols:_col0, _col1 + Group By Operator [GBY_89] (rows=881/628 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_85] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_152] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_84] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 27 [CONTAINS] + Reduce Output Operator [RS_90] + PartitionCols:_col0, _col1 + Group By Operator [GBY_89] (rows=881/628 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Group By Operator [GBY_82] (rows=381/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 26 [SIMPLE_EDGE] + <-Map 31 [CONTAINS] + Reduce Output Operator [RS_81] + PartitionCols:_col0, _col1 + Group By Operator [GBY_80] (rows=762/628 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_76] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_151] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_75] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 25 [CONTAINS] + Reduce Output Operator [RS_81] + PartitionCols:_col0, _col1 + Group By Operator [GBY_80] (rows=762/628 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Group By Operator [GBY_73] (rows=262/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 24 [SIMPLE_EDGE] + <-Map 23 [CONTAINS] + Reduce Output Operator [RS_72] + PartitionCols:_col0, _col1 + Group By Operator [GBY_71] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_65] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_149] (rows=25/25 width=7) + predicate:value is not null + TableScan [TS_64] (rows=25/25 width=7) + Output:["key","value"] + <-Map 30 [CONTAINS] + Reduce Output Operator [RS_72] + PartitionCols:_col0, _col1 + Group By Operator [GBY_71] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_67] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_150] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_66] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 6 [CONTAINS] + Reduce Output Operator [RS_110] + PartitionCols:_col0, _col1 + Group By Operator [GBY_109] (rows=1089/331 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Group By Operator [GBY_62] (rows=605/309 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 5 [SIMPLE_EDGE] + <-Reducer 17 [CONTAINS] + Reduce Output Operator [RS_61] + PartitionCols:_col0, _col1 + Group By Operator [GBY_60] (rows=1210/324 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_56] (rows=605/1056 width=10) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_159] (rows=605/1056 width=10) + Conds:RS_52._col1=RS_54._col1(Inner),Output:["_col0","_col6"] + <-Reducer 16 [SIMPLE_EDGE] + SHUFFLE [RS_54] + PartitionCols:_col1 + Select Operator [SEL_43] (rows=381/319 width=10) + Output:["_col1"] + Group By Operator [GBY_42] (rows=381/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 15 [SIMPLE_EDGE] + <-Map 19 [CONTAINS] + Reduce Output Operator [RS_41] + PartitionCols:_col0, _col1 + Group By Operator [GBY_40] (rows=762/628 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_36] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_146] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_35] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 14 [CONTAINS] + Reduce Output Operator [RS_41] + PartitionCols:_col0, _col1 + Group By Operator [GBY_40] (rows=762/628 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Group By Operator [GBY_33] (rows=262/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 13 [SIMPLE_EDGE] + <-Map 12 [CONTAINS] + Reduce Output Operator [RS_32] + PartitionCols:_col0, _col1 + Group By Operator [GBY_31] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_25] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_144] (rows=25/25 width=7) + predicate:value is not null + TableScan [TS_24] (rows=25/25 width=7) + Output:["key","value"] + <-Map 18 [CONTAINS] + Reduce Output Operator [RS_32] + PartitionCols:_col0, _col1 + Group By Operator [GBY_31] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_27] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_145] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_26] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 21 [SIMPLE_EDGE] + SHUFFLE [RS_52] + PartitionCols:_col1 + Merge Join Operator [MERGEJOIN_156] (rows=550/1028 width=10) + Conds:RS_47.key=RS_49.key(Inner),Output:["_col0","_col1","_col6"] + <-Map 20 [SIMPLE_EDGE] + SHUFFLE [RS_47] + PartitionCols:key + Filter Operator [FIL_147] (rows=500/500 width=10) + predicate:(key is not null and value is not null) + TableScan [TS_44] (rows=500/500 width=10) + default@src,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 22 [SIMPLE_EDGE] + SHUFFLE [RS_49] + PartitionCols:key + Filter Operator [FIL_148] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_45] (rows=500/500 width=10) + default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Reducer 4 [CONTAINS] + Reduce Output Operator [RS_61] + PartitionCols:_col0, _col1 + Group By Operator [GBY_60] (rows=1210/324 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_23] (rows=605/61 width=10) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_158] (rows=605/61 width=10) + Conds:RS_19._col1=RS_21._col1(Inner),Output:["_col0","_col6"] + <-Map 11 [SIMPLE_EDGE] + SHUFFLE [RS_19] + PartitionCols:_col1 + Map Join Operator [MAPJOIN_155] (rows=550/37 width=10) + Conds:RS_14.key=FIL_143.key(Inner),HybridGraceHashJoin:true,Output:["_col0","_col1","_col6"] + <-Map 10 [BROADCAST_EDGE] + BROADCAST [RS_14] + PartitionCols:key + Filter Operator [FIL_142] (rows=25/25 width=7) + predicate:(key is not null and value is not null) + TableScan [TS_11] (rows=25/25 width=7) + default@src1,x,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Filter Operator [FIL_143] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_12] (rows=500/500 width=10) + default@src,y,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_21] + PartitionCols:_col1 + Select Operator [SEL_10] (rows=262/319 width=10) + Output:["_col1"] + Group By Operator [GBY_9] (rows=262/319 width=10) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 2 [SIMPLE_EDGE] + <-Map 1 [CONTAINS] + Reduce Output Operator [RS_8] + PartitionCols:_col0, _col1 + Group By Operator [GBY_7] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_1] (rows=25/25 width=7) + Output:["_col0","_col1"] + Filter Operator [FIL_140] (rows=25/25 width=7) + predicate:value is not null + TableScan [TS_0] (rows=25/25 width=7) + Output:["key","value"] + <-Map 9 [CONTAINS] + Reduce Output Operator [RS_8] + PartitionCols:_col0, _col1 + Group By Operator [GBY_7] (rows=525/331 width=10) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_3] (rows=500/500 width=10) + Output:["_col0","_col1"] + Filter Operator [FIL_141] (rows=500/500 width=10) + predicate:value is not null + TableScan [TS_2] (rows=500/500 width=10) + Output:["key","value"] + File Output Operator [FS_116] + table:{"name:":"default.b"} + Please refer to the previous Group By Operator [GBY_111] + File Output Operator [FS_118] + table:{"name:":"default.c"} + Please refer to the previous Group By Operator [GBY_111] +Stage-6 + Stats-Aggr Operator + Stage-1 + Move Operator + table:{"name:":"default.b"} + Please refer to the previous Stage-4 +Stage-7 + Stats-Aggr Operator + Stage-2 + Move Operator + table:{"name:":"default.c"} + Please refer to the previous Stage-4 + +PREHOOK: query: CREATE TABLE DEST1(key STRING, value STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@DEST1 +POSTHOOK: query: CREATE TABLE DEST1(key STRING, value STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@DEST1 +PREHOOK: query: CREATE TABLE DEST2(key STRING, val1 STRING, val2 STRING) STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@DEST2 +POSTHOOK: query: CREATE TABLE DEST2(key STRING, val1 STRING, val2 STRING) STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@DEST2 +PREHOOK: query: FROM (select 'tst1' as key, cast(count(1) as string) as value from src s1 + UNION DISTINCT + select s2.key as key, s2.value as value from src s2) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key, unionsrc.value +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@dest1 +PREHOOK: Output: default@dest2 +POSTHOOK: query: FROM (select 'tst1' as key, cast(count(1) as string) as value from src s1 + UNION DISTINCT + select s2.key as key, s2.value as value from src s2) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key, unionsrc.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@dest1 +POSTHOOK: Output: default@dest2 +PREHOOK: query: explain analyze +FROM (select 'tst1' as key, cast(count(1) as string) as value from src s1 + UNION DISTINCT + select s2.key as key, s2.value as value from src s2) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key, unionsrc.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +FROM (select 'tst1' as key, cast(count(1) as string) as value from src s1 + UNION DISTINCT + select s2.key as key, s2.value as value from src s2) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key, unionsrc.value +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Map 6 <- Union 3 (CONTAINS) +Reducer 2 <- Map 1 (SIMPLE_EDGE), Union 3 (CONTAINS) +Reducer 4 <- Union 3 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) + +Stage-4 + Stats-Aggr Operator + Stage-0 + Move Operator + table:{"name:":"default.dest1"} + Stage-3 + Dependency Collection{} + Stage-2 + Reducer 5 + File Output Operator [FS_20] + table:{"name:":"default.dest1"} + Group By Operator [GBY_18] (rows=1/310 width=96) + Output:["_col0","_col1"],aggregations:["count(DISTINCT KEY._col1:0._col0)"],keys:KEY._col0 + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_17] + PartitionCols:_col0 + Group By Operator [GBY_16] (rows=1/310 width=280) + Output:["_col0","_col1","_col2"],aggregations:["count(DISTINCT substr(_col1, 5))"],keys:_col0, substr(_col1, 5) + Group By Operator [GBY_13] (rows=1/310 width=272) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 3 [SIMPLE_EDGE] + <-Map 6 [CONTAINS] + Reduce Output Operator [RS_12] + PartitionCols:_col0, _col1 + Group By Operator [GBY_11] (rows=1/310 width=272) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_7] (rows=500/500 width=10) + Output:["_col0","_col1"] + TableScan [TS_6] (rows=500/500 width=10) + Output:["key","value"] + <-Reducer 2 [CONTAINS] + Reduce Output Operator [RS_12] + PartitionCols:_col0, _col1 + Group By Operator [GBY_11] (rows=1/310 width=272) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_5] (rows=1/1 width=272) + Output:["_col0","_col1"] + Group By Operator [GBY_4] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + Group By Operator [GBY_2] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(1)"] + Select Operator [SEL_1] (rows=500/500 width=10) + TableScan [TS_0] (rows=500/500 width=10) + default@src,s1,Tbl:COMPLETE,Col:COMPLETE + File Output Operator [FS_26] + table:{"name:":"default.dest2"} + Select Operator [SEL_25] (rows=1/310 width=456) + Output:["_col0","_col1","_col2"] + Group By Operator [GBY_24] (rows=1/310 width=464) + Output:["_col0","_col1","_col2"],aggregations:["count(DISTINCT substr(_col1, 5))"],keys:_col0, _col1 + Please refer to the previous Group By Operator [GBY_13] +Stage-5 + Stats-Aggr Operator + Stage-1 + Move Operator + table:{"name:":"default.dest2"} + Please refer to the previous Stage-3 + +PREHOOK: query: FROM UNIQUEJOIN PRESERVE src a (a.key), PRESERVE src1 b (b.key), PRESERVE srcpart c (c.key) SELECT a.key, b.key, c.key +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Input: default@srcpart +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 +PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 +#### A masked pattern was here #### +POSTHOOK: query: FROM UNIQUEJOIN PRESERVE src a (a.key), PRESERVE src1 b (b.key), PRESERVE srcpart c (c.key) SELECT a.key, b.key, c.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Input: default@srcpart +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 +POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 +#### A masked pattern was here #### +PREHOOK: query: explain analyze FROM UNIQUEJOIN PRESERVE src a (a.key), PRESERVE src1 b (b.key), PRESERVE srcpart c (c.key) SELECT a.key, b.key, c.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze FROM UNIQUEJOIN PRESERVE src a (a.key), PRESERVE src1 b (b.key), PRESERVE srcpart c (c.key) SELECT a.key, b.key, c.key +POSTHOOK: type: QUERY +Plan not optimized by CBO due to missing feature [Unique_join]. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_8] + Select Operator [SEL_7] (rows=4400/4122 width=10) + Output:["_col0","_col1","_col2"] + Merge Join Operator [MERGEJOIN_9] (rows=4400/4122 width=10) + Conds:RS_3.key=RS_3.key(Unique),RS_3.key=RS_3.key(Unique),RS_3.key=RS_3.key(Unique),Output:["_col0","_col5","_col10"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:key + TableScan [TS_0] (rows=500/500 width=10) + default@src,a,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_4] + PartitionCols:key + TableScan [TS_1] (rows=25/25 width=7) + default@src1,b,Tbl:COMPLETE,Col:NONE,Output:["key"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_5] + PartitionCols:key + TableScan [TS_2] (rows=2000/2000 width=10) + default@srcpart,c,Tbl:COMPLETE,Col:NONE,Output:["key"] + +PREHOOK: query: SELECT +TRANSFORM(a.key, a.value) USING 'cat' AS (tkey, tvalue) +FROM src a join src b +on a.key = b.key +PREHOOK: type: QUERY +PREHOOK: Input: cat +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: SELECT +TRANSFORM(a.key, a.value) USING 'cat' AS (tkey, tvalue) +FROM src a join src b +on a.key = b.key +POSTHOOK: type: QUERY +POSTHOOK: Input: cat +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze +SELECT +TRANSFORM(a.key, a.value) USING 'cat' AS (tkey, tvalue) +FROM src a join src b +on a.key = b.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +SELECT +TRANSFORM(a.key, a.value) USING 'cat' AS (tkey, tvalue) +FROM src a join src b +on a.key = b.key +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_9] + Transform Operator [SCR_8] (rows=550/1028 width=10) + command:cat + Merge Join Operator [MERGEJOIN_14] (rows=550/1028 width=10) + Conds:RS_3.key=RS_5.key(Inner),Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:key + Filter Operator [FIL_12] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_0] (rows=500/500 width=10) + default@src,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Map 3 [SIMPLE_EDGE] + SHUFFLE [RS_5] + PartitionCols:key + Filter Operator [FIL_13] (rows=500/500 width=10) + predicate:key is not null + TableScan [TS_1] (rows=500/500 width=10) + default@src,b,Tbl:COMPLETE,Col:NONE,Output:["key"] + +PREHOOK: query: FROM ( + select key, value from ( + select 'tst1' as key, cast(count(1) as string) as value, 'tst1' as value2 from src s1 + UNION all + select s2.key as key, s2.value as value, 'tst1' as value2 from src s2) unionsub + UNION all + select key, value from src s0 + ) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) +GROUP BY unionsrc.key, unionsrc.value +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@dest1 +PREHOOK: Output: default@dest2 +POSTHOOK: query: FROM ( + select key, value from ( + select 'tst1' as key, cast(count(1) as string) as value, 'tst1' as value2 from src s1 + UNION all + select s2.key as key, s2.value as value, 'tst1' as value2 from src s2) unionsub + UNION all + select key, value from src s0 + ) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) +GROUP BY unionsrc.key, unionsrc.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@dest1 +POSTHOOK: Output: default@dest2 +PREHOOK: query: explain analyze +FROM ( + select key, value from ( + select 'tst1' as key, cast(count(1) as string) as value, 'tst1' as value2 from src s1 + UNION all + select s2.key as key, s2.value as value, 'tst1' as value2 from src s2) unionsub + UNION all + select key, value from src s0 + ) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) +GROUP BY unionsrc.key, unionsrc.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +FROM ( + select key, value from ( + select 'tst1' as key, cast(count(1) as string) as value, 'tst1' as value2 from src s1 + UNION all + select s2.key as key, s2.value as value, 'tst1' as value2 from src s2) unionsub + UNION all + select key, value from src s0 + ) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) +GROUP BY unionsrc.key, unionsrc.value +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Map 6 <- Union 3 (CONTAINS) +Map 7 <- Union 3 (CONTAINS) +Reducer 2 <- Map 1 (SIMPLE_EDGE), Union 3 (CONTAINS) +Reducer 4 <- Union 3 (SIMPLE_EDGE) +Reducer 5 <- Union 3 (SIMPLE_EDGE) + +Stage-4 + Stats-Aggr Operator + Stage-0 + Move Operator + table:{"name:":"default.dest1"} + Stage-3 + Dependency Collection{} + Stage-2 + Reducer 4 + File Output Operator [FS_18] + table:{"name:":"default.dest1"} + Group By Operator [GBY_16] (rows=1/310 width=96) + Output:["_col0","_col1"],aggregations:["count(DISTINCT KEY._col1:0._col0)"],keys:KEY._col0 + <-Union 3 [SIMPLE_EDGE] + <-Map 6 [CONTAINS] + Reduce Output Operator [RS_15] + PartitionCols:_col0 + Group By Operator [GBY_14] (rows=1/619 width=280) + Output:["_col0","_col1","_col2"],aggregations:["count(DISTINCT substr(_col1, 5))"],keys:_col0, substr(_col1, 5) + Select Operator [SEL_9] (rows=501/501 width=272) + Output:["_col0","_col1"] + Select Operator [SEL_7] (rows=500/500 width=10) + Output:["_col0","_col1"] + TableScan [TS_6] (rows=500/500 width=10) + Output:["key","value"] + Reduce Output Operator [RS_21] + PartitionCols:_col0, _col1 + Group By Operator [GBY_20] (rows=1/619 width=464) + Output:["_col0","_col1","_col2","_col3"],aggregations:["count(DISTINCT substr(_col1, 5))"],keys:_col0, _col1, substr(_col1, 5) + Please refer to the previous Select Operator [SEL_9] + <-Map 7 [CONTAINS] + Reduce Output Operator [RS_15] + PartitionCols:_col0 + Group By Operator [GBY_14] (rows=1/619 width=280) + Output:["_col0","_col1","_col2"],aggregations:["count(DISTINCT substr(_col1, 5))"],keys:_col0, substr(_col1, 5) + Select Operator [SEL_11] (rows=500/500 width=10) + Output:["_col0","_col1"] + TableScan [TS_10] (rows=500/500 width=10) + Output:["key","value"] + Reduce Output Operator [RS_21] + PartitionCols:_col0, _col1 + Group By Operator [GBY_20] (rows=1/619 width=464) + Output:["_col0","_col1","_col2","_col3"],aggregations:["count(DISTINCT substr(_col1, 5))"],keys:_col0, _col1, substr(_col1, 5) + Please refer to the previous Select Operator [SEL_11] + <-Reducer 2 [CONTAINS] + Reduce Output Operator [RS_15] + PartitionCols:_col0 + Group By Operator [GBY_14] (rows=1/619 width=280) + Output:["_col0","_col1","_col2"],aggregations:["count(DISTINCT substr(_col1, 5))"],keys:_col0, substr(_col1, 5) + Select Operator [SEL_9] (rows=501/501 width=272) + Output:["_col0","_col1"] + Select Operator [SEL_5] (rows=1/1 width=360) + Output:["_col0","_col1"] + Group By Operator [GBY_4] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + Group By Operator [GBY_2] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(1)"] + Select Operator [SEL_1] (rows=500/500 width=10) + TableScan [TS_0] (rows=500/500 width=10) + default@src,s1,Tbl:COMPLETE,Col:COMPLETE + Reduce Output Operator [RS_21] + PartitionCols:_col0, _col1 + Group By Operator [GBY_20] (rows=1/619 width=464) + Output:["_col0","_col1","_col2","_col3"],aggregations:["count(DISTINCT substr(_col1, 5))"],keys:_col0, _col1, substr(_col1, 5) + Please refer to the previous Select Operator [SEL_9] + Reducer 5 + File Output Operator [FS_24] + table:{"name:":"default.dest2"} + Group By Operator [GBY_22] (rows=1/310 width=280) + Output:["_col0","_col1","_col2"],aggregations:["count(DISTINCT KEY._col2:0._col0)"],keys:KEY._col0, KEY._col1 + <- Please refer to the previous Union 3 [SIMPLE_EDGE] +Stage-5 + Stats-Aggr Operator + Stage-1 + Move Operator + table:{"name:":"default.dest2"} + Please refer to the previous Stage-3 + +PREHOOK: query: FROM ( + select 'tst1' as key, cast(count(1) as string) as value, 'tst1' as value2 from src s1 + UNION all + select s2.key as key, s2.value as value, 'tst1' as value2 from src s2 + ) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) +GROUP BY unionsrc.key, unionsrc.value +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@dest1 +PREHOOK: Output: default@dest2 +POSTHOOK: query: FROM ( + select 'tst1' as key, cast(count(1) as string) as value, 'tst1' as value2 from src s1 + UNION all + select s2.key as key, s2.value as value, 'tst1' as value2 from src s2 + ) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) +GROUP BY unionsrc.key, unionsrc.value +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@dest1 +POSTHOOK: Output: default@dest2 +PREHOOK: query: explain analyze +FROM ( + select 'tst1' as key, cast(count(1) as string) as value, 'tst1' as value2 from src s1 + UNION all + select s2.key as key, s2.value as value, 'tst1' as value2 from src s2 + ) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) +GROUP BY unionsrc.key, unionsrc.value +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +FROM ( + select 'tst1' as key, cast(count(1) as string) as value, 'tst1' as value2 from src s1 + UNION all + select s2.key as key, s2.value as value, 'tst1' as value2 from src s2 + ) unionsrc +INSERT OVERWRITE TABLE DEST1 SELECT unionsrc.key, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) GROUP BY unionsrc.key +INSERT OVERWRITE TABLE DEST2 SELECT unionsrc.key, unionsrc.value, COUNT(DISTINCT SUBSTR(unionsrc.value,5)) +GROUP BY unionsrc.key, unionsrc.value +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Vertex dependency in root stage +Map 6 <- Union 3 (CONTAINS) +Reducer 2 <- Map 1 (SIMPLE_EDGE), Union 3 (CONTAINS) +Reducer 4 <- Union 3 (SIMPLE_EDGE) +Reducer 5 <- Union 3 (SIMPLE_EDGE) + +Stage-4 + Stats-Aggr Operator + Stage-0 + Move Operator + table:{"name:":"default.dest1"} + Stage-3 + Dependency Collection{} + Stage-2 + Reducer 4 + File Output Operator [FS_14] + table:{"name:":"default.dest1"} + Group By Operator [GBY_12] (rows=1/310 width=96) + Output:["_col0","_col1"],aggregations:["count(DISTINCT KEY._col1:0._col0)"],keys:KEY._col0 + <-Union 3 [SIMPLE_EDGE] + <-Map 6 [CONTAINS] + Reduce Output Operator [RS_11] + PartitionCols:_col0 + Group By Operator [GBY_10] (rows=1/310 width=280) + Output:["_col0","_col1","_col2"],aggregations:["count(DISTINCT substr(_col1, 5))"],keys:_col0, substr(_col1, 5) + Select Operator [SEL_9] (rows=501/501 width=11) + Output:["_col0","_col1"] + Select Operator [SEL_7] (rows=500/500 width=10) + Output:["_col0","_col1"] + TableScan [TS_6] (rows=500/500 width=10) + Output:["key","value"] + Reduce Output Operator [RS_17] + PartitionCols:_col0, _col1 + Group By Operator [GBY_16] (rows=1/310 width=464) + Output:["_col0","_col1","_col2","_col3"],aggregations:["count(DISTINCT substr(_col1, 5))"],keys:_col0, _col1, substr(_col1, 5) + Select Operator [SEL_15] (rows=501/501 width=11) + Output:["_col0","_col1"] + Please refer to the previous Select Operator [SEL_7] + <-Reducer 2 [CONTAINS] + Reduce Output Operator [RS_11] + PartitionCols:_col0 + Group By Operator [GBY_10] (rows=1/310 width=280) + Output:["_col0","_col1","_col2"],aggregations:["count(DISTINCT substr(_col1, 5))"],keys:_col0, substr(_col1, 5) + Select Operator [SEL_9] (rows=501/501 width=11) + Output:["_col0","_col1"] + Select Operator [SEL_5] (rows=1/1 width=360) + Output:["_col0","_col1"] + Group By Operator [GBY_4] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + Group By Operator [GBY_2] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(1)"] + Select Operator [SEL_1] (rows=500/500 width=10) + TableScan [TS_0] (rows=500/500 width=10) + default@src,s1,Tbl:COMPLETE,Col:COMPLETE + Reduce Output Operator [RS_17] + PartitionCols:_col0, _col1 + Group By Operator [GBY_16] (rows=1/310 width=464) + Output:["_col0","_col1","_col2","_col3"],aggregations:["count(DISTINCT substr(_col1, 5))"],keys:_col0, _col1, substr(_col1, 5) + Select Operator [SEL_15] (rows=501/501 width=11) + Output:["_col0","_col1"] + Please refer to the previous Select Operator [SEL_5] + Reducer 5 + File Output Operator [FS_20] + table:{"name:":"default.dest2"} + Group By Operator [GBY_18] (rows=1/310 width=280) + Output:["_col0","_col1","_col2"],aggregations:["count(DISTINCT KEY._col2:0._col0)"],keys:KEY._col0, KEY._col1 + <- Please refer to the previous Union 3 [SIMPLE_EDGE] +Stage-5 + Stats-Aggr Operator + Stage-1 + Move Operator + table:{"name:":"default.dest2"} + Please refer to the previous Stage-3 + diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_3.q.out b/ql/src/test/results/clientpositive/tez/explainanalyze_3.q.out new file mode 100644 index 0000000..eddcbb8 --- /dev/null +++ b/ql/src/test/results/clientpositive/tez/explainanalyze_3.q.out @@ -0,0 +1,889 @@ +PREHOOK: query: CREATE TABLE acid_vectorized(a INT, b STRING) CLUSTERED BY(a) INTO 2 BUCKETS STORED AS ORC TBLPROPERTIES ('transactional'='true') +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@acid_vectorized +POSTHOOK: query: CREATE TABLE acid_vectorized(a INT, b STRING) CLUSTERED BY(a) INTO 2 BUCKETS STORED AS ORC TBLPROPERTIES ('transactional'='true') +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@acid_vectorized +PREHOOK: query: insert into table acid_vectorized select cint, cstring1 from alltypesorc where cint is not null order by cint limit 10 +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +PREHOOK: Output: default@acid_vectorized +POSTHOOK: query: insert into table acid_vectorized select cint, cstring1 from alltypesorc where cint is not null order by cint limit 10 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +POSTHOOK: Output: default@acid_vectorized +POSTHOOK: Lineage: acid_vectorized.a SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cint, type:int, comment:null), ] +POSTHOOK: Lineage: acid_vectorized.b SIMPLE [(alltypesorc)alltypesorc.FieldSchema(name:cstring1, type:string, comment:null), ] +PREHOOK: query: select a, b from acid_vectorized order by a, b +PREHOOK: type: QUERY +PREHOOK: Input: default@acid_vectorized +#### A masked pattern was here #### +POSTHOOK: query: select a, b from acid_vectorized order by a, b +POSTHOOK: type: QUERY +POSTHOOK: Input: default@acid_vectorized +#### A masked pattern was here #### +PREHOOK: query: explain analyze select a, b from acid_vectorized order by a, b +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select a, b from acid_vectorized order by a, b +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 2 + File Output Operator [FS_4] + Select Operator [SEL_3] (rows=16/10 width=106) + Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + Select Operator [SEL_1] (rows=16/10 width=106) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=16/10 width=106) + default@acid_vectorized,acid_vectorized, ACID table,Tbl:COMPLETE,Col:NONE,Output:["a","b"] + +PREHOOK: query: select key, value +FROM srcpart LATERAL VIEW explode(array(1,2,3)) myTable AS myCol +PREHOOK: type: QUERY +PREHOOK: Input: default@srcpart +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 +PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 +#### A masked pattern was here #### +POSTHOOK: query: select key, value +FROM srcpart LATERAL VIEW explode(array(1,2,3)) myTable AS myCol +POSTHOOK: type: QUERY +POSTHOOK: Input: default@srcpart +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 +POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 +POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 +POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 +#### A masked pattern was here #### +PREHOOK: query: explain analyze select key, value +FROM srcpart LATERAL VIEW explode(array(1,2,3)) myTable AS myCol +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze select key, value +FROM srcpart LATERAL VIEW explode(array(1,2,3)) myTable AS myCol +POSTHOOK: type: QUERY +Plan not optimized by CBO. + +Stage-0 + Fetch Operator + limit:-1 + Select Operator [SEL_6] + Output:["_col0","_col1"] + Lateral View Join Operator [LVJ_5] + Output:["_col0","_col1","_col7"] + Select Operator [SEL_2] + Output:["key","value"] + Lateral View Forward [LVF_1] + TableScan [TS_0] + Output:["key","value"] + Select Operator [SEL_6] + Output:["_col0","_col1"] + Lateral View Join Operator [LVJ_5] + Output:["_col0","_col1","_col7"] + UDTF Operator [UDTF_4] + function name:explode + Select Operator [SEL_3] + Output:["_col0"] + Please refer to the previous Lateral View Forward [LVF_1] + +PREHOOK: query: show tables +PREHOOK: type: SHOWTABLES +PREHOOK: Input: database:default +POSTHOOK: query: show tables +POSTHOOK: type: SHOWTABLES +POSTHOOK: Input: database:default +PREHOOK: query: explain analyze show tables +PREHOOK: type: SHOWTABLES +POSTHOOK: query: explain analyze show tables +POSTHOOK: type: SHOWTABLES +Stage-1 + Fetch Operator + limit:-1 + Stage-0 + Show Table Operator: + database name:default + +#### A masked pattern was here #### +PREHOOK: type: CREATEDATABASE +PREHOOK: Output: database:newDB +#### A masked pattern was here #### +POSTHOOK: type: CREATEDATABASE +POSTHOOK: Output: database:newDB +#### A masked pattern was here #### +PREHOOK: type: CREATEDATABASE +#### A masked pattern was here #### +POSTHOOK: type: CREATEDATABASE +Stage-0 + +#### A masked pattern was here #### +PREHOOK: type: CREATEDATABASE +PREHOOK: Output: database:newDB +#### A masked pattern was here #### +POSTHOOK: type: CREATEDATABASE +POSTHOOK: Output: database:newDB +#### A masked pattern was here #### +PREHOOK: query: describe database extended newDB +PREHOOK: type: DESCDATABASE +PREHOOK: Input: database:newdb +POSTHOOK: query: describe database extended newDB +POSTHOOK: type: DESCDATABASE +POSTHOOK: Input: database:newdb +PREHOOK: query: explain analyze describe database extended newDB +PREHOOK: type: DESCDATABASE +POSTHOOK: query: explain analyze describe database extended newDB +POSTHOOK: type: DESCDATABASE +Stage-1 + Fetch Operator + limit:-1 + Stage-0 + +PREHOOK: query: describe database extended newDB +PREHOOK: type: DESCDATABASE +PREHOOK: Input: database:newdb +POSTHOOK: query: describe database extended newDB +POSTHOOK: type: DESCDATABASE +POSTHOOK: Input: database:newdb +newdb location/in/test hive_test_user USER +PREHOOK: query: use newDB +PREHOOK: type: SWITCHDATABASE +PREHOOK: Input: database:newdb +POSTHOOK: query: use newDB +POSTHOOK: type: SWITCHDATABASE +POSTHOOK: Input: database:newdb +PREHOOK: query: explain analyze use newDB +PREHOOK: type: SWITCHDATABASE +POSTHOOK: query: explain analyze use newDB +POSTHOOK: type: SWITCHDATABASE +Stage-0 + +PREHOOK: query: use newDB +PREHOOK: type: SWITCHDATABASE +PREHOOK: Input: database:newdb +POSTHOOK: query: use newDB +POSTHOOK: type: SWITCHDATABASE +POSTHOOK: Input: database:newdb +PREHOOK: query: create table tab (name string) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:newdb +PREHOOK: Output: newDB@tab +POSTHOOK: query: create table tab (name string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:newdb +POSTHOOK: Output: newDB@tab +PREHOOK: query: alter table tab rename to newName +PREHOOK: type: ALTERTABLE_RENAME +PREHOOK: Input: newdb@tab +PREHOOK: Output: newdb@tab +POSTHOOK: query: alter table tab rename to newName +POSTHOOK: type: ALTERTABLE_RENAME +POSTHOOK: Input: newdb@tab +POSTHOOK: Output: newdb@tab +PREHOOK: query: explain analyze alter table tab rename to newName +PREHOOK: type: ALTERTABLE_RENAME +POSTHOOK: query: explain analyze alter table tab rename to newName +POSTHOOK: type: ALTERTABLE_RENAME +Stage-0 + Alter Table Operator: + new name:newDB.newName,old name:newDB.tab,type:rename + +PREHOOK: query: drop table tab +PREHOOK: type: DROPTABLE +PREHOOK: Input: newdb@tab +PREHOOK: Output: newdb@tab +POSTHOOK: query: drop table tab +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: newdb@tab +POSTHOOK: Output: newdb@tab +PREHOOK: query: explain analyze drop table tab +PREHOOK: type: DROPTABLE +POSTHOOK: query: explain analyze drop table tab +POSTHOOK: type: DROPTABLE +Stage-0 + Drop Table Operator: + table:tab + +PREHOOK: query: drop table tab +PREHOOK: type: DROPTABLE +PREHOOK: Input: newdb@tab +PREHOOK: Output: newdb@tab +POSTHOOK: query: drop table tab +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: newdb@tab +POSTHOOK: Output: newdb@tab +PREHOOK: query: use default +PREHOOK: type: SWITCHDATABASE +PREHOOK: Input: database:default +POSTHOOK: query: use default +POSTHOOK: type: SWITCHDATABASE +POSTHOOK: Input: database:default +PREHOOK: query: explain analyze use default +PREHOOK: type: SWITCHDATABASE +POSTHOOK: query: explain analyze use default +POSTHOOK: type: SWITCHDATABASE +Stage-0 + +PREHOOK: query: use default +PREHOOK: type: SWITCHDATABASE +PREHOOK: Input: database:default +POSTHOOK: query: use default +POSTHOOK: type: SWITCHDATABASE +POSTHOOK: Input: database:default +PREHOOK: query: drop database newDB +PREHOOK: type: DROPDATABASE +PREHOOK: Input: database:newdb +PREHOOK: Output: database:newdb +POSTHOOK: query: drop database newDB +POSTHOOK: type: DROPDATABASE +POSTHOOK: Input: database:newdb +POSTHOOK: Output: database:newdb +PREHOOK: query: analyze table src compute statistics +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@src +FAILED: Hive Internal Error: java.lang.RuntimeException(Cannot overwrite read-only table: src) +java.lang.RuntimeException: Cannot overwrite read-only table: src +#### A masked pattern was here #### + +PREHOOK: query: explain analyze analyze table src compute statistics +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze analyze table src compute statistics +POSTHOOK: type: QUERY +Stage-2 + Stats-Aggr Operator + Stage-0 + Map 1 + TableScan [TS_0] (rows=500/0 width=10) + default@src,src,Tbl:COMPLETE,Col:COMPLETE + +PREHOOK: query: analyze table src compute statistics for columns +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: analyze table src compute statistics for columns +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze analyze table src compute statistics for columns +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze analyze table src compute statistics for columns +POSTHOOK: type: QUERY +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-2 + Column Stats Work{} + Stage-0 + Reducer 2 + File Output Operator [FS_6] + Group By Operator [GBY_4] (rows=1/1 width=960) + Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0)","compute_stats(VALUE._col1)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + Group By Operator [GBY_2] (rows=1/1 width=984) + Output:["_col0","_col1"],aggregations:["compute_stats(key, 16)","compute_stats(value, 16)"] + Select Operator [SEL_1] (rows=500/500 width=178) + Output:["key","value"] + TableScan [TS_0] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: CREATE TEMPORARY MACRO SIGMOID (x DOUBLE) 1.0 / (1.0 + EXP(-x)) +PREHOOK: type: CREATEMACRO +PREHOOK: Output: database:default +POSTHOOK: query: CREATE TEMPORARY MACRO SIGMOID (x DOUBLE) 1.0 / (1.0 + EXP(-x)) +POSTHOOK: type: CREATEMACRO +POSTHOOK: Output: database:default +PREHOOK: query: explain analyze +CREATE TEMPORARY MACRO SIGMOID (x DOUBLE) 1.0 / (1.0 + EXP(-x)) +PREHOOK: type: CREATEMACRO +POSTHOOK: query: explain analyze +CREATE TEMPORARY MACRO SIGMOID (x DOUBLE) 1.0 / (1.0 + EXP(-x)) +POSTHOOK: type: CREATEMACRO +Stage-0 + +PREHOOK: query: CREATE TEMPORARY MACRO SIGMOID (x DOUBLE) 1.0 / (1.0 + EXP(-x)) +PREHOOK: type: CREATEMACRO +PREHOOK: Output: database:default +POSTHOOK: query: CREATE TEMPORARY MACRO SIGMOID (x DOUBLE) 1.0 / (1.0 + EXP(-x)) +POSTHOOK: type: CREATEMACRO +POSTHOOK: Output: database:default +PREHOOK: query: SELECT SIGMOID(2) FROM src LIMIT 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: SELECT SIGMOID(2) FROM src LIMIT 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze SELECT SIGMOID(2) FROM src LIMIT 1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze SELECT SIGMOID(2) FROM src LIMIT 1 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-0 + Fetch Operator + limit:1 + Limit [LIM_2] + Number of rows:1 + Select Operator [SEL_1] + Output:["_col0"] + TableScan [TS_0] + +PREHOOK: query: DROP TEMPORARY MACRO SIGMOID +PREHOOK: type: DROPMACRO +PREHOOK: Output: database:default +POSTHOOK: query: DROP TEMPORARY MACRO SIGMOID +POSTHOOK: type: DROPMACRO +POSTHOOK: Output: database:default +PREHOOK: query: explain analyze DROP TEMPORARY MACRO SIGMOID +PREHOOK: type: DROPMACRO +POSTHOOK: query: explain analyze DROP TEMPORARY MACRO SIGMOID +POSTHOOK: type: DROPMACRO +Stage-0 + +PREHOOK: query: DROP TEMPORARY MACRO SIGMOID +PREHOOK: type: DROPMACRO +PREHOOK: Output: database:default +POSTHOOK: query: DROP TEMPORARY MACRO SIGMOID +POSTHOOK: type: DROPMACRO +POSTHOOK: Output: database:default +PREHOOK: query: create table src_autho_test as select * from src +PREHOOK: type: CREATETABLE_AS_SELECT +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@src_autho_test +POSTHOOK: query: create table src_autho_test as select * from src +POSTHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@src_autho_test +PREHOOK: query: explain analyze create table src_autho_test as select * from src +PREHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: query: explain analyze create table src_autho_test as select * from src +POSTHOOK: type: CREATETABLE_AS_SELECT +Plan optimized by CBO. + +Stage-3 + Stats-Aggr Operator + Stage-4 + Create Table Operator: + name:default.src_autho_test + Stage-2 + Dependency Collection{} + Stage-1 + Map 1 + File Output Operator [FS_2] + table:{"name:":"default.src_autho_test"} + Select Operator [SEL_1] (rows=500/500 width=178) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + Stage-0 + Move Operator + Please refer to the previous Stage-1 + +PREHOOK: query: create table src_autho_test as select * from src +PREHOOK: type: CREATETABLE_AS_SELECT +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@src_autho_test +POSTHOOK: query: create table src_autho_test as select * from src +POSTHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@src_autho_test +POSTHOOK: Lineage: src_autho_test.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: src_autho_test.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: grant select on table src_autho_test to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +PREHOOK: Output: default@src_autho_test +POSTHOOK: query: grant select on table src_autho_test to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +POSTHOOK: Output: default@src_autho_test +PREHOOK: query: explain analyze grant select on table src_autho_test to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: explain analyze grant select on table src_autho_test to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +Stage-0 + +PREHOOK: query: grant select on table src_autho_test to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +PREHOOK: Output: default@src_autho_test +POSTHOOK: query: grant select on table src_autho_test to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +POSTHOOK: Output: default@src_autho_test +PREHOOK: query: show grant user hive_test_user on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: explain analyze show grant user hive_test_user on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: explain analyze show grant user hive_test_user on table src_autho_test +POSTHOOK: type: SHOW_GRANT +Stage-1 + Fetch Operator + limit:-1 + Stage-0 + +PREHOOK: query: show grant user hive_test_user on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: explain analyze show grant user hive_test_user on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: explain analyze show grant user hive_test_user on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +Stage-1 + Fetch Operator + limit:-1 + Stage-0 + +PREHOOK: query: select key from src_autho_test order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@src_autho_test +#### A masked pattern was here #### +POSTHOOK: query: select key from src_autho_test order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_autho_test +#### A masked pattern was here #### +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +PREHOOK: query: revoke select on table src_autho_test from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +PREHOOK: Output: default@src_autho_test +POSTHOOK: query: revoke select on table src_autho_test from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Output: default@src_autho_test +PREHOOK: query: explain analyze revoke select on table src_autho_test from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: explain analyze revoke select on table src_autho_test from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +Stage-0 + +PREHOOK: query: grant select(key) on table src_autho_test to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +PREHOOK: Output: default@src_autho_test +POSTHOOK: query: grant select(key) on table src_autho_test to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +POSTHOOK: Output: default@src_autho_test +PREHOOK: query: explain analyze grant select(key) on table src_autho_test to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: explain analyze grant select(key) on table src_autho_test to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +Stage-0 + +PREHOOK: query: revoke select(key) on table src_autho_test from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +PREHOOK: Output: default@src_autho_test +POSTHOOK: query: revoke select(key) on table src_autho_test from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Output: default@src_autho_test +PREHOOK: query: explain analyze revoke select(key) on table src_autho_test from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: explain analyze revoke select(key) on table src_autho_test from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +Stage-0 + +PREHOOK: query: create role sRc_roLE +PREHOOK: type: CREATEROLE +POSTHOOK: query: create role sRc_roLE +POSTHOOK: type: CREATEROLE +PREHOOK: query: explain analyze +create role sRc_roLE +PREHOOK: type: CREATEROLE +POSTHOOK: query: explain analyze +create role sRc_roLE +POSTHOOK: type: CREATEROLE +Stage-0 + +PREHOOK: query: create role sRc_roLE +PREHOOK: type: CREATEROLE +POSTHOOK: query: create role sRc_roLE +POSTHOOK: type: CREATEROLE +PREHOOK: query: grant role sRc_roLE to user hive_test_user +PREHOOK: type: GRANT_ROLE +POSTHOOK: query: grant role sRc_roLE to user hive_test_user +POSTHOOK: type: GRANT_ROLE +PREHOOK: query: explain analyze +grant role sRc_roLE to user hive_test_user +PREHOOK: type: GRANT_ROLE +POSTHOOK: query: explain analyze +grant role sRc_roLE to user hive_test_user +POSTHOOK: type: GRANT_ROLE +Stage-0 + +PREHOOK: query: grant role sRc_roLE to user hive_test_user +PREHOOK: type: GRANT_ROLE +POSTHOOK: query: grant role sRc_roLE to user hive_test_user +POSTHOOK: type: GRANT_ROLE +PREHOOK: query: show role grant user hive_test_user +PREHOOK: type: SHOW_ROLE_GRANT +POSTHOOK: query: show role grant user hive_test_user +POSTHOOK: type: SHOW_ROLE_GRANT +PREHOOK: query: explain analyze show role grant user hive_test_user +PREHOOK: type: SHOW_ROLE_GRANT +POSTHOOK: query: explain analyze show role grant user hive_test_user +POSTHOOK: type: SHOW_ROLE_GRANT +Stage-1 + Fetch Operator + limit:-1 + Stage-0 + +PREHOOK: query: drop role sRc_roLE +PREHOOK: type: DROPROLE +POSTHOOK: query: drop role sRc_roLE +POSTHOOK: type: DROPROLE +PREHOOK: query: explain analyze drop role sRc_roLE +PREHOOK: type: DROPROLE +POSTHOOK: query: explain analyze drop role sRc_roLE +POSTHOOK: type: DROPROLE +Stage-0 + +PREHOOK: query: drop role sRc_roLE +PREHOOK: type: DROPROLE +POSTHOOK: query: drop role sRc_roLE +POSTHOOK: type: DROPROLE +PREHOOK: query: drop table src_autho_test +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: default@src_autho_test +POSTHOOK: query: drop table src_autho_test +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: default@src_autho_test +PREHOOK: query: drop view v +PREHOOK: type: DROPVIEW +POSTHOOK: query: drop view v +POSTHOOK: type: DROPVIEW +PREHOOK: query: explain analyze drop view v +PREHOOK: type: DROPVIEW +POSTHOOK: query: explain analyze drop view v +POSTHOOK: type: DROPVIEW +Stage-0 + Drop Table Operator: + table:v + +PREHOOK: query: create view v as with cte as (select * from src order by key limit 5) +select * from cte +PREHOOK: type: CREATEVIEW +PREHOOK: Input: default@src +PREHOOK: Output: database:default +PREHOOK: Output: default@v +POSTHOOK: query: create view v as with cte as (select * from src order by key limit 5) +select * from cte +POSTHOOK: type: CREATEVIEW +POSTHOOK: Input: default@src +POSTHOOK: Output: database:default +POSTHOOK: Output: default@v +PREHOOK: query: explain analyze create view v as with cte as (select * from src order by key limit 5) +select * from cte +PREHOOK: type: CREATEVIEW +POSTHOOK: query: explain analyze create view v as with cte as (select * from src order by key limit 5) +select * from cte +POSTHOOK: type: CREATEVIEW +Plan not optimized by CBO. + +Stage-0 + Create View Operator: + name:default.v,original text:with cte as (select * from src order by key limit 5) +select * from cte + +PREHOOK: query: with cte as (select * from src order by key limit 5) +select * from cte +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: with cte as (select * from src order by key limit 5) +select * from cte +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze with cte as (select * from src order by key limit 5) +select * from cte +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze with cte as (select * from src order by key limit 5) +select * from cte +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:5 + Stage-1 + Reducer 2 + File Output Operator [FS_5] + Limit [LIM_4] (rows=5/5 width=178) + Number of rows:5 + Select Operator [SEL_3] (rows=500/5 width=178) + Output:["_col0","_col1"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_2] + Select Operator [SEL_1] (rows=500/500 width=178) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: create table orc_merge5 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@orc_merge5 +POSTHOOK: query: create table orc_merge5 (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) stored as orc +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@orc_merge5 +PREHOOK: query: load data local inpath '../../data/files/orc_split_elim.orc' into table orc_merge5 +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@orc_merge5 +POSTHOOK: query: load data local inpath '../../data/files/orc_split_elim.orc' into table orc_merge5 +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@orc_merge5 +PREHOOK: query: insert overwrite table orc_merge5 select userid,string1,subtype,decimal1,ts from orc_merge5 where userid<=13 +PREHOOK: type: QUERY +PREHOOK: Input: default@orc_merge5 +PREHOOK: Output: default@orc_merge5 +POSTHOOK: query: insert overwrite table orc_merge5 select userid,string1,subtype,decimal1,ts from orc_merge5 where userid<=13 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@orc_merge5 +POSTHOOK: Output: default@orc_merge5 +PREHOOK: query: explain analyze insert overwrite table orc_merge5 select userid,string1,subtype,decimal1,ts from orc_merge5 where userid<=13 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze insert overwrite table orc_merge5 select userid,string1,subtype,decimal1,ts from orc_merge5 where userid<=13 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Stage-3 + Stats-Aggr Operator + Stage-0 + Move Operator + table:{"name:":"default.orc_merge5"} + Stage-2 + Dependency Collection{} + Stage-5(CONDITIONAL) + Move Operator + Stage-8(CONDITIONAL CHILD TASKS: Stage-5, Stage-4, Stage-6) + Conditional Operator + Stage-1 + Map 1 + File Output Operator [FS_3] + table:{"name:":"default.orc_merge5"} + Select Operator [SEL_2] (rows=306/3 width=268) + Output:["_col0","_col1","_col2","_col3","_col4"] + Filter Operator [FIL_4] (rows=306/3 width=268) + predicate:(userid <= 13) + TableScan [TS_0] (rows=919/15000 width=268) + default@orc_merge5,orc_merge5,Tbl:COMPLETE,Col:NONE,Output:["userid","string1","subtype","decimal1","ts"] + Stage-4(CONDITIONAL) + File Merge + Please refer to the previous Stage-8(CONDITIONAL CHILD TASKS: Stage-5, Stage-4, Stage-6) + Stage-7 + Move Operator + Stage-6(CONDITIONAL) + File Merge + Please refer to the previous Stage-8(CONDITIONAL CHILD TASKS: Stage-5, Stage-4, Stage-6) + +PREHOOK: query: drop table orc_merge5 +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@orc_merge5 +PREHOOK: Output: default@orc_merge5 +POSTHOOK: query: drop table orc_merge5 +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@orc_merge5 +POSTHOOK: Output: default@orc_merge5 +PREHOOK: query: CREATE TABLE srcbucket_mapjoin(key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@srcbucket_mapjoin +POSTHOOK: query: CREATE TABLE srcbucket_mapjoin(key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@srcbucket_mapjoin +PREHOOK: query: CREATE TABLE tab_part (key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@tab_part +POSTHOOK: query: CREATE TABLE tab_part (key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@tab_part +PREHOOK: query: CREATE TABLE srcbucket_mapjoin_part (key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@srcbucket_mapjoin_part +POSTHOOK: query: CREATE TABLE srcbucket_mapjoin_part (key int, value string) partitioned by (ds string) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@srcbucket_mapjoin_part +PREHOOK: query: load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin partition(ds='2008-04-08') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@srcbucket_mapjoin +POSTHOOK: query: load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin partition(ds='2008-04-08') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@srcbucket_mapjoin +POSTHOOK: Output: default@srcbucket_mapjoin@ds=2008-04-08 +PREHOOK: query: load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin partition(ds='2008-04-08') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@srcbucket_mapjoin@ds=2008-04-08 +POSTHOOK: query: load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin partition(ds='2008-04-08') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@srcbucket_mapjoin@ds=2008-04-08 +PREHOOK: query: load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@srcbucket_mapjoin_part +POSTHOOK: query: load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@srcbucket_mapjoin_part +POSTHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +PREHOOK: query: load data local inpath '../../data/files/srcbucket21.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +POSTHOOK: query: load data local inpath '../../data/files/srcbucket21.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +PREHOOK: query: load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +POSTHOOK: query: load data local inpath '../../data/files/srcbucket22.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +PREHOOK: query: load data local inpath '../../data/files/srcbucket23.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +POSTHOOK: query: load data local inpath '../../data/files/srcbucket23.txt' INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08') +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08 +PREHOOK: query: insert overwrite table tab_part partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin_part +PREHOOK: type: QUERY +PREHOOK: Input: default@srcbucket_mapjoin_part +PREHOOK: Input: default@srcbucket_mapjoin_part@ds=2008-04-08 +PREHOOK: Output: default@tab_part@ds=2008-04-08 +POSTHOOK: query: insert overwrite table tab_part partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin_part +POSTHOOK: type: QUERY +POSTHOOK: Input: default@srcbucket_mapjoin_part +POSTHOOK: Input: default@srcbucket_mapjoin_part@ds=2008-04-08 +POSTHOOK: Output: default@tab_part@ds=2008-04-08 +POSTHOOK: Lineage: tab_part PARTITION(ds=2008-04-08).key SIMPLE [(srcbucket_mapjoin_part)srcbucket_mapjoin_part.FieldSchema(name:key, type:int, comment:null), ] +POSTHOOK: Lineage: tab_part PARTITION(ds=2008-04-08).value SIMPLE [(srcbucket_mapjoin_part)srcbucket_mapjoin_part.FieldSchema(name:value, type:string, comment:null), ] +PREHOOK: query: CREATE TABLE tab(key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@tab +POSTHOOK: query: CREATE TABLE tab(key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@tab +PREHOOK: query: insert overwrite table tab partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin +PREHOOK: type: QUERY +PREHOOK: Input: default@srcbucket_mapjoin +PREHOOK: Input: default@srcbucket_mapjoin@ds=2008-04-08 +PREHOOK: Output: default@tab@ds=2008-04-08 +POSTHOOK: query: insert overwrite table tab partition (ds='2008-04-08') +select key,value from srcbucket_mapjoin +POSTHOOK: type: QUERY +POSTHOOK: Input: default@srcbucket_mapjoin +POSTHOOK: Input: default@srcbucket_mapjoin@ds=2008-04-08 +POSTHOOK: Output: default@tab@ds=2008-04-08 +POSTHOOK: Lineage: tab PARTITION(ds=2008-04-08).key SIMPLE [(srcbucket_mapjoin)srcbucket_mapjoin.FieldSchema(name:key, type:int, comment:null), ] +POSTHOOK: Lineage: tab PARTITION(ds=2008-04-08).value SIMPLE [(srcbucket_mapjoin)srcbucket_mapjoin.FieldSchema(name:value, type:string, comment:null), ] +PREHOOK: query: select a.key, a.value, b.value +from tab a join tab_part b on a.key = b.key +PREHOOK: type: QUERY +PREHOOK: Input: default@tab +PREHOOK: Input: default@tab@ds=2008-04-08 +PREHOOK: Input: default@tab_part +PREHOOK: Input: default@tab_part@ds=2008-04-08 +#### A masked pattern was here #### +POSTHOOK: query: select a.key, a.value, b.value +from tab a join tab_part b on a.key = b.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab +POSTHOOK: Input: default@tab@ds=2008-04-08 +POSTHOOK: Input: default@tab_part +POSTHOOK: Input: default@tab_part@ds=2008-04-08 +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select a.key, a.value, b.value +from tab a join tab_part b on a.key = b.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select a.key, a.value, b.value +from tab a join tab_part b on a.key = b.key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 2 <- Map 1 (CUSTOM_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Map 2 + File Output Operator [FS_10] + Select Operator [SEL_9] (rows=550/480 width=18) + Output:["_col0","_col1","_col2"] + Map Join Operator [MAPJOIN_15] (rows=550/480 width=18) + BucketMapJoin:true,Conds:RS_6._col0=SEL_5._col0(Inner),HybridGraceHashJoin:true,Output:["_col0","_col1","_col3"] + <-Map 1 [CUSTOM_EDGE] + MULTICAST [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=242/242 width=18) + Output:["_col0","_col1"] + Filter Operator [FIL_13] (rows=242/242 width=18) + predicate:key is not null + TableScan [TS_0] (rows=242/242 width=18) + default@tab,a,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + <-Select Operator [SEL_5] (rows=500/500 width=18) + Output:["_col0","_col1"] + Filter Operator [FIL_14] (rows=500/500 width=18) + predicate:key is not null + TableScan [TS_3] (rows=500/500 width=18) + default@tab_part,b,Tbl:COMPLETE,Col:NONE,Output:["key","value"] + diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out b/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out new file mode 100644 index 0000000..3426d19 --- /dev/null +++ b/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out @@ -0,0 +1,590 @@ +PREHOOK: query: select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +PREHOOK: query: -- First try with regular mergejoin +explain analyze +select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint +PREHOOK: type: QUERY +POSTHOOK: query: -- First try with regular mergejoin +explain analyze +select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_12] + Select Operator [SEL_11] (rows=7286/10 width=620) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_10] + Merge Join Operator [MERGEJOIN_17] (rows=7286/10 width=620) + Conds:RS_6._col2=RS_7._col2(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col2 + Select Operator [SEL_2] (rows=6144/10 width=251) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"] + Filter Operator [FIL_15] (rows=6144/10 width=251) + predicate:cint BETWEEN 1000000 AND 3000000 + TableScan [TS_0] (rows=12288/12288 width=251) + default@alltypesorc,a,Tbl:COMPLETE,Col:COMPLETE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col2 + Select Operator [SEL_5] (rows=3424/10 width=251) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"] + Filter Operator [FIL_16] (rows=3424/10 width=251) + predicate:(cint is not null and cbigint is not null and cint BETWEEN 1000000 AND 3000000) + TableScan [TS_3] (rows=12288/12288 width=251) + default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"] + +PREHOOK: query: select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +11 NULL 1000828 1531084669 11.0 NULL wM316f6NqGIkoP388j3F6 poWQQo3Upvt3Wh 1969-12-31 16:00:02.351 NULL false true 11 NULL 1000828 1531084669 11.0 NULL wM316f6NqGIkoP388j3F6 poWQQo3Upvt3Wh 1969-12-31 16:00:02.351 NULL false true +NULL -3799 1248059 1864027286 NULL -3799.0 Uhps6mMh3IfHB3j7yH62K 4KWs6gw7lv2WYd66P NULL 1969-12-31 15:59:54.622 false true NULL -3799 1248059 1864027286 NULL -3799.0 Uhps6mMh3IfHB3j7yH62K 4KWs6gw7lv2WYd66P NULL 1969-12-31 15:59:54.622 false true +NULL 10782 1286921 1864027286 NULL 10782.0 ODLrXI8882q8LS8 4KWs6gw7lv2WYd66P NULL 1969-12-31 15:59:52.138 true true NULL 10782 1286921 1864027286 NULL 10782.0 ODLrXI8882q8LS8 4KWs6gw7lv2WYd66P NULL 1969-12-31 15:59:52.138 true true +NULL -13036 1288927 -1645852809 NULL -13036.0 yinBY725P7V2 xH7445Rals48VOulSyR5F NULL 1969-12-31 16:00:00.763 true false NULL -13036 1288927 -1645852809 NULL -13036.0 yinBY725P7V2 xH7445Rals48VOulSyR5F NULL 1969-12-31 16:00:00.763 true false +11 NULL 1310786 -413875656 11.0 NULL W0rvA4H1xn0xMG4uk0 8yVVjG 1969-12-31 16:00:02.351 NULL false true 11 NULL 1310786 -413875656 11.0 NULL W0rvA4H1xn0xMG4uk0 8yVVjG 1969-12-31 16:00:02.351 NULL false true +-51 NULL 2089466 -240556350 -51.0 NULL cXX24dH7tblSj46j2g C31eea0wrHHqvj 1969-12-31 16:00:08.451 NULL true true -51 NULL 2089466 -240556350 -51.0 NULL cXX24dH7tblSj46j2g C31eea0wrHHqvj 1969-12-31 16:00:08.451 NULL true true +NULL -8915 2101183 1864027286 NULL -8915.0 x7By66525 4KWs6gw7lv2WYd66P NULL 1969-12-31 16:00:05.831 false true NULL -8915 2101183 1864027286 NULL -8915.0 x7By66525 4KWs6gw7lv2WYd66P NULL 1969-12-31 16:00:05.831 false true +8 NULL 2229621 -381406148 8.0 NULL q7onkS7QRPh5ghOK oKb0bi 1969-12-31 16:00:15.892 NULL true false 8 NULL 2229621 -381406148 8.0 NULL q7onkS7QRPh5ghOK oKb0bi 1969-12-31 16:00:15.892 NULL true false +8 NULL 2433892 -1611863517 8.0 NULL 674ILv3V2TxFqXP6wSbL VLprkK2XfX 1969-12-31 16:00:15.892 NULL false true 8 NULL 2433892 -1611863517 8.0 NULL 674ILv3V2TxFqXP6wSbL VLprkK2XfX 1969-12-31 16:00:15.892 NULL false true +-51 NULL 2949963 -1580871111 -51.0 NULL 0K68k3bdl7jO7 TPPAu 1969-12-31 16:00:08.451 NULL true false -51 NULL 2949963 -1580871111 -51.0 NULL 0K68k3bdl7jO7 TPPAu 1969-12-31 16:00:08.451 NULL true false +PREHOOK: query: select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_14] + Group By Operator [GBY_12] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_11] + Group By Operator [GBY_10] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count()"] + Merge Join Operator [MERGEJOIN_19] (rows=7286/10 width=8) + Conds:RS_6._col0=RS_7._col0(Inner) + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=6144/10 width=2) + Output:["_col0"] + Filter Operator [FIL_17] (rows=6144/10 width=2) + predicate:cint BETWEEN 1000000 AND 3000000 + TableScan [TS_0] (rows=12288/12288 width=2) + default@alltypesorc,a,Tbl:COMPLETE,Col:COMPLETE,Output:["cint"] + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=3424/10 width=8) + Output:["_col0"] + Filter Operator [FIL_18] (rows=3424/10 width=8) + predicate:(cint is not null and cbigint is not null and cint BETWEEN 1000000 AND 3000000) + TableScan [TS_3] (rows=12288/12288 width=8) + default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["cint","cbigint"] + +PREHOOK: query: select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +10 +PREHOOK: query: select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1 +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_16] + Select Operator [SEL_15] (rows=2765/5 width=12) + Output:["_col0","_col1"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_14] + Group By Operator [GBY_12] (rows=2765/5 width=12) + Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0 + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_11] + PartitionCols:_col0 + Group By Operator [GBY_10] (rows=2765/5 width=12) + Output:["_col0","_col1"],aggregations:["count()"],keys:_col0 + Merge Join Operator [MERGEJOIN_21] (rows=7286/10 width=4) + Conds:RS_6._col1=RS_7._col0(Inner),Output:["_col0"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col1 + Select Operator [SEL_2] (rows=6144/10 width=5) + Output:["_col0","_col1"] + Filter Operator [FIL_19] (rows=6144/10 width=5) + predicate:cint BETWEEN 1000000 AND 3000000 + TableScan [TS_0] (rows=12288/12288 width=5) + default@alltypesorc,a,Tbl:COMPLETE,Col:COMPLETE,Output:["csmallint","cint"] + <-Map 5 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=3424/10 width=8) + Output:["_col0"] + Filter Operator [FIL_20] (rows=3424/10 width=8) + predicate:(cint is not null and cbigint is not null and cint BETWEEN 1000000 AND 3000000) + TableScan [TS_3] (rows=12288/12288 width=8) + default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["cint","cbigint"] + +PREHOOK: query: select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1 +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +-13036 1 +-8915 1 +-3799 1 +10782 1 +NULL 6 +PREHOOK: query: select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +PREHOOK: query: -- Try with dynamically partitioned hashjoin +explain analyze +select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint +PREHOOK: type: QUERY +POSTHOOK: query: -- Try with dynamically partitioned hashjoin +explain analyze +select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE), Map 4 (CUSTOM_SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_12] + Select Operator [SEL_11] (rows=6758/10 width=215) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_10] + Map Join Operator [MAPJOIN_17] (rows=6758/10 width=215) + Conds:RS_6.KEY.reducesinkkey0=RS_7.KEY.reducesinkkey0(Inner),HybridGraceHashJoin:true,Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"] + <-Map 4 [CUSTOM_SIMPLE_EDGE] + PARTITION_ONLY_SHUFFLE [RS_7] + PartitionCols:_col2 + Select Operator [SEL_5] (rows=6144/10 width=215) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"] + Filter Operator [FIL_16] (rows=6144/10 width=215) + predicate:(cint is not null and cbigint is not null and cint BETWEEN 1000000 AND 3000000) + TableScan [TS_3] (rows=12288/12288 width=215) + default@alltypesorc,b,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"] + <-Map 1 [CUSTOM_SIMPLE_EDGE] + PARTITION_ONLY_SHUFFLE [RS_6] + PartitionCols:_col2 + Select Operator [SEL_2] (rows=6144/10 width=215) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"] + Filter Operator [FIL_15] (rows=6144/10 width=215) + predicate:cint BETWEEN 1000000 AND 3000000 + TableScan [TS_0] (rows=12288/12288 width=215) + default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"] + +PREHOOK: query: select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: select + * +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +order by a.cint +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +11 NULL 1000828 1531084669 11.0 NULL wM316f6NqGIkoP388j3F6 poWQQo3Upvt3Wh 1969-12-31 16:00:02.351 NULL false true 11 NULL 1000828 1531084669 11.0 NULL wM316f6NqGIkoP388j3F6 poWQQo3Upvt3Wh 1969-12-31 16:00:02.351 NULL false true +NULL -3799 1248059 1864027286 NULL -3799.0 Uhps6mMh3IfHB3j7yH62K 4KWs6gw7lv2WYd66P NULL 1969-12-31 15:59:54.622 false true NULL -3799 1248059 1864027286 NULL -3799.0 Uhps6mMh3IfHB3j7yH62K 4KWs6gw7lv2WYd66P NULL 1969-12-31 15:59:54.622 false true +NULL 10782 1286921 1864027286 NULL 10782.0 ODLrXI8882q8LS8 4KWs6gw7lv2WYd66P NULL 1969-12-31 15:59:52.138 true true NULL 10782 1286921 1864027286 NULL 10782.0 ODLrXI8882q8LS8 4KWs6gw7lv2WYd66P NULL 1969-12-31 15:59:52.138 true true +NULL -13036 1288927 -1645852809 NULL -13036.0 yinBY725P7V2 xH7445Rals48VOulSyR5F NULL 1969-12-31 16:00:00.763 true false NULL -13036 1288927 -1645852809 NULL -13036.0 yinBY725P7V2 xH7445Rals48VOulSyR5F NULL 1969-12-31 16:00:00.763 true false +11 NULL 1310786 -413875656 11.0 NULL W0rvA4H1xn0xMG4uk0 8yVVjG 1969-12-31 16:00:02.351 NULL false true 11 NULL 1310786 -413875656 11.0 NULL W0rvA4H1xn0xMG4uk0 8yVVjG 1969-12-31 16:00:02.351 NULL false true +-51 NULL 2089466 -240556350 -51.0 NULL cXX24dH7tblSj46j2g C31eea0wrHHqvj 1969-12-31 16:00:08.451 NULL true true -51 NULL 2089466 -240556350 -51.0 NULL cXX24dH7tblSj46j2g C31eea0wrHHqvj 1969-12-31 16:00:08.451 NULL true true +NULL -8915 2101183 1864027286 NULL -8915.0 x7By66525 4KWs6gw7lv2WYd66P NULL 1969-12-31 16:00:05.831 false true NULL -8915 2101183 1864027286 NULL -8915.0 x7By66525 4KWs6gw7lv2WYd66P NULL 1969-12-31 16:00:05.831 false true +8 NULL 2229621 -381406148 8.0 NULL q7onkS7QRPh5ghOK oKb0bi 1969-12-31 16:00:15.892 NULL true false 8 NULL 2229621 -381406148 8.0 NULL q7onkS7QRPh5ghOK oKb0bi 1969-12-31 16:00:15.892 NULL true false +8 NULL 2433892 -1611863517 8.0 NULL 674ILv3V2TxFqXP6wSbL VLprkK2XfX 1969-12-31 16:00:15.892 NULL false true 8 NULL 2433892 -1611863517 8.0 NULL 674ILv3V2TxFqXP6wSbL VLprkK2XfX 1969-12-31 16:00:15.892 NULL false true +-51 NULL 2949963 -1580871111 -51.0 NULL 0K68k3bdl7jO7 TPPAu 1969-12-31 16:00:08.451 NULL true false -51 NULL 2949963 -1580871111 -51.0 NULL 0K68k3bdl7jO7 TPPAu 1969-12-31 16:00:08.451 NULL true false +PREHOOK: query: select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE), Map 4 (CUSTOM_SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 3 + File Output Operator [FS_14] + Group By Operator [GBY_12] (rows=1/1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_11] + Group By Operator [GBY_10] (rows=1/14 width=8) + Output:["_col0"],aggregations:["count()"] + Map Join Operator [MAPJOIN_19] (rows=6758/10 width=215) + Conds:RS_6.KEY.reducesinkkey0=RS_7.KEY.reducesinkkey0(Inner),HybridGraceHashJoin:true + <-Map 4 [CUSTOM_SIMPLE_EDGE] + PARTITION_ONLY_SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=6144/10 width=215) + Output:["_col0"] + Filter Operator [FIL_18] (rows=6144/10 width=215) + predicate:(cint is not null and cbigint is not null and cint BETWEEN 1000000 AND 3000000) + TableScan [TS_3] (rows=12288/12288 width=215) + default@alltypesorc,b,Tbl:COMPLETE,Col:NONE,Output:["cint","cbigint"] + <-Map 1 [CUSTOM_SIMPLE_EDGE] + PARTITION_ONLY_SHUFFLE [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=6144/10 width=215) + Output:["_col0"] + Filter Operator [FIL_17] (rows=6144/10 width=215) + predicate:cint BETWEEN 1000000 AND 3000000 + TableScan [TS_0] (rows=12288/12288 width=215) + default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["cint"] + +PREHOOK: query: select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: select + count(*) +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +10 +PREHOOK: query: select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1 +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +PREHOOK: query: explain analyze +select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze +select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE), Map 5 (CUSTOM_SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:-1 + Stage-1 + Reducer 4 + File Output Operator [FS_16] + Select Operator [SEL_15] (rows=3379/5 width=215) + Output:["_col0","_col1"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_14] + Group By Operator [GBY_12] (rows=3379/5 width=215) + Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0 + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_11] + PartitionCols:_col0 + Group By Operator [GBY_10] (rows=6758/9 width=215) + Output:["_col0","_col1"],aggregations:["count()"],keys:_col0 + Map Join Operator [MAPJOIN_21] (rows=6758/10 width=215) + Conds:RS_6.KEY.reducesinkkey0=RS_7.KEY.reducesinkkey0(Inner),HybridGraceHashJoin:true,Output:["_col0"] + <-Map 5 [CUSTOM_SIMPLE_EDGE] + PARTITION_ONLY_SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=6144/10 width=215) + Output:["_col0"] + Filter Operator [FIL_20] (rows=6144/10 width=215) + predicate:(cint is not null and cbigint is not null and cint BETWEEN 1000000 AND 3000000) + TableScan [TS_3] (rows=12288/12288 width=215) + default@alltypesorc,b,Tbl:COMPLETE,Col:NONE,Output:["cint","cbigint"] + <-Map 1 [CUSTOM_SIMPLE_EDGE] + PARTITION_ONLY_SHUFFLE [RS_6] + PartitionCols:_col1 + Select Operator [SEL_2] (rows=6144/10 width=215) + Output:["_col0","_col1"] + Filter Operator [FIL_19] (rows=6144/10 width=215) + predicate:cint BETWEEN 1000000 AND 3000000 + TableScan [TS_0] (rows=12288/12288 width=215) + default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["csmallint","cint"] + +PREHOOK: query: select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1 +PREHOOK: type: QUERY +PREHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +POSTHOOK: query: select + a.csmallint, count(*) c1 +from alltypesorc a join alltypesorc b on a.cint = b.cint +where + a.cint between 1000000 and 3000000 and b.cbigint is not null +group by a.csmallint +order by c1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@alltypesorc +#### A masked pattern was here #### +-8915 1 +-3799 1 +10782 1 +-13036 1 +NULL 6 diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_5.q.out b/ql/src/test/results/clientpositive/tez/explainanalyze_5.q.out new file mode 100644 index 0000000..39bc6f4 --- /dev/null +++ b/ql/src/test/results/clientpositive/tez/explainanalyze_5.q.out @@ -0,0 +1,445 @@ +PREHOOK: query: analyze table src compute statistics +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@src +FAILED: Hive Internal Error: java.lang.RuntimeException(Cannot overwrite read-only table: src) +java.lang.RuntimeException: Cannot overwrite read-only table: src +#### A masked pattern was here #### + +PREHOOK: query: explain analyze analyze table src compute statistics +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze analyze table src compute statistics +POSTHOOK: type: QUERY +Stage-2 + Stats-Aggr Operator + Stage-0 + Map 1 + TableScan [TS_0] (rows=500/0 width=10) + default@src,src,Tbl:COMPLETE,Col:COMPLETE + +PREHOOK: query: analyze table src compute statistics for columns +PREHOOK: type: QUERY +PREHOOK: Input: default@src +#### A masked pattern was here #### +POSTHOOK: query: analyze table src compute statistics for columns +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +#### A masked pattern was here #### +PREHOOK: query: explain analyze analyze table src compute statistics for columns +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze analyze table src compute statistics for columns +POSTHOOK: type: QUERY +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-2 + Column Stats Work{} + Stage-0 + Reducer 2 + File Output Operator [FS_6] + Group By Operator [GBY_4] (rows=1/1 width=960) + Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0)","compute_stats(VALUE._col1)"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + Group By Operator [GBY_2] (rows=1/1 width=984) + Output:["_col0","_col1"],aggregations:["compute_stats(key, 16)","compute_stats(value, 16)"] + Select Operator [SEL_1] (rows=500/500 width=178) + Output:["key","value"] + TableScan [TS_0] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + +PREHOOK: query: drop table src_multi2 +PREHOOK: type: DROPTABLE +POSTHOOK: query: drop table src_multi2 +POSTHOOK: type: DROPTABLE +PREHOOK: query: create table src_multi2 like src +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@src_multi2 +POSTHOOK: query: create table src_multi2 like src +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@src_multi2 +PREHOOK: query: insert overwrite table src_multi2 select subq.key, src.value from (select * from src union select * from src1)subq join src on subq.key=src.key +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Output: default@src_multi2 +POSTHOOK: query: insert overwrite table src_multi2 select subq.key, src.value from (select * from src union select * from src1)subq join src on subq.key=src.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Output: default@src_multi2 +PREHOOK: query: explain analyze insert overwrite table src_multi2 select subq.key, src.value from (select * from src union select * from src1)subq join src on subq.key=src.key +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze insert overwrite table src_multi2 select subq.key, src.value from (select * from src union select * from src1)subq join src on subq.key=src.key +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Map 1 <- Union 2 (CONTAINS) +Map 6 <- Union 2 (CONTAINS) +Reducer 3 <- Union 2 (SIMPLE_EDGE) +Reducer 4 <- Map 7 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) + +Stage-4 + Column Stats Work{} + Stage-3 + Stats-Aggr Operator + Stage-0 + Move Operator + table:{"name:":"default.src_multi2"} + Stage-2 + Dependency Collection{} + Stage-1 + Reducer 5 + File Output Operator [FS_6] + Group By Operator [GBY_4] (rows=1/1 width=960) + Output:["_col0","_col1"],aggregations:["compute_stats(VALUE._col0)","compute_stats(VALUE._col1)"] + <-Reducer 4 [SIMPLE_EDGE] + File Output Operator [FS_20] + table:{"name:":"default.src_multi2"} + Select Operator [SEL_19] (rows=639/508 width=178) + Output:["_col0","_col1"] + Merge Join Operator [MERGEJOIN_27] (rows=639/508 width=178) + Conds:RS_16._col0=RS_17._col0(Inner),Output:["_col0","_col3"] + <-Map 7 [SIMPLE_EDGE] + SHUFFLE [RS_17] + PartitionCols:_col0 + Select Operator [SEL_15] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_26] (rows=500/500 width=178) + predicate:key is not null + TableScan [TS_13] (rows=500/500 width=178) + default@src,src,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_16] + PartitionCols:_col0 + Select Operator [SEL_12] (rows=262/319 width=178) + Output:["_col0"] + Group By Operator [GBY_11] (rows=262/319 width=178) + Output:["_col0","_col1"],keys:KEY._col0, KEY._col1 + <-Union 2 [SIMPLE_EDGE] + <-Map 1 [CONTAINS] + Reduce Output Operator [RS_10] + PartitionCols:_col0, _col1 + Group By Operator [GBY_9] (rows=262/331 width=178) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_2] (rows=500/500 width=178) + Output:["_col0","_col1"] + Filter Operator [FIL_24] (rows=500/500 width=178) + predicate:key is not null + TableScan [TS_0] (rows=500/500 width=178) + Output:["key","value"] + <-Map 6 [CONTAINS] + Reduce Output Operator [RS_10] + PartitionCols:_col0, _col1 + Group By Operator [GBY_9] (rows=262/331 width=178) + Output:["_col0","_col1"],keys:_col0, _col1 + Select Operator [SEL_5] (rows=25/25 width=175) + Output:["_col0","_col1"] + Filter Operator [FIL_25] (rows=25/25 width=175) + predicate:key is not null + TableScan [TS_3] (rows=25/25 width=175) + Output:["key","value"] + SHUFFLE [RS_3] + Group By Operator [GBY_2] (rows=1/1 width=984) + Output:["_col0","_col1"],aggregations:["compute_stats(key, 16)","compute_stats(value, 16)"] + Select Operator [SEL_1] (rows=639/508 width=178) + Output:["key","value"] + Please refer to the previous Select Operator [SEL_19] + +PREHOOK: query: select count(*) from (select * from src union select * from src1)subq +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from (select * from src union select * from src1)subq +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +#### A masked pattern was here #### +319 +PREHOOK: query: insert overwrite table src_multi2 select subq.key, src.value from (select * from src union select * from src1)subq join src on subq.key=src.key +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Input: default@src1 +PREHOOK: Output: default@src_multi2 +POSTHOOK: query: insert overwrite table src_multi2 select subq.key, src.value from (select * from src union select * from src1)subq join src on subq.key=src.key +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Input: default@src1 +POSTHOOK: Output: default@src_multi2 +POSTHOOK: Lineage: src_multi2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), (src1)src1.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: src_multi2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: describe formatted src_multi2 +PREHOOK: type: DESCTABLE +PREHOOK: Input: default@src_multi2 +POSTHOOK: query: describe formatted src_multi2 +POSTHOOK: type: DESCTABLE +POSTHOOK: Input: default@src_multi2 +# col_name data_type comment + +key string default +value string default + +# Detailed Table Information +Database: default +#### A masked pattern was here #### +Retention: 0 +#### A masked pattern was here #### +Table Type: MANAGED_TABLE +Table Parameters: + COLUMN_STATS_ACCURATE {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}} + numFiles 1 + numRows 508 + rawDataSize 5400 + totalSize 5908 +#### A masked pattern was here #### + +# Storage Information +SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe +InputFormat: org.apache.hadoop.mapred.TextInputFormat +OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat +Compressed: No +Num Buckets: -1 +Bucket Columns: [] +Sort Columns: [] +Storage Desc Params: + serialization.format 1 +PREHOOK: query: -- SORT_QUERY_RESULTS + +create table acid_uami(i int, + de decimal(5,2), + vc varchar(128)) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@acid_uami +POSTHOOK: query: -- SORT_QUERY_RESULTS + +create table acid_uami(i int, + de decimal(5,2), + vc varchar(128)) clustered by (i) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@acid_uami +PREHOOK: query: insert into table acid_uami values + (1, 109.23, 'mary had a little lamb'), + (6553, 923.19, 'its fleece was white as snow') +PREHOOK: type: QUERY +PREHOOK: Input: default@values__tmp__table__1 +PREHOOK: Output: default@acid_uami +POSTHOOK: query: insert into table acid_uami values + (1, 109.23, 'mary had a little lamb'), + (6553, 923.19, 'its fleece was white as snow') +POSTHOOK: type: QUERY +POSTHOOK: Input: default@values__tmp__table__1 +POSTHOOK: Output: default@acid_uami +POSTHOOK: Lineage: acid_uami.de EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col2, type:string, comment:), ] +POSTHOOK: Lineage: acid_uami.i EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col1, type:string, comment:), ] +POSTHOOK: Lineage: acid_uami.vc EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col3, type:string, comment:), ] +PREHOOK: query: insert into table acid_uami values + (10, 119.23, 'and everywhere that mary went'), + (65530, 823.19, 'the lamb was sure to go') +PREHOOK: type: QUERY +PREHOOK: Input: default@values__tmp__table__2 +PREHOOK: Output: default@acid_uami +POSTHOOK: query: insert into table acid_uami values + (10, 119.23, 'and everywhere that mary went'), + (65530, 823.19, 'the lamb was sure to go') +POSTHOOK: type: QUERY +POSTHOOK: Input: default@values__tmp__table__2 +POSTHOOK: Output: default@acid_uami +POSTHOOK: Lineage: acid_uami.de EXPRESSION [(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col2, type:string, comment:), ] +POSTHOOK: Lineage: acid_uami.i EXPRESSION [(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col1, type:string, comment:), ] +POSTHOOK: Lineage: acid_uami.vc EXPRESSION [(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col3, type:string, comment:), ] +PREHOOK: query: select * from acid_uami order by de +PREHOOK: type: QUERY +PREHOOK: Input: default@acid_uami +#### A masked pattern was here #### +POSTHOOK: query: select * from acid_uami order by de +POSTHOOK: type: QUERY +POSTHOOK: Input: default@acid_uami +#### A masked pattern was here #### +1 109.23 mary had a little lamb +10 119.23 and everywhere that mary went +6553 923.19 its fleece was white as snow +65530 823.19 the lamb was sure to go +PREHOOK: query: update acid_uami set de = 3.14 where de = 109.23 or de = 119.23 +PREHOOK: type: QUERY +PREHOOK: Input: default@acid_uami +PREHOOK: Output: default@acid_uami +POSTHOOK: query: update acid_uami set de = 3.14 where de = 109.23 or de = 119.23 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@acid_uami +POSTHOOK: Output: default@acid_uami +PREHOOK: query: explain analyze update acid_uami set de = 3.14 where de = 109.23 or de = 119.23 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze update acid_uami set de = 3.14 where de = 109.23 or de = 119.23 +POSTHOOK: type: QUERY +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-3 + Stats-Aggr Operator + Stage-0 + Move Operator + table:{"name:":"default.acid_uami"} + Stage-2 + Dependency Collection{} + Stage-1 + Reducer 2 + File Output Operator [FS_8] + table:{"name:":"default.acid_uami"} + Select Operator [SEL_4] (rows=6/2 width=302) + Output:["_col0","_col1","_col2","_col3"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:UDFToInteger(_col0) + Select Operator [SEL_2] (rows=6/2 width=302) + Output:["_col0","_col1","_col3"] + Filter Operator [FIL_9] (rows=6/2 width=226) + predicate:((de = 109.23) or (de = 119.23)) + TableScan [TS_0] (rows=8/4 width=226) + default@acid_uami,acid_uami, ACID table,Tbl:COMPLETE,Col:COMPLETE,Output:["i","de","vc"] + +PREHOOK: query: select * from acid_uami order by de +PREHOOK: type: QUERY +PREHOOK: Input: default@acid_uami +#### A masked pattern was here #### +POSTHOOK: query: select * from acid_uami order by de +POSTHOOK: type: QUERY +POSTHOOK: Input: default@acid_uami +#### A masked pattern was here #### +1 109.23 mary had a little lamb +10 119.23 and everywhere that mary went +6553 923.19 its fleece was white as snow +65530 823.19 the lamb was sure to go +PREHOOK: query: update acid_uami set de = 3.14 where de = 109.23 or de = 119.23 +PREHOOK: type: QUERY +PREHOOK: Input: default@acid_uami +PREHOOK: Output: default@acid_uami +POSTHOOK: query: update acid_uami set de = 3.14 where de = 109.23 or de = 119.23 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@acid_uami +POSTHOOK: Output: default@acid_uami +PREHOOK: query: select * from acid_uami order by de +PREHOOK: type: QUERY +PREHOOK: Input: default@acid_uami +#### A masked pattern was here #### +POSTHOOK: query: select * from acid_uami order by de +POSTHOOK: type: QUERY +POSTHOOK: Input: default@acid_uami +#### A masked pattern was here #### +1 3.14 mary had a little lamb +10 3.14 and everywhere that mary went +6553 923.19 its fleece was white as snow +65530 823.19 the lamb was sure to go +PREHOOK: query: create table acid_dot( + ctinyint TINYINT, + csmallint SMALLINT, + cint INT, + cbigint BIGINT, + cfloat FLOAT, + cdouble DOUBLE, + cstring1 STRING, + cstring2 STRING, + ctimestamp1 TIMESTAMP, + ctimestamp2 TIMESTAMP, + cboolean1 BOOLEAN, +#### A masked pattern was here #### +PREHOOK: type: CREATETABLE +#### A masked pattern was here #### +PREHOOK: Output: database:default +PREHOOK: Output: default@acid_dot +POSTHOOK: query: create table acid_dot( + ctinyint TINYINT, + csmallint SMALLINT, + cint INT, + cbigint BIGINT, + cfloat FLOAT, + cdouble DOUBLE, + cstring1 STRING, + cstring2 STRING, + ctimestamp1 TIMESTAMP, + ctimestamp2 TIMESTAMP, + cboolean1 BOOLEAN, +#### A masked pattern was here #### +POSTHOOK: type: CREATETABLE +#### A masked pattern was here #### +POSTHOOK: Output: database:default +POSTHOOK: Output: default@acid_dot +PREHOOK: query: select count(*) from acid_dot +PREHOOK: type: QUERY +PREHOOK: Input: default@acid_dot +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from acid_dot +POSTHOOK: type: QUERY +POSTHOOK: Input: default@acid_dot +#### A masked pattern was here #### +12288 +PREHOOK: query: delete from acid_dot where cint < -1070551679 +PREHOOK: type: QUERY +PREHOOK: Input: default@acid_dot +PREHOOK: Output: default@acid_dot +POSTHOOK: query: delete from acid_dot where cint < -1070551679 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@acid_dot +POSTHOOK: Output: default@acid_dot +PREHOOK: query: explain analyze delete from acid_dot where cint < -1070551679 +PREHOOK: type: QUERY +POSTHOOK: query: explain analyze delete from acid_dot where cint < -1070551679 +POSTHOOK: type: QUERY +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE) + +Stage-3 + Stats-Aggr Operator + Stage-0 + Move Operator + table:{"name:":"default.acid_dot"} + Stage-2 + Dependency Collection{} + Stage-1 + Reducer 2 + File Output Operator [FS_7] + table:{"name:":"default.acid_dot"} + Select Operator [SEL_4] (rows=31436/8 width=4) + Output:["_col0"] + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_3] + PartitionCols:UDFToInteger(_col0) + Select Operator [SEL_2] (rows=31436/8 width=4) + Output:["_col0"] + Filter Operator [FIL_8] (rows=31436/8 width=4) + predicate:(cint < -1070551679) + TableScan [TS_0] (rows=94309/12288 width=4) + default@acid_dot,acid_dot, ACID table,Tbl:COMPLETE,Col:NONE,Output:["cint"] + +PREHOOK: query: select count(*) from acid_dot +PREHOOK: type: QUERY +PREHOOK: Input: default@acid_dot +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from acid_dot +POSTHOOK: type: QUERY +POSTHOOK: Input: default@acid_dot +#### A masked pattern was here #### +12288 +PREHOOK: query: delete from acid_dot where cint < -1070551679 +PREHOOK: type: QUERY +PREHOOK: Input: default@acid_dot +PREHOOK: Output: default@acid_dot +POSTHOOK: query: delete from acid_dot where cint < -1070551679 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@acid_dot +POSTHOOK: Output: default@acid_dot +PREHOOK: query: select count(*) from acid_dot +PREHOOK: type: QUERY +PREHOOK: Input: default@acid_dot +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from acid_dot +POSTHOOK: type: QUERY +POSTHOOK: Input: default@acid_dot +#### A masked pattern was here #### +12280