.. _version_2.2.0:

=============
Version 2.2.0
=============

Released on 2017/09/19.

.. NOTE::

    If you are upgrading a cluster, you must be running CrateDB
    :ref:`version_1.1.3` or higher before you upgrade to 2.2.0.

    You cannot perform a `rolling upgrade`_ to this version. Any upgrade to this
    version will require a `full restart upgrade`_.

.. WARNING::

    Before upgrading, you should `back up your data`_.

.. _rolling upgrade: https://crate.io/docs/crate/howtos/en/latest/admin/rolling-upgrade.html
.. _full restart upgrade: https://crate.io/docs/crate/howtos/en/latest/admin/full-restart-upgrade.html
.. _back up your data: https://crate.io/docs/crate/reference/en/latest/admin/snapshots.html

.. rubric:: Table of contents

.. contents::
   :local:

Changelog
=========

Breaking Changes
----------------

- ``GROUP BY`` now executes against the real columns and fallbacks to
  substituting possible aliases in the case that the columns do not exist.

  This will cause statements that used alias values that shadowed multiple
  columns with the same name to fail (e.g. alias ``name`` in a join statement
  where multiple tables have the real column ``name``).

  Statements with aliases that shadowed a real column and also retrieve that
  real column will no longer fail as the real column will be used in the
  ``GROUP BY`` clause (this will not be ambiguous anymore).

- Change semantics of ``IN`` :ref:`operator <gloss-operator>` to behave
  like ``= ANY``.

  The argument list for ``IN`` now has to be comprised of the same type. For
  example, this is now an illegal ``IN`` query because the list mixes integer
  and double type::

    SELECT * FROM t1 WHERE id IN (1, 1.2, 2)

  The above would get translated into the following and throw an error::

    SELECT * FROM t1 WHERE id = ANY([1, 1.2, 3])

Changes
-------

- Added the shards plugin for the Enterprise Edition in the Admin UI.

  The shards plugin is a visualization that displays information about shards
  by table, partition and node.

- Added new tab in Enterprise Edition of the Admin UI to display users and
  their privileges.

- General Admin UI improvements.

- Updated Crash to 0.22.1, which includes the following changes:

  - Added a status toolbar that prints the current session info.

  - Start autocompletion for non-command keys at the third character.

- Allow IPv6 addresses in IP column type.

- Upgraded Elasticsearch to 5.5.2.

- Added node cluster check for cluster-name folder in data path directory.

- Introduce support for single column :ref:`subselects <gloss-subquery>` in
  ``ANY`` and ``IN``, e.g.::

      SELECT * FROM t1 WHERE id = ANY(SELECT id FROM t2)
      SELECT * FROM t1 WHERE id IN (SELECT id FROM t2)

- Improved resiliency of the table rename operation.

- Relaxed column naming restrictions.

- Improved resiliency of drop, close and open table operations.

- Added empty tables ``KEY_COLUMN_USAGE`` and ``REFERENTIAL_CONSTRAINTS`` to
  ``INFORMATION_SCHEMA`` to be more compliant with the SQL99 standard.
