-
-
Notifications
You must be signed in to change notification settings - Fork 106
Function with name 'jsonMergePatch' does not exist #291
Copy link
Copy link
Closed
Description
Describe what's wrong
Neither jsonMergePatch nor JSONMergePatch is available since chdb 2.1.0.
Does it reproduce on the most recent release?
Yes - tested on 2.2.0b1
Enable crash reporting
N/A
How to reproduce
On my Mac, fresh virtualenv:
$ pip install chdb
$ python -m chdb "SELECT EXISTS(SELECT * from system.functions where name in ('JSONMergePatch', 'jsonMergePatch'))"
0Expected behavior
Both jsonMergePatch and its alias JSONMergePatch should be available.
In 2.0.4:
$ python -m chdb "SELECT EXISTS(SELECT * from system.functions where name in ('JSONMergePatch', 'jsonMergePatch'))"
1Error message and/or stacktrace
Further testing, just to confirm that it isn't just a system.functions issue.
$ python -m chdb "SELECT jsonMergePatch('{}', '{}') AS res"
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Users/ssnow/.pyenv/versions/chdb/lib/python3.12/site-packages/chdb/__main__.py", line 35, in <module>
main()
File "/Users/ssnow/.pyenv/versions/chdb/lib/python3.12/site-packages/chdb/__main__.py", line 23, in main
res = query(sql, output_format)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ssnow/.pyenv/versions/chdb/lib/python3.12/site-packages/chdb/__init__.py", line 78, in query
raise ChdbError(res.error_message())
chdb.__init__.ChdbError: Code: 46. DB::Exception: Function with name 'jsonMergePatch' does not exist. In scope SELECT jsonMergePatch('{}', '{}') AS res. (UNKNOWN_FUNCTION)$ python -m chdb "SELECT JSONMergePatch('{}', '{}') AS res"
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Users/ssnow/.pyenv/versions/chdb/lib/python3.12/site-packages/chdb/__main__.py", line 35, in <module>
main()
File "/Users/ssnow/.pyenv/versions/chdb/lib/python3.12/site-packages/chdb/__main__.py", line 23, in main
res = query(sql, output_format)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ssnow/.pyenv/versions/chdb/lib/python3.12/site-packages/chdb/__init__.py", line 78, in query
raise ChdbError(res.error_message())
chdb.__init__.ChdbError: Code: 46. DB::Exception: Function with name 'JSONMergePatch' does not exist. In scope SELECT JSONMergePatch('{}', '{}') AS res. (UNKNOWN_FUNCTION)Additional context
This works in 1.x, and 2.x versions up to 2.0.4, and fails starting in 2.1.0 onwards.
From 2.1.0 changelog:
Update ClickHouse engine to v24.8.4.13-lts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels