Re: ViewTableMacro and empty parameteters
Below a few interesting pointers to the literature.
Parameterized views are known as templates with binding patterns , views
with access patterns . There are many proposals and algorithms around
these notions. I don't know if it is relevant to bring any of it into
Στις Δευ, 22 Οκτ 2018 στις 8:20 μ.μ., ο/η Julian Hyde <jhyde@xxxxxxxxxx>
> It’s a need idea, and it could easily be done by a table macro. I just
> wouldn’t call it a “view” anymore, because SQL views do not take
> parameters, and as you can see, the syntax to call is now table function
> syntax rather than view syntax.
> I like the idea of parameterized views. For instance a “view” that takes
> not only literals as parameters but also relational expressions and
> expressions (e.g. boolean expressions). I just never found a good syntax
> for it, other than table function syntax.
> If you’re familiar with Lisp you will know why I called them table macros.
> So maybe we need a SQL equivalent of quasi-quote?! 
> > On Oct 22, 2018, at 5:24 AM, ptr.bojko@xxxxxxxxx wrote:
> > Hello dear Calcite team :)
> > I have one design question on ViewTableMacro:
> > Why does it not implement parameters?
> > I was thinking about dynamic parameters "?" here. For example, following
> > view with dynamic parameters
> > some_view: SELECT * FROM some_table WHERE id > ? AND LIMIT ?
> > could handle two parameters and then this view could be used as follows:
> > SELECT * FROM TABLE(some_view(2,100))
> > Regards!
> > --
> > Piotr Bojko
> > http://about.me/ptr.bojko