String loc(String res, int param) {
    try {
      return MessageFormat.format(
          new ChoiceFormat(resourceBundle.getString(res)).format(param),
          new Object[] {Integer.valueOf(param)});
    } catch (Exception e) {
      return res + ": " + param;
    }
  }
A console SQL shell with command completion.
<p>
TODO:
<ul>
<li>User-friendly connection prompts</li>
<li>Page results</li>
<li>Handle binary data (blob fields)</li>
<li>Implement command aliases</li>
<li>Stored procedure execution</li>
<li>Binding parameters to prepared statements</li>
<li>Scripting language</li>
<li>XA transactions</li>
</ul>
beeline/src/java/org/apache/hive/beeline/BeeLine.java