You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Mobile <go...@qq.com.INVALID> on 2024/07/03 08:08:24 UTC
[BUG]JDBC adapter does not work with PATH parameter in JSON/YAML models
Hello everyone!
I am created calcite's udf, like org.apache.calcite.test.UdfTest.testPath(), but when I use this function in jdbc schema, I get an error: No match found for function signature IS_CHANGE_TO. I checked the source code org.apache.calcite.model.ModelHandler.visit(JsonJdbcSchema), which does not handle the path parameter, Is this a BUG, or how can I create udf in jdbc schema? The following is my model.json.
{
"version": "1.0",
"defaultSchema": "jdbc_schema",
"schemas":
[
{
"name": "customer_functions",
"functions":
[
{
"name": "IS_CHANGE_TO",
"className": "com.fs.calcite.functions.IsChangeToFunction"
}
]
},
{
"name": "jdbc_schema",
"type": "jdbc",
"path":
[
"customer_functions"
],
"cache": false,
"jdbcDriver": "com.mysql.cj.jdbc.Driver",
"jdbcUrl": "jdbc:mysql://xxxx",
"jdbcUser": "xxxx",
"jdbcPassword": "xxx"
}
]
}
Thanks,
hector.gong