Search in sources :

Example 6 with OrderDef

use of org.apache.hadoop.hive.ql.plan.ptf.OrderDef in project hive by apache.

the class PTFTranslator method translatePartitioning.

private void translatePartitioning(PartitionedTableFunctionDef def, PartitionedTableFunctionSpec spec) throws SemanticException {
    applyConstantPartition(spec);
    if (spec.getPartition() == null) {
        return;
    }
    PartitionDef partDef = translate(def.getRawInputShape(), spec.getPartition());
    OrderDef orderDef = translate(def.getRawInputShape(), spec.getOrder(), partDef);
    def.setPartition(partDef);
    def.setOrder(orderDef);
}
Also used : PartitionDef(org.apache.hadoop.hive.ql.plan.ptf.PartitionDef) OrderDef(org.apache.hadoop.hive.ql.plan.ptf.OrderDef)

Aggregations

OrderDef (org.apache.hadoop.hive.ql.plan.ptf.OrderDef)6 OrderExpressionDef (org.apache.hadoop.hive.ql.plan.ptf.OrderExpressionDef)3 OrderExpression (org.apache.hadoop.hive.ql.parse.PTFInvocationSpec.OrderExpression)2 PartitionDef (org.apache.hadoop.hive.ql.plan.ptf.PartitionDef)2 ArrayList (java.util.ArrayList)1 HiveException (org.apache.hadoop.hive.ql.metadata.HiveException)1 PTFQueryInputSpec (org.apache.hadoop.hive.ql.parse.PTFInvocationSpec.PTFQueryInputSpec)1 PartitioningSpec (org.apache.hadoop.hive.ql.parse.PTFInvocationSpec.PartitioningSpec)1 WindowExpressionSpec (org.apache.hadoop.hive.ql.parse.WindowingSpec.WindowExpressionSpec)1 WindowFunctionSpec (org.apache.hadoop.hive.ql.parse.WindowingSpec.WindowFunctionSpec)1 PTFDesc (org.apache.hadoop.hive.ql.plan.PTFDesc)1 PTFExpressionDef (org.apache.hadoop.hive.ql.plan.ptf.PTFExpressionDef)1 ShapeDetails (org.apache.hadoop.hive.ql.plan.ptf.ShapeDetails)1 WindowFunctionDef (org.apache.hadoop.hive.ql.plan.ptf.WindowFunctionDef)1 WindowTableFunctionDef (org.apache.hadoop.hive.ql.plan.ptf.WindowTableFunctionDef)1 TableFunctionEvaluator (org.apache.hadoop.hive.ql.udf.ptf.TableFunctionEvaluator)1 WindowingTableFunctionResolver (org.apache.hadoop.hive.ql.udf.ptf.WindowingTableFunction.WindowingTableFunctionResolver)1 ListObjectInspector (org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector)1 ObjectInspector (org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector)1 PrimitiveObjectInspector (org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector)1