generated from finos/software-project-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Feature Request
The PyLegend type system isn't granular enough. Furthermore, types like Decimal are not parametrizable.
Description of Problem:
We have to use a very fuzzy type mapping because of this. This also means that types can't be translated correctly between systems due to PyLegend.
Here is the mapping we're currently using:
COLUMN_TYPE_TO_TDS_COLUMN_TYPE_MAP = {
OurColumnType.UTinyInt: PrimitiveType.Number, # FIXME: PyLegend doesn't have granular numeric types.
OurColumnType.TinyInt: PrimitiveType.Number, # FIXME: PyLegend doesn't have granular numeric types.
OurColumnType.USmallInt: PrimitiveType.Number, # FIXME: PyLegend doesn't have granular numeric types.
OurColumnType.SmallInt: PrimitiveType.Number, # FIXME: PyLegend doesn't have granular numeric types.
OurColumnType.UInt: PrimitiveType.Integer,
OurColumnType.Int: PrimitiveType.Integer,
OurColumnType.UBigInt: PrimitiveType.Number, # FIXME: PyLegend doesn't have granular numeric types.
OurColumnType.BigInt: PrimitiveType.Number, # FIXME: PyLegend doesn't have granular numeric types.
OurColumnType.Float4: PrimitiveType.Float,
OurColumnType.Double: PrimitiveType.Decimal, # FIXME: PyLegend doesn't have granular numeric types.
OurColumnType.Decimal: PrimitiveType.Decimal,
OurColumnType.Boolean: PrimitiveType.Boolean,
OurColumnType.Varchar: PrimitiveType.String,
# OurColumnType.Time: PrimitiveType.Time, # FIXME: PyLegend doesn't have a `Time` type.
OurColumnType.Date: PrimitiveType.Date,
OurColumnType.Timestamp: PrimitiveType.DateTime,
# OurColumnType.Variant: PrimitiveType.Variant, # FIXME: PyLegend doesn't have a `Variant` type.
# OurColumnType.Binary: PrimitiveType.Binary, # FIXME: PyLegend doesn't have a `Binary` type.
}Potential Solutions:
Implement the types and appropriate parametrizations.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels