private void replaceDefaultKeywordForUpdate(ASTNode selectExprs, Table targetTable) throws SemanticException {
    List<String> defaultConstraints = null;
    for (int i = 0; i < selectExprs.getChildCount(); i++) {
      ASTNode selectExpr = (ASTNode) selectExprs.getChild(i);
      if (selectExpr.getChildCount() == 1 && selectExpr.getChild(0).getType() == HiveParser.TOK_TABLE_OR_COL) {
        //first child should be rowid
        if (i != 0 || selectExpr.getChild(0).getChild(0).getText().equals("ROW__ID")) {
          if (selectExpr.getChild(0).getChild(0).getType() == HiveParser.TOK_DEFAULT_VALUE) {
            if (defaultConstraints == null) {
              defaultConstraints = getDefaultConstraints(targetTable, null);
            }
            ASTNode newNode = getNodeReplacementforDefault(defaultConstraints.get(i - 1));
            // replace the node in place
            selectExpr.replaceChildren(0, 0, newNode);
            if (LOG.isDebugEnabled()) {
              LOG.debug("DEFAULT keyword replacement - Inserted {} for table: {}", newNode.getText(),
                  targetTable.getTableName());
            }
          }
        }
      }
    }
  }
This method replaces ASTNode corresponding to DEFAULT keyword with either DEFAULT constraint
 expression if exists or NULL otherwise
@param selectExprs
@param targetTable
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java