Re: Override built-in function signature for query parsing

2024-03-05 Thread Xiaoying Wang
I see. I will look into the Babel parser then. Thank you! Best, Xiaoying On Tue, Mar 5, 2024 at 3:48 PM Julian Hyde wrote: > The parser does its work without looking at the operator table. (Like any > sane parser, it deals only with syntax, not semantics.) So, it’s impossible > for your TRIM

Re: Override built-in function signature for query parsing

2024-03-05 Thread Julian Hyde
The parser does its work without looking at the operator table. (Like any sane parser, it deals only with syntax, not semantics.) So, it’s impossible for your TRIM function to affect what the parser considers to be valid. One option is for you to modify the Babel parser, which is a more lenient

Override built-in function signature for query parsing

2024-03-05 Thread Xiaoying Wang
Hi community, I want to override the `trim` function. Currently the function it cannot support signature like this: `trim(string, characters)`, which is supported by database like DuckDB[1]. I implemented a function like the following: ``` public class SqlTrim2Function extends SqlFunction {