private void replaceDefaultKeyword(ASTNode valueArrClause, Table targetTable, List<String> targetSchema) throws SemanticException {
    List<String> defaultConstraints = null;
    for (int i = 1; i < valueArrClause.getChildCount(); i++) {
      ASTNode valueClause = (ASTNode) valueArrClause.getChild(i);
      //skip first child since it is struct
      for (int j = 1; j < valueClause.getChildCount(); j++) {
        if (valueClause.getChild(j).getType() == HiveParser.TOK_TABLE_OR_COL
                && valueClause.getChild(j).getChild(0).getType() == HiveParser.TOK_DEFAULT_VALUE) {
          if (defaultConstraints == null) {
            defaultConstraints = getDefaultConstraints(targetTable, targetSchema);
          }
          ASTNode newNode = getNodeReplacementforDefault(defaultConstraints.get(j - 1));
          // replace the node in place
          valueClause.replaceChildren(j, j, newNode);
          LOG.debug("DEFAULT keyword replacement - Inserted {} for table: {}", newNode.getText(),
                  targetTable.getTableName());
        }
      }
    }
  }
This method replaces DEFAULT AST node with DEFAULT expression
@param valueArrClause This is AST for value clause
@param targetTable
@param targetSchema this is target schema/column schema if specified in query
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java