Skip to content

Commit

Permalink
Version bumped to 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xzkostyan committed Dec 14, 2020
1 parent 39ce551 commit 96b7ba4
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 9 deletions.
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
# Changelog

## [0.2.0] - 2020-12-14
### Added
- NumPy reading/writing for columns: Float32/64, [U]Int8/16/32/64, Date/DateTime(‘timezone’)/DateTime64(‘timezone’), String/FixedString(N), LowCardinality(T). Merge [Arturus's](https://github.com/Arturus/clickhouse-driver) fork.
- pandas DataFrame reading/writing.
- Ability to mark all settings as important to fail on unknown settings on sever side.
- SSL SNI support. Solves issue [#172](https://github.com/mymarilyn/clickhouse-driver/issues/172).
- Wheels for Python 3.9 and PyPy.
- Remember last successful host on connection. Solves issue [#168](https://github.com/mymarilyn/clickhouse-driver/issues/168).

### Fixed
- Server logs displaying on INSERT.
- Make exceptions picklable. Pull request [#169](https://github.com/mymarilyn/clickhouse-driver/pull/169) by [azat](https://github.com/azat).
- Enum type deserializing when it wrapped in SimpleAggregateFunction. Pull request [#170](https://github.com/mymarilyn/clickhouse-driver/pull/170) by [flyAwayGG](https://github.com/flyAwayGG).
- Pin major `tzlocal` version. Solves issue [#166](https://github.com/mymarilyn/clickhouse-driver/issues/166).

### Changed
- String and DateTime columns writing optimization.
- Array columns reading/writing optimization.
- Chunking optimization for large lists/tuples.
- Protocol version bumped to 54441.

## [0.1.5] - 2020-09-19
### Added
- Do not require settings declaration if server support setting-as-string. Pull request [#142](https://github.com/mymarilyn/clickhouse-driver/pull/142) by [azat](https://github.com/azat).
- `host_name` in logs. Pull request [#144](https://github.com/mymarilyn/clickhouse-driver/pull/144) by [azat](https://github.com/azat).
- Cursor attribute `columns_with_types` to DB API. Issue [#149](https://github.com/mymarilyn/clickhouse-driver/issues/149).
- Cursor method `set_query_id` to DB API. Issue [#152](https://github.com/mymarilyn/clickhouse-driver/issues/152).


### Fixed
- Connection error messages formatting.
- `Client.from_url` credentials unquoting. Issue [#146](https://github.com/mymarilyn/clickhouse-driver/issues/146).
Expand Down Expand Up @@ -287,7 +307,8 @@
- Date/DateTime types.
- String types.

[Unreleased]: https://github.com/mymarilyn/clickhouse-driver/compare/0.1.5...HEAD
[Unreleased]: https://github.com/mymarilyn/clickhouse-driver/compare/0.2.0...HEAD
[0.2.0]: https://github.com/mymarilyn/clickhouse-driver/compare/0.1.5...0.2.0
[0.1.5]: https://github.com/mymarilyn/clickhouse-driver/compare/0.1.4...0.1.5
[0.1.4]: https://github.com/mymarilyn/clickhouse-driver/compare/0.1.3...0.1.4
[0.1.3]: https://github.com/mymarilyn/clickhouse-driver/compare/0.1.2...0.1.3
Expand Down
2 changes: 1 addition & 1 deletion clickhouse_driver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from .dbapi import connect


VERSION = (0, 1, 6)
VERSION = (0, 2, 0)
__version__ = '.'.join(str(x) for x in VERSION)

__all__ = ['Client', 'connect']
6 changes: 3 additions & 3 deletions clickhouse_driver/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Client(object):
* strings_encoding -- specifies string encoding. UTF-8 by default.
* use_numpy -- Use numpy for columns reading.
* use_numpy -- Use numpy for columns reading. New in version *0.2.0*.
"""

Expand Down Expand Up @@ -350,7 +350,7 @@ def query_dataframe(
self, query, params=None, external_tables=None, query_id=None,
settings=None):
"""
*New in version 0.0.16.*
*New in version 0.2.0.*
Queries DataFrame with specified SELECT query.
Expand Down Expand Up @@ -385,7 +385,7 @@ def insert_dataframe(
self, query, dataframe, transpose=True, external_tables=None,
query_id=None, settings=None):
"""
*New in version 0.0.16.*
*New in version 0.2.0.*
Inserts pandas DataFrame with specified query.
Expand Down
22 changes: 19 additions & 3 deletions docs/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,13 @@ unsupported types.
Direct loading into NumPy arrays increases performance and lowers memory
requirements on large amounts of rows.

Direct loading into pandas dataframe is also supported by using
Direct loading into pandas DataFrame is also supported by using
`query_dataframe`:

.. code-block:: python
>>> client = Client('localhost', settings={'use_numpy': True}):
>>> client.query_dataframe(' FROM table')
>>> client = Client('localhost', settings={'use_numpy': True})
>>> client.query_dataframe('
... 'SELECT number AS x, (number + 100) AS y '
... 'FROM system.numbers LIMIT 10000'
... )
Expand All @@ -407,3 +407,19 @@ Direct loading into pandas dataframe is also supported by using
9999 9999 10099
[10000 rows x 2 columns]
Writing pandas DataFrame is also supported with `insert_dataframe`:

.. code-block:: python
>>> client = Client('localhost', settings={'use_numpy': True})
>>> client.execute(
... 'CREATE TABLE test (x Int64, y Int64) Engine = Memory'
... )
>>> []
>>> df = client.query_dataframe(
... 'SELECT number AS x, (number + 100) AS y '
... 'FROM system.numbers LIMIT 10000'
... )
>>> client.insert_dataframe('INSERT INTO test VALUES', df)
>>> 10000
3 changes: 3 additions & 0 deletions docs/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ INSERT types: :class:`~datetime.date`, :class:`~datetime.datetime`.

SELECT type: :class:`~datetime.date`.

Only values after the beginning of the epoch (1970-01-01) are supported.

DateTime('timezone')/DateTime64('timezone')
-------------------------------------------
Expand All @@ -50,6 +51,8 @@ You can cast DateTime column to integers if you are facing performance issues wh

Due to Python's current limitations minimal DateTime64 resolution is one microsecond.

Only values after the beginning of the epoch (1970-01-01) are supported.


String/FixedString(N)
---------------------
Expand Down

0 comments on commit 96b7ba4

Please sign in to comment.