Skip to content

Commit

Permalink
Version 0.2.6 release
Browse files Browse the repository at this point in the history
  • Loading branch information
xzkostyan committed May 2, 2023
1 parent 1815afc commit 18f28c6
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 2 deletions.
1 change: 0 additions & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
- 22.2.3.5
- 21.12.3.32
- 21.9.3.30
- 21.9.3.30
- 21.4.6.55
- 21.3.10.1
- 21.2.10.48
Expand Down
26 changes: 25 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

## Unreleased

## [0.2.6] - 2023-05-02
### Added
- JSON type. Solves issue [#320](https://github.com/mymarilyn/clickhouse-driver/issues/300).
- On demand client revision downgrading.
- Server-side query templating.
- Sparse data type deserialization.
- TCP keepalive.
- [NumPy] Optional dataframe column names replacing. Pull request [#361](https://github.com/mymarilyn/clickhouse-driver/pull/361) by [notsovitalik](https://github.com/notsovitalik).
- Substitution for parameters with time type. Solves issue [#359](https://github.com/mymarilyn/clickhouse-driver/issues/359). Pull request [#360](https://github.com/mymarilyn/clickhouse-driver/pull/360) by [ghazi-git](https://github.com/ghazi-git).

### Fixed
- Client construction with round_robin. Solves issue [#373](https://github.com/mymarilyn/clickhouse-driver/issues/373).
- Column state prefixes reading and writing. Solves issue [#372](https://github.com/mymarilyn/clickhouse-driver/issues/372).
- Inserts to a nullable LowCardinality columns. Solves issue [#363](https://github.com/mymarilyn/clickhouse-driver/issues/363). Pull request [#366](https://github.com/mymarilyn/clickhouse-driver/pull/366) by [Dmitry-k42](https://github.com/Dmitry-k42).
- [NumPy] Avoid unnecessary timezone conversion. Solves issue [#354](https://github.com/mymarilyn/clickhouse-driver/issues/354). Pull request [#355](https://github.com/mymarilyn/clickhouse-driver/pull/355) by [edwinwzhe](https://github.com/edwinwzhe).

### Changed
- Protocol version bumped to 54459.
- [NumPy] Speed-up reading Datetime64. Pull request [#365](https://github.com/mymarilyn/clickhouse-driver/pull/365) by [joelgibson](https://github.com/joelgibson).

### Removed
- Python 3.6 support.

## [0.2.5] - 2022-11-27
### Added
- [NumPy] More readable exception for less columns in frame. Solves issue [#320](https://github.com/mymarilyn/clickhouse-driver/issues/320).
Expand Down Expand Up @@ -420,7 +443,8 @@
- Date/DateTime types.
- String types.

[Unreleased]: https://github.com/mymarilyn/clickhouse-driver/compare/0.2.5...HEAD
[Unreleased]: https://github.com/mymarilyn/clickhouse-driver/compare/0.2.6...HEAD
[0.2.6]: https://github.com/mymarilyn/clickhouse-driver/compare/0.2.5...0.2.6
[0.2.5]: https://github.com/mymarilyn/clickhouse-driver/compare/0.2.4...0.2.5
[0.2.4]: https://github.com/mymarilyn/clickhouse-driver/compare/0.2.3...0.2.4
[0.2.3]: https://github.com/mymarilyn/clickhouse-driver/compare/0.2.2...0.2.3
Expand Down
16 changes: 16 additions & 0 deletions docs/misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,19 @@ enable it if you want cast ``None`` value into default value for current type:
>>> settings = {'input_format_null_as_default': True}
>>> client = Client('localhost', settings=settings)
Client revision downgrading
---------------------------

*New in version 0.2.6.*

For various purposes client can be downgraded with ``client_revision``
parameter.

.. code-block:: python
>>> from clickhouse_driver import Client, defines
>>>
>>> client = Client('localhost', client_revision=defines.DBMS_MIN_PROTOCOL_VERSION_WITH_INITIAL_QUERY_START_TIME)
>>> client.execute('SELECT version()')
2 changes: 2 additions & 0 deletions docs/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -481,3 +481,5 @@ SELECT type: :class:`dict`, :class:`str`.

``orjson`` and ``ujson`` implementations are supported for dumping data into
json during ``INSERT``.

Set ``allow_experimental_object_type=1`` for to enable json support.
12 changes: 12 additions & 0 deletions tests/columns/test_low_cardinality.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from datetime import date, timedelta
from decimal import Decimal
from uuid import UUID

from tests.testcase import BaseTestCase
from tests.util import require_server_version


class LowCardinalityTestCase(BaseTestCase):
Expand Down Expand Up @@ -74,6 +76,16 @@ def test_nullable_date(self):
inserted = self.client.execute(query)
self.assertEqual(inserted, data)

@require_server_version(21, 6)
def test_nullable_uuid(self):
with self.create_table('a LowCardinality(Nullable(UUID))'):
data = [(UUID('2efcead4-ff55-4db5-bdb4-6b36a308d8e0'), ), (None, )]
self.client.execute('INSERT INTO test (a) VALUES', data)

query = 'SELECT * FROM test'
inserted = self.client.execute(query)
self.assertEqual(inserted, data)

def test_float(self):
with self.create_table('a LowCardinality(Float)'):
data = [(float(x),) for x in range(300)]
Expand Down

0 comments on commit 18f28c6

Please sign in to comment.