databend icon indicating copy to clipboard operation
databend copied to clipboard

`logictest` will mistake converting double quote `"` to single quote `'` in query when testing with http protocol

Open leiysky opened this issue 3 years ago • 1 comments

https://github.com/datafuselabs/databend/blob/43cbd00efd425c1c2eb42a1f3815282754b28873/tests/logictest/http_connector.py#L121-L129

cc @ZeaLoVe

leiysky avatar Aug 08 '22 07:08 leiysky

I think we should not do manual escape here, the SQL should remain unchanged after the JSON encode(client)/decode(server), need to examine why we are relying on this escape now.

youngsofun avatar Aug 08 '22 08:08 youngsofun

I think we should not do manual escape here, the SQL should remain unchanged after the JSON encode(client)/decode(server), need to examine why we are relying on this escape now.

The comments include some cases need this converting, maybe you can help to solve this, cc @youngsofun

select "false"::boolean = not "true"::boolean;
SELECT parse_json('"false"')::boolean;  

ZeaLoVe avatar Aug 12 '22 03:08 ZeaLoVe