Maybe STRING type can be considered. I know there's some type that may
archive the same goal and most RDBMS doesn't support this(SQLLite support,
MySQL/pg not), but it becomes a standard type in many engines like
Spark/Hive/BigQuery, etc.


Regards!

Aron Tao


Julian Hyde <[email protected]> 于2021年4月28日周三 上午2:42写道:

> If the type is widely used we could consider supporting it. Which
> databases have a UUID type? Is there a standard ODBC/JDBC type code for it?
> Are there any built-in functions that operate on UUIDs?
>
> Another option is to create a user-defined type.
>
> Julian
>
>
> > On Apr 27, 2021, at 7:04 AM, JiaTao Tao <[email protected]> wrote:
> >
> > I think the only way is to add your type to SqlTypeName and override
> > RelDataTypeSystem/RelDataTypeFactory if needed
> >
> > Regards!
> >
> > Aron Tao
> >
> >
> > Taras Ledkov <[email protected]> 于2021年4月27日周二 下午5:42写道:
> >
> >> Hi all,
> >>
> >> I'm looking for the way to extend SQL types for my engine based on
> Calcite.
> >> Now calcite doesn't support UUID sql type. This could be fixed by
> >> calcite patch,
> >> but what are the best practices for adding new engine-specific type?
> >>
> >> e.g. I have to introduce new SQL type MY_UUID etc.
> >>
> >> RelDataType is interface but the method RelDataType#getSqlTypeName
> >> returns SqlTypeName enum that is defined by calcite framework.
> >> Are there any extension point for custom  types or it contradicts
> >> calcite architecture an it is not Calcite way?
> >>
> >> Just in case, again:
> >> I mean that under custom SQL types, it is not structured types that are
> >> defined by SQL user, but engine-specific types:
> >> e.g.: blob, image, text, my_blob, my_uuid, json etc...
> >>
> >> --
> >> Taras Ledkov
> >> Mail-To: [email protected]
> >>
> >>
>
>

Reply via email to