TypeError: expected string or bytes-like object
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 545
- PR merge metrics
- No merged PRs in 30d
Description
my hive table comment contain '\n'
hive schema:
CREATE EXTERNAL TABLE `test`.`test_01`( `name` string COMMENT 'aa bb\ncc');
pyhive rows:
['name', 'string', 'aa bb
cc']
TypeError: expected string or bytes-like object
File "/usr/lib/python3.6.14/lib/python3.6/site-packages/pyhive/sqlalchemy_hive.py", line 324, in get_columns
311 def get_columns(self, connection, table_name, schema=None, **kw):
(...)
320 break
321 # Take out the more detailed type information
322 # e.g. 'map' -> 'map'
323 # 'decimal(10,1)' -> decimal
--> 324 col_type = re.search(r'^\w+', full_col_type).group(0)
325 try:
..................................................
self =
connection =
table_name = 'ewsgz_ods_pck_info'
schema = 'hudi'
kw = {'info_cache': {}}
col_type = 'bigint'
re.search =
full_col_type = None
..................................................
File "/usr/lib/python3.6.14/lib/python3.6/re.py", line 182, in search
179 def search(pattern, string, flags=0):
180 """Scan through string looking for a match to the pattern, returning
181 a match object, or None if no match was found."""
--> 182 return _compile(pattern, flags).search(string)
..................................................
pattern = '^\\w+'
string = None
flags = 0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.