org.apache.hadoop.hive.ql.parse.QBParseInfo.getDestForClause()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中org.apache.hadoop.hive.ql.parse.QBParseInfo.getDestForClause方法的一些代码示例,展示了QBParseInfo.getDestForClause的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QBParseInfo.getDestForClause方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.parse.QBParseInfo
类名称:QBParseInfo
方法名:getDestForClause

QBParseInfo.getDestForClause介绍

暂无

代码示例

代码示例来源:origin: apache/hive

/**
 * This method figures out if current AST is for INSERT INTO
 * @param qbp qbParseInfo
 * @param dest destination clause
 * @return true or false
 */
private boolean isInsertInto(QBParseInfo qbp, String dest) {
 // get the destination and check if it is TABLE
 if(qbp == null || dest == null ) {
  return false;
 }
 ASTNode destNode = qbp.getDestForClause(dest);
 if(destNode != null && destNode.getType() == HiveParser.TOK_TAB) {
  return true;
 }
 return false;
}

代码示例来源:origin: apache/hive

+ rowFieldTypeInfo + " to " + tableFieldTypeInfo + ".";
throw new SemanticException(ErrorMsg.TARGET_TABLE_COLUMN_MISMATCH
  .getMsg(qb.getParseInfo().getDestForClause(dest), reason));

代码示例来源:origin: apache/hive

+ " columns, but query has " + inColumnCnt + " columns.";
throw new SemanticException(ErrorMsg.TARGET_TABLE_COLUMN_MISMATCH.getMsg(
  qb.getParseInfo().getDestForClause(dest), reason));
     + rowFieldTypeInfo + " to " + tableFieldTypeInfo + ".";
   throw new SemanticException(ErrorMsg.TARGET_TABLE_COLUMN_MISMATCH
     .getMsg(qb.getParseInfo().getDestForClause(dest), reason));

代码示例来源:origin: apache/drill

+ rowFieldTypeInfo + " to " + tableFieldTypeInfo + ".";
throw new SemanticException(ErrorMsg.TARGET_TABLE_COLUMN_MISMATCH
  .getMsg(qb.getParseInfo().getDestForClause(dest), reason));

代码示例来源:origin: apache/hive

private DynamicPartitionCtx checkDynPart(QB qb, QBMetaData qbm, Table dest_tab,
                     Map<String, String> partSpec, String dest) throws SemanticException {
 List<FieldSchema> parts = dest_tab.getPartitionKeys();
 if (parts == null || parts.isEmpty()) {
  return null; // table is not partitioned
 }
 if (partSpec == null || partSpec.size() == 0) { // user did NOT specify partition
  throw new SemanticException(generateErrorMessage(qb.getParseInfo().getDestForClause(dest),
    ErrorMsg.NEED_PARTITION_ERROR.getMsg()));
 }
 DynamicPartitionCtx dpCtx = qbm.getDPCtx(dest);
 if (dpCtx == null) {
  dest_tab.validatePartColumnNames(partSpec, false);
  dpCtx = new DynamicPartitionCtx(partSpec,
    conf.getVar(HiveConf.ConfVars.DEFAULTPARTITIONNAME),
    conf.getIntVar(HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTSPERNODE));
  qbm.setDPCtx(dest, dpCtx);
 }
 if (!HiveConf.getBoolVar(conf, HiveConf.ConfVars.DYNAMICPARTITIONING)) { // allow DP
  throw new SemanticException(generateErrorMessage(qb.getParseInfo().getDestForClause(dest),
    ErrorMsg.DYNAMIC_PARTITION_DISABLED.getMsg()));
 }
 if ((dest_tab.getNumBuckets() > 0)) {
  dpCtx.setNumBuckets(dest_tab.getNumBuckets());
 }
 return dpCtx;
}

代码示例来源:origin: apache/drill

+ " columns, but query has " + inColumnCnt + " columns.";
throw new SemanticException(ErrorMsg.TARGET_TABLE_COLUMN_MISMATCH.getMsg(
  qb.getParseInfo().getDestForClause(dest), reason));
     + rowFieldTypeInfo + " to " + tableFieldTypeInfo + ".";
   throw new SemanticException(ErrorMsg.TARGET_TABLE_COLUMN_MISMATCH
     .getMsg(qb.getParseInfo().getDestForClause(dest), reason));

代码示例来源:origin: apache/hive

