You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Gavin Ray <ra...@gmail.com> on 2022/07/18 22:09:17 UTC
"Proxying" schema that intercepts calls to members and returns stub values?
How difficult would it be to create a proxying schema that returns the
integer value 1 for every column requested
This would be useful for a few things probably, but one neat use it would
unlock is
the ability to use Calcite for translation between SQL dialects without
having a schema beforehand.
You could even host a small public webservice people could use, how nifty
would that be?
Re: "Proxying" schema that intercepts calls to members and returns stub values?
Posted by Julian Hyde <jh...@gmail.com>.
That is probably very straightforward to write.
The nearest thing that currently exists is CloneSchema, which I would describe as a ‘caching proxy’. You could copy it and make each table return a single row of all ones. Or I would be inclined to return the ‘zero’ value for each datatype (0 for ints, false for BOOLEAN, 0.0 for floats, empty string, DATE ‘1970-1-1’, etc.).
Feel free to create a JIRA case sketching out the requirement, even if you don’t currently have time to implement it.
Julian
> On Jul 18, 2022, at 3:09 PM, Gavin Ray <ra...@gmail.com> wrote:
>
> How difficult would it be to create a proxying schema that returns the
> integer value 1 for every column requested
>
> This would be useful for a few things probably, but one neat use it would
> unlock is
> the ability to use Calcite for translation between SQL dialects without
> having a schema beforehand.
>
> You could even host a small public webservice people could use, how nifty
> would that be?