Skip to content

Commit 9b8c378

Browse files
committed
fix the JSON->json data type name issue
1 parent cd02a86 commit 9b8c378

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

timeplus_connect/datatypes/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def _active_null(self, ctx: QueryContext):
356356

357357
class UnsupportedType(TimeplusType, ABC, registered=False):
358358
"""
359-
Base class for ClickHouse types that can't be serialized/deserialized into Python types.
359+
Base class for Timeplus types that can't be serialized/deserialized into Python types.
360360
Mostly useful just for DDL statements
361361
"""
362362
def __init__(self, type_def: TypeDef):

timeplus_connect/datatypes/registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ def parse_name(name: str) -> Tuple[str, str, TypeDef]:
3838
elif base.startswith('variant'):
3939
keys, values = parse_columns(base[7:])
4040
base = 'variant'
41-
elif base.startswith('JSON') and len(base) > 4 and base[4] == '(':
41+
elif base.startswith('json') and len(base) > 4 and base[4] == '(':
4242
keys, values = parse_columns(base[4:])
43-
base = 'JSON'
43+
base = 'json'
4444
# timeplusd doesn't support geometric type.
4545
# elif base == 'Point':
4646
# values = ('Float64', 'Float64')

timeplus_connect/driver/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def query(self,
220220
:return: QueryResult -- data and metadata from response
221221
"""
222222
if query and query.lower().strip().startswith('select __connect_version__'):
223-
return QueryResult([[f'ClickHouse Connect v.{version()}ClickHouse Inc.']], None,
223+
return QueryResult([[f'Timeplus Connect v.{version()}Timeplus Inc.']], None,
224224
('connect_version',), (get_from_name('string'),))
225225
kwargs = locals().copy()
226226
del kwargs['self']

0 commit comments

Comments
 (0)