You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Yu Xu (Jira)" <ji...@apache.org> on 2026/02/10 01:53:00 UTC
[jira] [Commented] (CALCITE-7408) URL_ENCODE/URL_DECODE is unparsed incorrectly for ClickHouseSqlDialect
[ https://issues.apache.org/jira/browse/CALCITE-7408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18057473#comment-18057473 ]
Yu Xu commented on CALCITE-7408:
--------------------------------
Fixed in [8925773|https://github.com/apache/calcite/commit/8925773e9bcbabc7d5525459de775a1ad7b2ff7d]
Thanks for all reviewers.
> URL_ENCODE/URL_DECODE is unparsed incorrectly for ClickHouseSqlDialect
> ----------------------------------------------------------------------
>
> Key: CALCITE-7408
> URL: https://issues.apache.org/jira/browse/CALCITE-7408
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.41.0
> Reporter: Yu Xu
> Assignee: Yu Xu
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.42.0
>
>
> test:
> {code:java}
> @Test void testUrlencodeAndUrldecodeForClickHouse() {
> final String query = "SELECT URL_ENCODE(\"product_name\") from \"product\"";
> final String expected = "SELECT URL_ENCODE(\"product_name\" from \"product\")";
> sql(query).withClickHouse().ok(expected);
> final String query1 = "SELECT URL_DECODE(\"product_name\") from \"product\"";
> final String expected1 = "SELECT URL_DECODE(\"product_name\" from \"product\")";
> sql(query1).withClickHouse().ok(expected1);
> } {code}
> error:
> {code:java}
> Caused by: org.apache.calcite.sql.validate.SqlValidatorException: No match found for function signature URL_ENCODE(<CHARACTER>) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:511) at org.apache.calcite.runtime.Resources$ExInst.ex(Resources.java:605) ... 84 more {code}
>
> The URL_ENCODE/URL_DECODE functions are not currently supported in Calcite ClickHouse Dialect.
> we can also refer to:
> [https://clickhouse.com/docs/sql-reference/functions/url-functions#encodeURLComponent|https://clickhouse.com/docs/sql-reference/functions/url-functions#decodeURLComponent]
> https://clickhouse.com/docs/sql-reference/functions/url-functions#decodeURLComponent
--
This message was sent by Atlassian Jira
(v8.20.10#820010)