本文整理汇总了Java中org.apache.hadoop.hive.ql.parse.HiveParser.TOK_LEFTSEMIJOIN属性的典型用法代码示例。如果您正苦于以下问题:Java HiveParser.TOK_LEFTSEMIJOIN属性的具体用法?Java HiveParser.TOK_LEFTSEMIJOIN怎么用?Java HiveParser.TOK_LEFTSEMIJOIN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.hadoop.hive.ql.parse.HiveParser
的用法示例。
在下文中一共展示了HiveParser.TOK_LEFTSEMIJOIN属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generate
@Override
public boolean generate(ASTNode hiveRoot, CommonTree sqlRoot, ASTNode currentHiveNode,
CommonTree currentSqlNode, TranslateContext context) throws SqlXlateException {
ASTNode join;
if (currentSqlNode.getChild(0).getType() == PantheraParser_PLSQLParser.FULL_VK) {
join = super.newHiveASTNode(HiveParser.TOK_FULLOUTERJOIN, "TOK_FULLOUTERJOIN");
} else if (currentSqlNode.getChild(0).getType() == PantheraParser_PLSQLParser.LEFT_VK) {
join = super.newHiveASTNode(HiveParser.TOK_LEFTOUTERJOIN, "TOK_LEFTOUTERJOIN");
} else if (currentSqlNode.getChild(0).getType() == PantheraParser_PLSQLParser.RIGHT_VK) {
join = super.newHiveASTNode(HiveParser.TOK_RIGHTOUTERJOIN, "TOK_RIGHTOUTERJOIN");
} else if (currentSqlNode.getChild(0).getType() == PantheraParser_PLSQLParser.CROSS_VK) {
join = super.newHiveASTNode(HiveParser.TOK_CROSSJOIN, "TOK_CROSSJOIN");
} else if (currentSqlNode.getChild(0).getType() == PantheraExpParser.LEFTSEMI_VK) {
join = super.newHiveASTNode(HiveParser.TOK_LEFTSEMIJOIN, "TOK_LEFTSEMIJOIN");
} else {
join = super.newHiveASTNode(HiveParser.TOK_JOIN, "TOK_JOIN");
}
ASTNode firstTableRefElement = (ASTNode) currentHiveNode.deleteChild(0);
super.attachHiveNode(hiveRoot, join, firstTableRefElement);
super.attachHiveNode(hiveRoot, currentHiveNode, join);
currentHiveNode = join;
return super.generateChildren(hiveRoot, sqlRoot, currentHiveNode, currentSqlNode, context);
}
示例2: isJoinOp
public static boolean isJoinOp(ASTNode op) {
if (op.getType() == HiveParser.TOK_JOIN || op.getType() == HiveParser.TOK_CROSSJOIN
|| op.getType() == HiveParser.TOK_LEFTOUTERJOIN
|| op.getType() == HiveParser.TOK_RIGHTOUTERJOIN
|| op.getType() == HiveParser.TOK_FULLOUTERJOIN
|| op.getType() == HiveParser.TOK_LEFTSEMIJOIN) {
return true;
} else {
return false;
}
}