Skip to content
This repository was archived by the owner on Jun 4, 2026. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
c077bed
IMPALA-12149: Adds additional checks to ensure connection arguments (…
jasonmfehr Jun 7, 2023
b8272c6
Issue #518: Fix Cookie handling with Python 3 [from IMPALA-12294]
bartash Aug 1, 2023
e851d81
Add get_view_name support to SQLAlchemy (#511)
huw0 Oct 24, 2023
76f0ba3
Prepare release 0.19.0 (#524)
wzhou-code Nov 22, 2023
fa858a7
Add Knox cookies in default cookies list (#525)
cravani Jan 3, 2024
8860245
Add comment to help Hive users quick start (#521)
NicolasPA Jan 10, 2024
a3d80ef
Support CHAR type in SQLAlchemy (#516)
huw0 Jan 10, 2024
97820e2
Update ImpalaService.thrift (#526)
csringhofer Jan 23, 2024
e4f7bb2
Fix test_sqlalchemy with sqlalchemy 2 (#527)
csringhofer Jan 30, 2024
b941bfc
Support Cursor.rowcount and close finished queries (#528)
csringhofer Jan 30, 2024
b98ffef
Update versioneer to 0.29 (needed for Python 3.12) (#532)
csringhofer Feb 1, 2024
bf538aa
Issue #529: Fix https connection with Python 3.12 (#531)
csringhofer Feb 1, 2024
bcaa1c0
Revert versioneer bump (#533)
csringhofer Feb 2, 2024
747e1da
Remove incorrectly added tox.ini in last commit (#534)
csringhofer Feb 5, 2024
abf89cf
Prepare release 0.20a1 (#537)
csringhofer Mar 13, 2024
bf1f94c
Turn these regex strings into raw strings (#535)
hackermandh Mar 13, 2024
95012ef
Log "Closing operation" at debug level (#539)
csringhofer Apr 15, 2024
d6582ad
Fix SQLAlchemy support for Impala on Python 3.10 (#538)
jvprosser Apr 15, 2024
acbd481
Add tox.ini to help testing with multiple python versions (#530)
csringhofer Apr 16, 2024
7e637df
Logged fake password instead of actual password to avoid leaking sens…
WWakker Aug 7, 2024
9a853c1
Support wildcard http_cookie_names (#509) (#542)
MikaelSmith Aug 7, 2024
a94ef44
Avoid retrying non-idempotent RPCs in binary connections (#549) (#550)
csringhofer Aug 29, 2024
6e2ffa8
Allow skipping utf8 converison in Python3 (#548)
mszjat Aug 29, 2024
ab1398a
Subtract RPC time from sleep in _wait_to_finish (#551)
csringhofer Sep 6, 2024
ea5db6c
Prepare release 0.20a2 (#552)
csringhofer Sep 6, 2024
3955213
Always set ImpalaHttpClient.__preserve_all_cookies (#553)
csringhofer Sep 7, 2024
e4c7616
Prepare release 0.20a3 (#554)
csringhofer Sep 7, 2024
ee959a1
Prepare release 0.20.0 (#559)
csringhofer Jan 29, 2025
f40a042
Restrict bitarray varsion to 2.* (#560)
csringhofer Jan 29, 2025
d36e71e
Allow users to add custom http headers when using hs2-http (#557) (#558)
bartash Jan 29, 2025
377708f
Prepare release 0.21a1 (#561)
csringhofer Jan 30, 2025
2af879f
Bugfix/retry configuration not passed to rpc operations (#564)
paulmayer Feb 5, 2025
a35685a
Add "requests" as test dependency in Python 2.7 (#565)
csringhofer Feb 5, 2025
5041c3a
Fix proxy-authentication headers for Python 3.* and long basic creden…
paulmayer Feb 7, 2025
eb331fd
Make ImpalaConnectionTests.test_retry_dml more reliable (#566)
csringhofer Feb 18, 2025
30f979c
df.to_sql() support for impala + SQLAlchemy: has_table() got an unexp…
jatin-rathour Feb 23, 2025
f9e6c7c
Fix IPv6 address handling in hs2-http2 (#570) (#571)
csringhofer Mar 6, 2025
fc0c85f
Remove versioneer and add Python3.12/3.13 testing (#572)
csringhofer Mar 6, 2025
69fb3a1
Prepare release 0.21a2 (#573)
csringhofer Mar 6, 2025
550fa21
Update Impala Thrift definitions. (#575)
rizaon Mar 11, 2025
f01207b
Prepare release v0.21a3 (#576)
csringhofer Mar 11, 2025
a3e9e7f
Update versions to v0.21a3 (#577)
csringhofer Mar 11, 2025
c8bd026
Prepare release 0.21.0 (#579)
csringhofer Mar 13, 2025
d7b6443
Set supports_statement_cache=False in sqlalchemy (#503) (#582)
csringhofer Jun 25, 2025
74b8ac7
Unpin bitarray dependency on Python 3 (#585) (#588)
csringhofer Jun 26, 2025
4b975de
Add import_dbapi() class method to ImpalaDialect (#580)
csringhofer Jun 26, 2025
cd10ca9
Update build_summary_table function (#578)
rizaon Jun 26, 2025
70518ff
Fallback to winkerberos if kerberos is not available (#587)
csringhofer Jun 26, 2025
95434ee
Change cur fixture to function level (#589)
csringhofer Jun 26, 2025
c14ece5
Prepare release 0.22a1 (#590)
csringhofer Jun 27, 2025
c3ffb79
Fix py2.7 validation during build creation (#591)
csringhofer Jun 30, 2025
ac08966
Prepare release 0.22.0 (#593)
csringhofer Jul 31, 2025
a0da5bf
Add HTTP server verification (#362) (#598)
csringhofer May 5, 2026
833f2d7
Fix test broken on Python 2.7 added in last commit (#599)
csringhofer May 5, 2026
d2c353a
Prepare release 0.23a1 (#600)
csringhofer May 5, 2026
be5ab1a
Allow verifying server using default CA certificates (#601)
csringhofer May 13, 2026
939c421
resilient columnar batch handling in hiveserver2.py (#597)
shatteringlass May 13, 2026
3b07587
IMPALA-14653: Handle STILL_EXECUTING_STATUS (#595)
MikaelSmith May 13, 2026
2423324
Prepare release 0.23a2 (#602)
csringhofer May 13, 2026
85343d3
Prepare release 0.23.0 (#605)
csringhofer May 29, 2026
1cacedf
Remove Python 2.7 and 3.7 support (#469) (#606)
csringhofer May 29, 2026
ee76562
Switch to pyproject.toml (#607)
csringhofer Jun 2, 2026
68d078d
More Python 2 cleanup (#608)
csringhofer Jun 2, 2026
f298f4c
Add direct dependency to pure-sasl (#471) (#603)
csringhofer Jun 2, 2026
dbceaf8
Bump Thrift to 0.23 + fix verify_cert with hs2 (#604) (#609)
csringhofer Jun 2, 2026
f54032a
Fix some warnings during tests (#610)
csringhofer Jun 3, 2026
a332544
Prepare release 0.24a1 (#611)
csringhofer Jun 3, 2026
463554f
Set version to 0.24a1 (#612)
csringhofer Jun 3, 2026
424022f
Remove old build system (#613)
csringhofer Jun 8, 2026
8037c18
Add script to run all tests (#614)
csringhofer Jun 8, 2026
abc9ebb
Prepare release 0.24.0 (#617)
csringhofer Jun 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
Changelog
=========

0.20a1
------
* **Improvements**
- Add Knox cookies in default cookies list (#525)
- Support CHAR type in SQLAlchemy (#516)
- Support Cursor.rowcount and close finished queries (#528)
Note that this is a potentially breaking change. See the PR
for details about the side-effects.
The old behavior can be restored by setting close_finished_queries=False
when creating a Cursor.
Also note that Cursor.rowcount only works with Impala server - with
Hive it will always return -1.

* **Bug Fixes**
- Fix https connection with Python 3.12 (#531)
Note that Python 3.12 support is not complete yet.
A known issue is that installing with setuptools fails with Python 3.12.

0.19.0
------
* **Improvements**
- Add get_view_name support to SQLAlchemy (#511)
SHOW VIEWS is expected to be supported in Impala soon.
- Add additional checks to ensure connection arguments (#515)

* **Bug Fixes**
- Fix Cookie handling with Python 3 (#518)
- Fix numeric parameter substitution bug (#508)

0.18.0
------
* **Improvements**
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ py.test --connect impala

Leave out the `--connect` option to skip tests for DB API compliance.

To test impyla with different Python versions [tox] can be used.
The commands below will run all impyla tests with all supported and
installed Python versions:
```bash
cd path/to/impyla
tox
```
To filter environments / tests use `-e` and [pytest] arguments after `--`:
```bash
tox -e py310 -- -ktest_utf8_strings
```

### Usage

Expand All @@ -111,7 +122,7 @@ Impyla implements the [Python DB API v2.0 (PEP 249)][pep249] database interface

```python
from impala.dbapi import connect
conn = connect(host='my.host.com', port=21050)
conn = connect(host='my.host.com', port=21050) # auth_mechanism='PLAIN' for unsecured Hive connection, see function doc
cursor = conn.cursor()
cursor.execute('SELECT * FROM mytable LIMIT 100')
print cursor.description # prints the result set's schema
Expand Down Expand Up @@ -160,6 +171,7 @@ df = as_pandas(cur)
[pytest]: http://pytest.org/latest/
[sqlalchemy]: http://www.sqlalchemy.org/
[ibis]: http://www.ibis-project.org/
[tox]: http://tox.wiki/

# How do I contribute code?
You need to first sign and return an
Expand Down
10 changes: 8 additions & 2 deletions impala/_thrift_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,15 @@ def open(self):
self.__http = http_client.HTTPConnection(self.host, self.port,
timeout=self.__timeout)
elif self.scheme == 'https':
# (#529) From python 3.12 http_client.HTTPSConnection no longer
# expects certfile and key_file. Certfile is included in context
# while key_file can be used in SSLContext.load_verify_locations.
# As Impyla doesn't support server authentication (#362) both
# certfile and key_file are expected to be None here.
if self.certfile or self.keyfile:
raise NotSupportedError("Server authentication is not supported " +
"with HTTP endpoints")
self.__http = http_client.HTTPSConnection(self.host, self.port,
key_file=self.keyfile,
cert_file=self.certfile,
timeout=self.__timeout,
context=self.context)
if self.using_proxy():
Expand Down
14 changes: 14 additions & 0 deletions impala/_thrift_gen/ImpalaService/ImpalaHiveServer2Service-remote
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print('Functions:')
print(' TGetExecSummaryResp GetExecSummary(TGetExecSummaryReq req)')
print(' TGetRuntimeProfileResp GetRuntimeProfile(TGetRuntimeProfileReq req)')
print(' TPingImpalaHS2ServiceResp PingImpalaHS2Service(TPingImpalaHS2ServiceReq req)')
print(' TCloseImpalaOperationResp CloseImpalaOperation(TCloseImpalaOperationReq req)')
print(' TOpenSessionResp OpenSession(TOpenSessionReq req)')
print(' TCloseSessionResp CloseSession(TCloseSessionReq req)')
print(' TGetInfoResp GetInfo(TGetInfoReq req)')
Expand Down Expand Up @@ -137,6 +139,18 @@ elif cmd == 'GetRuntimeProfile':
sys.exit(1)
pp.pprint(client.GetRuntimeProfile(eval(args[0]),))

elif cmd == 'PingImpalaHS2Service':
if len(args) != 1:
print('PingImpalaHS2Service requires 1 args')
sys.exit(1)
pp.pprint(client.PingImpalaHS2Service(eval(args[0]),))

elif cmd == 'CloseImpalaOperation':
if len(args) != 1:
print('CloseImpalaOperation requires 1 args')
sys.exit(1)
pp.pprint(client.CloseImpalaOperation(eval(args[0]),))

elif cmd == 'OpenSession':
if len(args) != 1:
print('OpenSession requires 1 args')
Expand Down
Loading