Search in sources :

Example 1 with BucketJoinProcCtx

use of org.apache.hadoop.hive.ql.optimizer.BucketJoinProcCtx in project hive by apache.

the class SparkJoinHintOptimizer method process.

@Override
public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException {
    OptimizeSparkProcContext context = (OptimizeSparkProcContext) procCtx;
    HiveConf hiveConf = context.getParseContext().getConf();
    // Convert from mapjoin to bucket map join if enabled.
    if (hiveConf.getBoolVar(HiveConf.ConfVars.HIVEOPTBUCKETMAPJOIN) || hiveConf.getBoolVar(HiveConf.ConfVars.HIVEOPTSORTMERGEBUCKETMAPJOIN)) {
        BucketJoinProcCtx bjProcCtx = new BucketJoinProcCtx(hiveConf);
        bucketMapJoinOptimizer.process(nd, stack, bjProcCtx, nodeOutputs);
    }
    // Convert from bucket map join to sort merge bucket map join if enabled.
    if (hiveConf.getBoolVar(HiveConf.ConfVars.HIVEOPTSORTMERGEBUCKETMAPJOIN)) {
        SortBucketJoinProcCtx smbJoinCtx = new SortBucketJoinProcCtx(hiveConf);
        smbMapJoinOptimizer.process(nd, stack, smbJoinCtx, nodeOutputs);
    }
    return null;
}
Also used : SortBucketJoinProcCtx(org.apache.hadoop.hive.ql.optimizer.SortBucketJoinProcCtx) BucketJoinProcCtx(org.apache.hadoop.hive.ql.optimizer.BucketJoinProcCtx) SortBucketJoinProcCtx(org.apache.hadoop.hive.ql.optimizer.SortBucketJoinProcCtx) OptimizeSparkProcContext(org.apache.hadoop.hive.ql.parse.spark.OptimizeSparkProcContext) HiveConf(org.apache.hadoop.hive.conf.HiveConf)

Aggregations

HiveConf (org.apache.hadoop.hive.conf.HiveConf)1 BucketJoinProcCtx (org.apache.hadoop.hive.ql.optimizer.BucketJoinProcCtx)1 SortBucketJoinProcCtx (org.apache.hadoop.hive.ql.optimizer.SortBucketJoinProcCtx)1 OptimizeSparkProcContext (org.apache.hadoop.hive.ql.parse.spark.OptimizeSparkProcContext)1