Connection getConnection() throws SQLException {
    if (getDatabaseConnections().current() == null
        || getDatabaseConnections().current().getConnection() == null) {
      throw new IllegalArgumentException(loc("no-current-connection"));
    }

    return getDatabaseConnections().current().getConnection();
  }
Starts the program with redirected input. For redirected output,
setOutputStream() and setErrorStream can be used.
Exits with 0 on success, 1 on invalid arguments, and 2 on any other error

@param args
         same as main()

@param inputStream
         redirected input, or null to use standard input
beeline/src/java/org/apache/hive/beeline/BeeLine.java