Hi Julian,

Thanks for your answer. I dont know other dbs but  Also Postgresql support
enum too[1]. Do you think supporting logical types makes more sense ? When
we define a new type that can be stored in a schema field. Is it possible ?

Thanks

[1] https://www.postgresql.org/docs/11/datatype-enum.html

On Wed, Jul 15, 2020 at 3:09 PM Julian Hyde <jh...@apache.org> wrote:

> In answer to your question, no, Calcite does not support ENUM. It
> looks as if only MySQL does this.
>
> One idiomatic SQL way to achieve this would be to define a CHECK
> constraint that ensures that a column can only have a given set of
> values. Then hopefully a storage system would compress repeated values
> to a few bits each.
>
> Feel free to log a JIRA with your requirements. We'll see if anyone
> else wants this, and is prepared to implement it.
>
> Julian
>
> On Tue, Jul 14, 2020 at 7:00 PM Talat Uyarer
> <tuya...@paloaltonetworks.com> wrote:
> >
> > Hi,
> > I am using Beam SQL which uses calcite. IN Beam we have logical types
> which
> > we can use for Enumeration. But looks like they did not implement
> > enumeration support for calcite. I want to give that support. But I could
> > not find the right way to implement it. In my Enumeration is a
> > HashMap<String,Integer>.
> >
> > My question is: Does calcite support Enum types like mysql ? [1] if not
> > How can store metadata information such as (enum strings, beam type name
> > etc) for columns ?
> >
> > Thanks
> >
> > [1]
> https://urldefense.proofpoint.com/v2/url?u=https-3A__dev.mysql.com_doc_refman_8.0_en_enum.html&d=DwIBaQ&c=V9IgWpI5PvzTw83UyHGVSoW3Uc1MFWe5J8PTfkrzVSo&r=BkW1L6EF7ergAVYDXCo-3Vwkpy6qjsWAz7_GD7pAR8g&m=C6H60jgOEboCiMMPoCkttuBvRctAdfSX_bb4fdHteg8&s=CsvfHu0s3sruXHp-cUyo68Yjsne0Bz414FI3_1M6Zas&e=
>

Reply via email to