Hi Rui,
Yes On the Beam side I am using Enum logical type. I thought I can use Int
sql type however i faced following issues.
Let assume my enum is [(0,Apple),(1,Orange),(2,Pears),(3,Banana)].
- If I map my Enum type to any calcite type. there can be other columns
which have the same sqltype. How
Hi Talat,
I am guessing when you say logical type, you mean something like this in
Beam [1].
My question is why do you need Calcite to support ENUM? If you use logical
type, you can define a ENUM by yourself and the underlying type can be a
Map. Map is supported by Calcite. So ENUM will be transp
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
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 va
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.
My que