[ https://issues.apache.org/jira/browse/KYLIN-5524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17716117#comment-17716117 ]
Yaguang Jia edited comment on KYLIN-5524 at 4/25/23 6:48 AM: ------------------------------------------------------------- In Kylin, realize the custom function of concat with multiple parameters by directly newing a org.apache.calcite.sql.Sql Function. In addition, when transferring spark query plans, directly call the concat function of spark with multiple parameters. See org.apache.kylin.query.runtime.Expression Converter#convert The query will eventually convert the query plan into a spark query plan. When encountering the concat function in sql, it will take out each parameter of concat and call the concat function of spark org.apache.spark.sql.functions#concat( it receives variadic arguments) !image-2023-04-25-14-48-51-840.png! 在Kylin中通过直接new一个org.apache.calcite.sql.SqlFunction的方式实现concat多个参数的自定义函数。另外,在转spark查询计划时,直接调用spark多个参数的concat函数。见org.apache.kylin.query.runtime.ExpressionConverter#convert 查询最终会将查询计划转成spark的查询计划,当遇到sql中的concat函数时,会把concat的每个参数拿出来,调用spark的concat函数org.apache.spark.sql.functions#concat(它接收可变参数) was (Author: JIRAUSER298908): In Kylin, realize the custom function of concat with multiple parameters by directly newing a org.apache.calcite.sql.Sql Function. In addition, when transferring spark query plans, directly call the concat function of spark with multiple parameters. See org.apache.kylin.query.runtime.Expression Converter#convert The query will eventually convert the query plan into a spark query plan. When encountering the concat function in sql, it will take out each parameter of concat and call the concat function of spark org.apache.spark.sql.functions#concat( it receives variadic arguments) 在Kylin中通过直接new一个org.apache.calcite.sql.SqlFunction的方式实现concat多个参数的自定义函数。另外,在转spark查询计划时,直接调用spark多个参数的concat函数。见org.apache.kylin.query.runtime.ExpressionConverter#convert 查询最终会将查询计划转成spark的查询计划,当遇到sql中的concat函数时,会把concat的每个参数拿出来,调用spark的concat函数org.apache.spark.sql.functions#concat(它接收可变参数) > When there are more than 2 parameters of concat function in cc column, SQL > modeling fails. > ------------------------------------------------------------------------------------------ > > Key: KYLIN-5524 > URL: https://issues.apache.org/jira/browse/KYLIN-5524 > Project: Kylin > Issue Type: New Feature > Components: Modeling > Affects Versions: 5.0-alpha > Reporter: Yaguang Jia > Priority: Major > Fix For: 5.0-beta > > Attachments: image-2023-04-25-14-48-51-840.png > > > When there are more than 2 parameters of concat function listed in cc in SQL, > SQL modeling fails and an error of \{{no match found for function signature}} > is reported. > > 在 SQL 中 cc 列有concat函数参数大于 2 个的情况下,SQL 建模失败,报\{{no match found for function > signature}}的错误 -- This message was sent by Atlassian Jira (v8.20.10#820010)