criccomini / pymetastore

A Python Client for Hive Metastore
MIT License
9 stars 1 forks source link

LONG or BIGINT? #21

Closed criccomini closed 1 year ago

criccomini commented 1 year ago

@cpard I noticed that Hive's Data Types wiki has BIGINT not LONG. We're using LONG in PrimitiveCategory. Which is right?

criccomini commented 1 year ago

Similar question for BYTE. I don't see that listed at all. I'm kinda wondering if I'm looking at the right thing?

criccomini commented 1 year ago

Ah! I see the issue. It's just naming.

primitive_to_serde_mapping = {
    PrimitiveCategory.VOID: SerdeTypeNameConstants.VOID,
    PrimitiveCategory.BOOLEAN: SerdeTypeNameConstants.BOOLEAN,
    PrimitiveCategory.BYTE: SerdeTypeNameConstants.TINYINT,
    PrimitiveCategory.SHORT: SerdeTypeNameConstants.SMALLINT,
    PrimitiveCategory.INT: SerdeTypeNameConstants.INT,
    PrimitiveCategory.LONG: SerdeTypeNameConstants.BIGINT,
    PrimitiveCategory.FLOAT: SerdeTypeNameConstants.FLOAT,
    PrimitiveCategory.DOUBLE: SerdeTypeNameConstants.DOUBLE,
    PrimitiveCategory.STRING: SerdeTypeNameConstants.STRING,
    PrimitiveCategory.DATE: SerdeTypeNameConstants.DATE,
    PrimitiveCategory.TIMESTAMP: SerdeTypeNameConstants.TIMESTAMP,
    PrimitiveCategory.TIMESTAMPLOCALTZ: SerdeTypeNameConstants.TIMESTAMPLOCALTZ,
    PrimitiveCategory.BINARY: SerdeTypeNameConstants.BINARY,
    PrimitiveCategory.DECIMAL: SerdeTypeNameConstants.DECIMAL,
    PrimitiveCategory.VARCHAR: SerdeTypeNameConstants.VARCHAR,
    PrimitiveCategory.CHAR: SerdeTypeNameConstants.CHAR,
    PrimitiveCategory.INTERVAL_YEAR_MONTH: SerdeTypeNameConstants.INTERVAL_YEAR_MONTH,
    PrimitiveCategory.INTERVAL_DAY_TIME: SerdeTypeNameConstants.INTERVAL_DAY_TIME,
    PrimitiveCategory.UNKNOWN: SerdeTypeNameConstants.UNKNOWN,
}