dropbox / dropbox/PyHive

Hive binary type support

Open
#170 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
545
PR merge metrics
No merged PRs in 30d

Description

IIUC, PyHive don't provide [Type Constructors](https://www.python.org/dev/peps/pep-0249/#type-objects-and-constructors) and it tries decoding bytes using UTF-8. Users cannot insert arbitrary binary buffer. For example,

```
k = b'\xe313'
cursor_write.execute('''
INSERT INTO TABLE my_db.my_table PARTITION (partition_id = %d)
VALUES (%s)''', (1, k))
```

These codes will raise

```
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe3 in position 0: invalid continuation byte
```

I am looking for workaround without luck. Is it possible to have a workaround? If not, is it easy for PyHive to support Type Constructors? And is PyHive going to support this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.