git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create user-defined data types in calcite?


What do you mean by work with JSON only? You can define your own type in 2
ways:
1) define it  using CREATE TYPE (see here
<https://github.com/apache/calcite/blob/master/site/_docs/reference.md#ddl-extensions>
)
2) define it with JSON schema (see here
<https://github.com/apache/calcite/blob/master/site/_docs/model.md#type>)

Thanks.

On Thu, Apr 26, 2018 at 3:58 AM, aishwaryaanns@xxxxxxxxx <
aishwaryaanns@xxxxxxxxx> wrote:

> But CREATE TYPE works only with JSON right? Is there any way other than
> that?
>
> On 2018/04/21 00:41:23, Shuyi Chen <suez1224@xxxxxxxxx> wrote:
> > Currently, user defined type is not supported in Calcite. But it's WIP,
> > please see https://issues.apache.org/jira/browse/CALCITE-2045. With this
> > PR, you can either use CREATE TYPE statement to define your own type or
> > define your new type in the JSON schema.
> >
> > Thanks
> > Shuyi
> >
> >
> > On Fri, Apr 20, 2018 at 4:27 AM, Valli Annamalai <
> aishwaryaanns@xxxxxxxxx>
> > wrote:
> >
> > > I want to parse a query having 'text' in place of 'varchar'. For
> > > example, select
> > > cast(ps_comment as text) from part While parsing calcite is showing,
> > > Unknown data type name 'TEXT'.
> > >
> > > How can I make calcite to parse the above query successfully having
> > > user-defined data type 'text'?
> > >
> > >
> > > Thanks in advance
> > >
> >
> >
> >
> > --
> > "So you have to trust that the dots will somehow connect in your future."
> >
>



-- 
"So you have to trust that the dots will somehow connect in your future."


( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-calcite-development/msg03337.html on line 121
Call Stack
#TimeMemoryFunctionLocation
10.0011364696{main}( ).../msg03337.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-calcite-development/msg03337.html on line 121
Call Stack
#TimeMemoryFunctionLocation
10.0011364696{main}( ).../msg03337.html:0