public class ColumnStatsAutoGatherContext extends Object
Modifier and Type | Field and Description |
---|---|
BaseSemanticAnalyzer.AnalyzeRewriteContext |
analyzeRewrite |
Constructor and Description |
---|
ColumnStatsAutoGatherContext(SemanticAnalyzer sa,
HiveConf conf,
Operator<? extends OperatorDesc> op,
Table tbl,
Map<String,String> partSpec,
boolean isInsertInto,
Context ctx) |
Modifier and Type | Method and Description |
---|---|
static boolean |
canRunAutogatherStats(Operator curr) |
BaseSemanticAnalyzer.AnalyzeRewriteContext |
getAnalyzeRewrite() |
String |
getCompleteName() |
List<LoadFileDesc> |
getLoadFileWork() |
void |
insertAnalyzePipeline()
Generate the statement of analyze table [tablename] compute statistics for columns
In non-partitioned table case, it will generate TS-SEL-GBY-RS-GBY-SEL-FS operator
In static-partitioned table case, it will generate TS-FIL(partitionKey)-SEL-GBY(partitionKey)-RS-GBY-SEL-FS operator
In dynamic-partitioned table case, it will generate TS-SEL-GBY(partitionKey)-RS-GBY-SEL-FS operator
However, we do not need to specify the partition-spec because (1) the data is going to be inserted to that specific partition
(2) we can compose the static/dynamic partition using a select operator in replaceSelectOperatorProcess.
|
void |
insertTableValuesAnalyzePipeline()
Generate the statement of SELECT compute_stats(col1) compute_stats(col2),...,
similar to the one generated from ANALYZE TABLE t1 COMPUTE STATISTICS FOR COLUMNS,
but t1 is replaced by a TABLE(VALUES(cast(null as int),cast(null as string))) AS t1(col1,col2).
|
boolean |
isInsertInto() |
void |
setAnalyzeRewrite(BaseSemanticAnalyzer.AnalyzeRewriteContext analyzeRewrite) |
public BaseSemanticAnalyzer.AnalyzeRewriteContext analyzeRewrite
public ColumnStatsAutoGatherContext(SemanticAnalyzer sa, HiveConf conf, Operator<? extends OperatorDesc> op, Table tbl, Map<String,String> partSpec, boolean isInsertInto, Context ctx) throws SemanticException
SemanticException
public List<LoadFileDesc> getLoadFileWork()
public BaseSemanticAnalyzer.AnalyzeRewriteContext getAnalyzeRewrite()
public void setAnalyzeRewrite(BaseSemanticAnalyzer.AnalyzeRewriteContext analyzeRewrite)
public void insertAnalyzePipeline() throws SemanticException
SemanticException
public void insertTableValuesAnalyzePipeline() throws SemanticException
SemanticException
public String getCompleteName()
public boolean isInsertInto()
public static boolean canRunAutogatherStats(Operator curr)
Copyright © 2022 The Apache Software Foundation. All rights reserved.