org.apache.hadoop.hive.ql.optimizer.lineage
Class LineageCtx

java.lang.Object
  extended by org.apache.hadoop.hive.ql.optimizer.lineage.LineageCtx
All Implemented Interfaces:
NodeProcessorCtx

public class LineageCtx
extends Object
implements NodeProcessorCtx

This class contains the lineage context that is passed while walking the operator tree in Lineage. The context contains the LineageInfo structure that is passed to the pre-execution hooks.


Nested Class Summary
static class LineageCtx.Index
           
 
Constructor Summary
LineageCtx(ParseContext pctx)
          Constructor.
 
Method Summary
 LineageCtx.Index getIndex()
          Gets the dependency index.
static LineageInfo.DependencyType getNewDependencyType(LineageInfo.DependencyType old_type, LineageInfo.DependencyType curr_type)
          Gets the new dependency type by comparing the old dependency type and the current dependency type.
 ParseContext getParseCtx()
          Gets the parse context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineageCtx

public LineageCtx(ParseContext pctx)
Constructor.

Parameters:
pctx - The parse context that is used to get table metadata information.
Method Detail

getParseCtx

public ParseContext getParseCtx()
Gets the parse context.

Returns:
ParseContext

getIndex

public LineageCtx.Index getIndex()
Gets the dependency index.

Returns:
Index

getNewDependencyType

public static LineageInfo.DependencyType getNewDependencyType(LineageInfo.DependencyType old_type,
                                                              LineageInfo.DependencyType curr_type)
Gets the new dependency type by comparing the old dependency type and the current dependency type. The current dependency type is the dependency imposed by the current expression. Typically the dependency type is computed using the following rules: SCRIPT - In case anywhere in the lineage tree there was a script operator, otherwise EXPRESSION - In case anywhere in the lineage tree a union, udf, udaf or udtf was done, otherwise SIMPLE - This captures direct column copies.

Parameters:
old_type - The old dependency type.
curr_type - The current operators dependency type.
Returns:
the dependency type


Copyright © 2014 The Apache Software Foundation. All rights reserved.