You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "xuzifu666 (via GitHub)" <gi...@apache.org> on 2026/02/04 06:58:13 UTC
[PR] [CALCITE-7408] Enable URL_ENCODE/URL_DECODE in ClickHouse Dialect [calcite]
xuzifu666 opened a new pull request, #4784:
URL: https://github.com/apache/calcite/pull/4784
JIRA: https://issues.apache.org/jira/browse/CALCITE-7408
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] Enable URL_ENCODE/URL_DECODE in ClickHouse Dialect [calcite]
Posted by "xuzifu666 (via GitHub)" <gi...@apache.org>.
xuzifu666 commented on PR #4784:
URL: https://github.com/apache/calcite/pull/4784#issuecomment-3846954563
> I'm not an expert in ClickHouse, but [the documentation](https://clickhouse.com/docs/sql-reference/functions/url-functions) suggests ClickHouse calls these functions `encodeURLComponent` and `decodeURLComponent`. Since we're talking about changes to the ClickHouse dialect, it would be good to match these names.
@michaelmior Thank you for the suggestion. Here's my understanding: this PR mainly addresses two things:
1. It enables the ClickHouse Library to recognize the ```url_encode``` and ```url_decode``` functions;
2. It accurately converts SQL from Calcite to the correct ClickHouse dialect, as explained in the documentation, for example, converting ```url_encode``` to ```encodeURLComponent```.
Since this name is specific to the ClickHouse dialect, it seems unnecessary to introduce a function with the same implementation but a different name. This can be seen in ```RelToSqlConvertTest```, where the dialect-converted name is correct. I wonder if you agree with my point of view.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] Enable URL_ENCODE/URL_DECODE in ClickHouse Dialect [calcite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4784:
URL: https://github.com/apache/calcite/pull/4784#issuecomment-3845944038
## [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4784) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4784&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4784&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=4784&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4784&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4784&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4784)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] URL_ENCODE/URL_DECODE is unparsed incorrectly for ClickHouseSqlDialect [calcite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4784:
URL: https://github.com/apache/calcite/pull/4784#issuecomment-3868979105
## [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4784) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4784&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4784&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=4784&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4784&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4784&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4784)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] Enable URL_ENCODE/URL_DECODE in ClickHouse Dialect [calcite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4784:
URL: https://github.com/apache/calcite/pull/4784#issuecomment-3860091070
## [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4784) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4784&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4784&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=4784&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4784&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4784&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4784)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] Enable URL_ENCODE/URL_DECODE in ClickHouse Dialect [calcite]
Posted by "michaelmior (via GitHub)" <gi...@apache.org>.
michaelmior commented on PR #4784:
URL: https://github.com/apache/calcite/pull/4784#issuecomment-3862072490
@xuzifu666 Thanks for clarifying!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] Enable URL_ENCODE/URL_DECODE in ClickHouse Dialect [calcite]
Posted by "xiedeyantu (via GitHub)" <gi...@apache.org>.
xiedeyantu commented on code in PR #4784:
URL: https://github.com/apache/calcite/pull/4784#discussion_r2762651381
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -3701,6 +3701,19 @@ private SqlDialect nonOrdinalDialect() {
sql(query2).withSpark().ok(expected2);
}
+ /** Test case for
+ * <a href="https://issues.apache.org/jira/browse/CALCITE-7408">[CALCITE-7408]
+ * Enable URL_ENCODE/URL_DECODE in ClickHouse Dialect</a>. */
+ @Test void testUrlencodeAndUrldecodeForClickHouse() {
Review Comment:
I'd like to rename it to `testUrlencodeAndUrldecode`. If there are any similar dialectal rewrites later, they can be added directly to this test. Alternatively, you can first check if there are similar tests in the existing test classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] URL_ENCODE/URL_DECODE is unparsed incorrectly for ClickHouseSqlDialect [calcite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4784:
URL: https://github.com/apache/calcite/pull/4784#issuecomment-3868956779
## [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4784) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4784&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4784&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=4784&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4784&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4784&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4784)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] URL_ENCODE/URL_DECODE is unparsed incorrectly for ClickHouseSqlDialect [calcite]
Posted by "xuzifu666 (via GitHub)" <gi...@apache.org>.
xuzifu666 merged PR #4784:
URL: https://github.com/apache/calcite/pull/4784
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] Enable URL_ENCODE/URL_DECODE in ClickHouse Dialect [calcite]
Posted by "xuzifu666 (via GitHub)" <gi...@apache.org>.
xuzifu666 commented on code in PR #4784:
URL: https://github.com/apache/calcite/pull/4784#discussion_r2762669376
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -3701,6 +3701,19 @@ private SqlDialect nonOrdinalDialect() {
sql(query2).withSpark().ok(expected2);
}
+ /** Test case for
+ * <a href="https://issues.apache.org/jira/browse/CALCITE-7408">[CALCITE-7408]
+ * Enable URL_ENCODE/URL_DECODE in ClickHouse Dialect</a>. */
+ @Test void testUrlencodeAndUrldecodeForClickHouse() {
Review Comment:
Makes sense, had modified, and there are currently no tests for these functions in test classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] Enable URL_ENCODE/URL_DECODE in ClickHouse Dialect [calcite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4784:
URL: https://github.com/apache/calcite/pull/4784#issuecomment-3845752025
## [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4784) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4784&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4784&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=4784&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4784&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4784&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4784)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] Enable URL_ENCODE/URL_DECODE in ClickHouse Dialect [calcite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4784:
URL: https://github.com/apache/calcite/pull/4784#issuecomment-3845932172
## [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4784) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4784&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4784&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=4784&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4784&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4784&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4784)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] Enable URL_ENCODE/URL_DECODE in ClickHouse Dialect [calcite]
Posted by "xiedeyantu (via GitHub)" <gi...@apache.org>.
xiedeyantu commented on PR #4784:
URL: https://github.com/apache/calcite/pull/4784#issuecomment-3857705297
I agree with @michaelmior 's suggestion; it would be better not to enable libraries support for ClickHouse, and only perform dialect conversion. If users don't look closely, they might think ClickHouse supports `URL_DECODE`/`URL_ENCODE`. WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] URL_ENCODE/URL_DECODE is unparsed incorrectly for ClickHouseSqlDialect [calcite]
Posted by "xuzifu666 (via GitHub)" <gi...@apache.org>.
xuzifu666 commented on PR #4784:
URL: https://github.com/apache/calcite/pull/4784#issuecomment-3868906562
I have made the revisions according to your suggestions(Additionally, the names jira and pr have been changed.). If there are no further comments, I will merge this PR within 24 hours. @xiedeyantu @michaelmior
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-7408] Enable URL_ENCODE/URL_DECODE in ClickHouse Dialect [calcite]
Posted by "michaelmior (via GitHub)" <gi...@apache.org>.
michaelmior commented on PR #4784:
URL: https://github.com/apache/calcite/pull/4784#issuecomment-3846781239
I'm not an expert in ClickHouse, but [the documentation](https://clickhouse.com/docs/sql-reference/functions/url-functions) suggests ClickHouse calls these functions `encodeURLComponent` and `decodeURLComponent`. Since we're talking about changes to the ClickHouse dialect, it would be good to match these names.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org