BiteTheDDDDt commented on PR #10214: URL: https://github.com/apache/doris/pull/10214#issuecomment-1159916749
> > > > Yes, although numbers("5") can be rewrote to another sql use `table function` , I still think we need `table-valued function` : > > 1. `table-valued function` sql is easier to write than rewriting SQL。 > > 2. In addition to `numbers()` , we can implement more `table-valued function` in the future which may can not be rewrote. Hi, I think `table function` and `table-valued function` still can reuse a lot of code. 1. We can add `Rewrite-Rule` to FE to automatically rewrite sql, then user can just use `select number(5);` directly. 2. Compared with `TVF`, `TF` has one more input column as argument. But we have some function like `explode_numbers` just ignore the input column. We can think of this `TF` that ignores input as `TVF`. Similarly, if we want to implement a new `TVF`, we can implement a `TF` that ignores input and let it participate in `Rewrite-Rule`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org