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] > >
