Is your problem defining table functions or calling them?
As far as I know, there is no support in any of the Calcite grammars for 
defining new table functions.
There are some built-in table functions, like HOP and TUMBLE, and you can find 
tests that call them.
So there is syntax for calling table functions, which supports specifying which 
table to apply the functions to.

Mihai

________________________________
From: Or Tzadik
Sent: Wednesday, April 9, 2025 8:03 AM
To: [email protected]
Subject: Using table functions for schemed non constant tables

Hi,

I'm interested in using user defined table functions for regular schemed
tables, that exist on my `CatalogReader`.

I'm currently using Calcite 1.38, and the behavior I'm looking for is
something like:

```

select * from f(t) | select * from table(f(t)) | select * from table (f
(table t)) | select * from f(t.*)

```

where `f` is some table function.

basically, anything that enables me to create a `RelNode` that takes a
table (or a rowtype of the table's columns) as it's input and return
something similar, depending on the table functions.

Is there some known or used way for me to try? If I understood
correctly,  table functions takes constant tables, but I hope that I'm
mistaken, and there are some other ways to use it.


Reply via email to