return oSpec;
}
private PartitioningSpec processPTFPartitionSpec(ASTNode pSpecNode)
{
PartitioningSpec partitioning = new PartitioningSpec();
ASTNode firstChild = (ASTNode) pSpecNode.getChild(0);
int type = firstChild.getType();
int exprCnt;
if ( type == HiveParser.TOK_DISTRIBUTEBY || type == HiveParser.TOK_CLUSTERBY )
{
PartitionSpec pSpec = processPartitionSpec(firstChild);
partitioning.setPartSpec(pSpec);
ASTNode sortNode = pSpecNode.getChildCount() > 1 ? (ASTNode) pSpecNode.getChild(1) : null;
if ( sortNode != null )
{
OrderSpec oSpec = processOrderSpec(sortNode);
partitioning.setOrderSpec(oSpec);
}
}
else if ( type == HiveParser.TOK_SORTBY || type == HiveParser.TOK_ORDERBY ) {
ASTNode sortNode = firstChild;
OrderSpec oSpec = processOrderSpec(sortNode);
partitioning.setOrderSpec(oSpec);
}
return partitioning;
}