kyuubi
kyuubi copied to clipboard
[Bug] Parameter replacement issue due to incorrect sql split
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Search before asking
- [x] I have searched in the issues and found no similar issues.
Describe the bug
https://github.com/apache/kyuubi/issues/6221 has fixed some case, but there still exist bug.
String sql = "SELECT\n" +
" regexp_replace(col2, '\\n|\\r|\\t', '') as col2,\n" +
" `(col2|col2)?+.+`\n" +
"FROM\n" +
" test_table";
Utils.updateSql(sql, new HashMap<>());
got exception
Exception in thread "main" org.apache.kyuubi.jdbc.hive.KyuubiSQLException: Parameter #1 is unset
at org.apache.kyuubi.jdbc.hive.Utils.updateSql(Utils.java:170)
at org.apache.kyuubi.jdbc.hive.Test.main(Test.java:14)
Affects Version(s)
1.10
Kyuubi Server Log Output
Kyuubi Engine Log Output
Kyuubi Server Configurations
Kyuubi Engine Configurations
Additional context
No response
Are you willing to submit PR?
- [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
- [x] No. I cannot submit a PR at this time.
Hello @ruanwenjun, Thanks for finding the time to report the issue! We really appreciate the community's efforts to improve Apache Kyuubi.
Can we add a new judge inBackticks to handle this case?