[ 
https://issues.apache.org/jira/browse/CALCITE-7352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18048912#comment-18048912
 ] 

Yu Xu edited comment on CALCITE-7352 at 1/4/26 3:09 AM:
--------------------------------------------------------

Fixed in 
[fe73166|[https://github.com/apache/calcite/commit/fe73166a17232a7bcbb3ed5c01a08b2f98101980]]

Thank you for the fix [~jensen] 

Thank you for review [~mbudiu]


was (Author: JIRAUSER307770):
Fixed in 
[fe73166|[https://github.com/apache/calcite/commit/fe73166a17232a7bcbb3ed5c01a08b2f98101980]]

Thank you for the fix [~jensen] 

Thank you for review [~mbudiu]

> Incorrect SqlLibrary enum value used in ClickHouse SQL test
> -----------------------------------------------------------
>
>                 Key: CALCITE-7352
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7352
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.41.0
>            Reporter: Zhen Chen
>            Assignee: Zhen Chen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.42.0
>
>
> The test code incorrectly referenced Spark's library definition for querying 
> ClickHouse, ignoring the SqlLibrary.CLICKHOUSE enumeration value specifically 
> designed for ClickHouse.
> The test is here
> {code:java}
>   @Test void testStartsWith() {
>     final String query = "select startswith(\"brand_name\", 'a')\n"
>         + "from \"product\"";
>     final String expectedBigQuery = "SELECT STARTS_WITH(brand_name, 'a')\n"
>         + "FROM foodmart.product";
>     final String expectedPostgres = "SELECT STARTS_WITH(\"brand_name\", 
> 'a')\n"
>         + "FROM \"foodmart\".\"product\"";
>     final String expectedSnowflake = "SELECT STARTSWITH(\"brand_name\", 
> 'a')\n"
>         + "FROM \"foodmart\".\"product\"";
>     final String expectedSpark = "SELECT STARTSWITH(`brand_name`, 'a')\n"
>         + "FROM `foodmart`.`product`";
>     final String expectedClickHouse = "SELECT startsWith(`brand_name`, 'a')\n"
>         + "FROM `foodmart`.`product`";
>     
> sql(query).withLibrary(SqlLibrary.SNOWFLAKE).withBigQuery().ok(expectedBigQuery);
>     
> sql(query).withLibrary(SqlLibrary.SNOWFLAKE).withPostgresql().ok(expectedPostgres);
>     
> sql(query).withLibrary(SqlLibrary.SNOWFLAKE).withSnowflake().ok(expectedSnowflake);
>     sql(query).withLibrary(SqlLibrary.SPARK).withSpark().ok(expectedSpark);
>     
> sql(query).withLibrary(SqlLibrary.SPARK).withClickHouse().ok(expectedClickHouse);
>     <------ here
>   } {code}
> testEndsWith() also has the same issue.
> The Jira CALCITE-6969 introduced SqlLibrary.CLICKHOUSE, but CALCITE-6967 did 
> not use SqlLibrary.CLICKHOUSE.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to