@Override
  public DBColumnInfo getColumnInfo(String tableName, String columnName) {
    try {
      String sqlQuery = String.format("SELECT %s FROM %s WHERE 1=2", columnName, convertObjectName(tableName));

      try (Statement statement = getConnection().createStatement();
           ResultSet rs = statement.executeQuery(sqlQuery)) {

        ResultSetMetaData rsmd = rs.getMetaData();

        return new DBColumnInfo(
          rsmd.getColumnName(1),
          fromSqlTypeToClass(rsmd.getColumnType(1)),
          rsmd.getColumnDisplaySize(1),
          null,
          rsmd.isNullable(1) == ResultSetMetaData.columnNullable
        );
      }
    } catch (SQLException e) {
      return null;
    }
  }
Obtain column metadata information by given table and column name.

Not able to return column default value.

@param tableName  Name of the table
@param columnName Name of the column
@return Column information or null, if no column found
@throws SQLException
ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java