private void doPhase1GetColumnAliasesFromSelect(
  ASTNode selectExpr, QBParseInfo qbp, String dest) throws SemanticException {
 if (isInsertInto(qbp, dest)) {
  ASTNode tblAst = qbp.getDestForClause(dest);
  String tableName = getUnescapedName((ASTNode) tblAst.getChild(0));
  Table targetTable = null;

代码示例来源:origin: apache/drill

if (partSpec == null || partSpec.size() == 0) { // user did NOT specify partition
 throw new SemanticException(generateErrorMessage(
   qb.getParseInfo().getDestForClause(dest),
   ErrorMsg.NEED_PARTITION_ERROR.getMsg()));
   qb.getParseInfo().getDestForClause(dest),
   ErrorMsg.DYNAMIC_PARTITION_DISABLED.getMsg()));

代码示例来源:origin: apache/hive

ASTNode ast = qbp.getDestForClause(name);
switch (ast.getToken().getType()) {
case HiveParser.TOK_TAB: {

代码示例来源:origin: apache/hive

if (partSpec == null || partSpec.size() == 0) { // user did NOT specify partition
 throw new SemanticException(generateErrorMessage(
   qb.getParseInfo().getDestForClause(dest),
   ErrorMsg.NEED_PARTITION_ERROR.getMsg()));

代码示例来源:origin: apache/drill

ASTNode ast = qbp.getDestForClause(name);
switch (ast.getToken().getType()) {
 case HiveParser.TOK_TAB: {

代码示例来源:origin: org.apache.lens/lens-cube

String getInsertClause() {
 ASTNode destTree = qb.getParseInfo().getDestForClause(clauseName);
 if (destTree != null && ((ASTNode) (destTree.getChild(0))).getToken().getType() != TOK_TMP_FILE) {
  return "INSERT OVERWRITE " + HQLParser.getString(destTree) + " ";
 }
 return "";
}

代码示例来源:origin: apache/lens

String getInsertClause() {
 ASTNode destTree = qb.getParseInfo().getDestForClause(clauseName);
 if (destTree != null && ((ASTNode) (destTree.getChild(0))).getToken().getType() != TOK_TMP_FILE) {
  return "INSERT OVERWRITE " + HQLParser.getString(destTree) + " ";
 }
 return "";
}

代码示例来源:origin: apache/lens

if (qb.getParseInfo().getDestForClause(clause) != null) {
 builder.append("\n Destination:")
  .append("\n\t dest expr:").append(qb.getParseInfo().getDestForClause(clause).dump());

代码示例来源:origin: org.apache.lens/lens-cube

if (qb.getParseInfo().getDestForClause(clause) != null) {
 builder.append("\n Destination:")
  .append("\n\t dest expr:").append(qb.getParseInfo().getDestForClause(clause).dump());

代码示例来源:origin: com.facebook.presto.hive/hive-apache

+ rowFieldTypeInfo + " to " + tableFieldTypeInfo + ".";
throw new SemanticException(ErrorMsg.TARGET_TABLE_COLUMN_MISMATCH
  .getMsg(qb.getParseInfo().getDestForClause(dest), reason));

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

+ rowFieldTypeInfo + " to " + tableFieldTypeInfo + ".";
throw new SemanticException(ErrorMsg.TARGET_TABLE_COLUMN_MISMATCH
              .getMsg(qb.getParseInfo().getDestForClause(dest), reason));

代码示例来源:origin: com.facebook.presto.hive/hive-apache

+ " columns, but query has " + inColumnCnt + " columns.";
 throw new SemanticException(ErrorMsg.TARGET_TABLE_COLUMN_MISMATCH.getMsg(
   qb.getParseInfo().getDestForClause(dest), reason));
} else if (dynPart && dpCtx != null) {
     + rowFieldTypeInfo + " to " + tableFieldTypeInfo + ".";
   throw new SemanticException(ErrorMsg.TARGET_TABLE_COLUMN_MISMATCH
     .getMsg(qb.getParseInfo().getDestForClause(dest), reason));

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

+ " columns, but query has " + inColumnCnt + " columns.";
 throw new SemanticException(ErrorMsg.TARGET_TABLE_COLUMN_MISMATCH.getMsg(
   qb.getParseInfo().getDestForClause(dest), reason));
} else if (dynPart && dpCtx != null){
      + rowFieldTypeInfo + " to " + tableFieldTypeInfo + ".";
    throw new SemanticException(ErrorMsg.TARGET_TABLE_COLUMN_MISMATCH
      .getMsg(qb.getParseInfo().getDestForClause(dest), reason));

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

ASTNode ast = qbp.getDestForClause(name);
switch (ast.getToken().getType()) {
case HiveParser.TOK_TAB: {

相关文章

微信公众号

最新文章

更多

QBParseInfo类方法